On Sun, 1 May 2005, OpenMacNews wrote:
Seeing a "#define" there gives the impression that someone might have decided to break compatibility by removing it on some other system.
based on your suggestion of where to look, i note checking:
in Tiger's "/usr/include/netdb.h":
struct hostent { char *h_name; /* official name of host */ char **h_aliases; /* alias list */ int h_addrtype; /* host address type */ int h_length; /* length of address */ char **h_addr_list; /* list of addresses from name server */ #ifndef _POSIX_C_SOURCE #define h_addr h_addr_list[0] /* address, for backward compatiblity */ #endif /* !_POSIX_C_SOURCE */
That's amusing - someone recently sent a patch for ncurses to turn off _POSIX_C_SOURCE citing "problems" with Darwin's header files. (It's not POSIX, but making changes like that at random doesn't help much ;-)
Since lynx uses the same configure script macros, that'll be gone in the next patch. But it costs some functionality (makes it harder to use the functions that actually belong in POSIX). I assume Darwin's developers have some excuse.
so, to my naive read, the define *is* properly defined, but the
#ifndef _POSIX_C_SOURCE
conditional is suspect.
generally speaking, you need that to pull in definitions that belong to POSIX when you've set the compile environment to want the standard C definitions.
options seem to be:
(a) change /usr/include/netdb.h (b) clone & change /usr/local/include/netdb.h (c) link against external BIND931 build's libs/includes (d) change code in lynx src (UN-defining _POSIX_C_SOURCE, perhaps?)
I don't like to change the system headers - it's a pain keeping up with new versions.
If I had the system to experiment with, I'd see what other differences in lynx came about from suppressing that. (I suspect that wide-character ncurses won't configure/build without it, and since most of my attention is in that area, Darwin's taken a big step backward).
If there's only a few places to prop it up, we can make special cases for Darwin.
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
_______________________________________________ Lynx-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lynx-dev
