This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
AW: c/5798: problem with sys/socket.h
- From: "Breuer, Markus" <markus dot breuer at materna dot de>
- To: "'rodrigc at gcc dot gnu dot org'" <rodrigc at gcc dot gnu dot org>, "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>, "'gcc-prs at gcc dot gnu dot org'" <gcc-prs at gcc dot gnu dot org>, "'markus dot breuer at gmx dot de'" <markus dot breuer at gmx dot de>, "Breuer, Markus" <markus dot breuer at materna dot de>, "'nobody at gcc dot gnu dot org'" <nobody at gcc dot gnu dot org>, "'gcc-gnats at gcc dot gnu dot org'" <gcc-gnats at gcc dot gnu dot org>
- Date: Mon, 4 Mar 2002 09:16:57 +0100
- Subject: AW: c/5798: problem with sys/socket.h
Hello,
i followed the thread within the refrenced link. The thread ended with no
real solution or alternative.
Possibly i found out a solution for the problem. The code within
sys/socket.h looks like following:
--- snipp ---
#ifdef _XPG4_2
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname bind __xnet_bind
[...]
#else /* __PRAGMA_REDEFINE_EXTNAME */
#define bind __xnet_bind
[...]
#endif /* __PRAGMA_REDEFINE_EXTNAME */
--- snipp ---
When defining -D_XOPEN_SOURCE=500 only, the compiler uses the else branch of
the if-def directive. This uses the preprocessor for replacement. But when
-D__PRAGMA_REDEFINE_EXTNAME is additionally defined, the compiler uses the
#pragma directive. It acts after compiling, when the symbol names are
generated. It replaces the symbolname.
Is there any reason to avoid this workaround? My (sample) application work's
fine when using it.
regards, Markus
> -----Ursprüngliche Nachricht-----
> Von: rodrigc@gcc.gnu.org [mailto:rodrigc@gcc.gnu.org]
> Gesendet: Sonntag, 3. März 2002 03:57
> An: gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org; markus.breuer@gmx.de;
> markus.breuer@materna.de; nobody@gcc.gnu.org
> Betreff: Re: c/5798: problem with sys/socket.h
>
>
> Synopsis: problem with sys/socket.h
>
> State-Changed-From-To: open->closed
> State-Changed-By: rodrigc
> State-Changed-When: Sat Mar 2 18:57:28 2002
> State-Changed-Why:
> Duplicate of PR 5440.
>
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=5440&database=gcc
>
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&
database=gcc&pr=5798