[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sys/socket.h on IRIX6
From: |
Akim Demaille |
Subject: |
Re: sys/socket.h on IRIX6 |
Date: |
11 Jan 2001 18:04:06 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake) |
Hi Bruno,
Long ago you wrote this:
| Trying to compile sh-utils-2.0i on IRIX6 with cc.
| I get a compilation failure for lib/canon-host.c:
|
| "../../lib/canon-host.c", line 68: error(1020): identifier "AF_INET" is
| undefined
| case AF_INET:
| ^
|
| AF_INET is not defined because it is defined in <sys/socket.h> which has not
| been included. HAVE_SYS_SOCKET_H is not defined, because at configure time
| we got:
|
| configure:5389: checking for sys/socket.h
| configure:5400: /lib/cpp conftest.c >/dev/null 2>conftest.out
| cpp: warning /usr/include/sys/socket.h:169: AF_LINK redefined
| configure: failed program was:
| #line 5395 "configure"
| #include "confdefs.h"
| #include <sys/socket.h>
|
| configure:5412: result: no
|
| So why was AF_LINK defined twice? Let's look in <sys/socket.h>:
|
| ...
| #define AF_ROUTE 17 /* Internal Routing Protocol */
| #ifdef __sgi
| #define AF_RAW 18 /* Raw link layer interface */
| #else
| #define AF_LINK 18 /* Link layer interface */
| #endif
| ...
| #define AF_LINK 25 /* Link layer interface */
| ...
|
| And if I try "/lib/cpp -D__sgi" instead of "/lib/cpp", the warning indeed
| goes away.
|
| I conclude that configure (more precisely, the macros AC_PROG_CPP and
| AC_PROG_CXXCPP) should set CPP to "/lib/cpp -D__sgi", not "/lib/cpp", on
| Irix.
|
| Bruno
IMHO, the way CVS Autoconf now handles the preprocessors makes this
hack unnecessary. May I ask you to check that indeed Autoconf behaves
properly?
Thanks!
Akim
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: sys/socket.h on IRIX6,
Akim Demaille <=