Re: list_head naming conflict gcc 4.2/perl/solaris

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: list_head naming conflict gcc 4.2/perl/solaris
Дата
Msg-id 603c8f070906011303s3c3bf4b5y20a74edc95fcf979@mail.gmail.com
обсуждение исходный текст
Ответ на list_head naming conflict gcc 4.2/perl/solaris  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: list_head naming conflict gcc 4.2/perl/solaris  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
On Mon, Jun 1, 2009 at 3:57 PM, Zdenek Kotala <Zdenek.Kotala@sun.com> wrote:
> During integration gcc4.2 into Solaris. My colleague hit a following
> problem with PostgreSQL compilation:
>
> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6845982
>
> cd /builds/sfw-fixes/usr/src/cmd/postgres/postgresql-8.2/postgresql-8.2.13/src/pl/plperl
> + /ws/onnv-tools/SUNWspro/SS12/bin/cc -xO3 -m32 -xchip=pentium -xspace -Xa -xildoff -xc99=all -xc99=none -xCC -KPIC
-I.-I../../../src/include -I/builds/sfw-fixes/proto/root_i386/usr/include
-I/builds/sfw-fixes/proto/root_i386/usr/sfw/include-I/usr/sfw/include -I/usr/include/kerberosv5
-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE-c -o plperl.o plperl.c 
> "/usr/include/sys/list.h", line 52: identifier redeclared: list_head
>        current : function(pointer to struct list {unsigned int list_size, unsigned int list_offset, struct list_node
{..}list_head}) returning pointer to void 
>        previous: function(pointer to struct List {enum NodeTag {T_TIDBitmap(902), (blah blah)
>
> At this moment there is no clear conclusion how to fix it in solaris system headers to satisfy all side.  :(
>
> My idea is to rename list_head to pg_list_head (and other functions analogously) to avoid name conflict.
>
>        Comments, better ideas?

Uh... isn't it rather bad form for the operating system headers to be
defining commonly used type names like "list"?  I'd be very surprised
if PostgreSQL is the only application that is going to break on this.

...Robert


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: list_head naming conflict gcc 4.2/perl/solaris
Следующее
От: Greg Stark
Дата:
Сообщение: Re: User-facing aspects of serializable transactions