hi thomas,
thx for your reply =)
has something in the 'gethost' family changed under Tiger?
apparently. Perhaps a look at the related header files would help. For instance on Solaris, that's defined in /usr/include/netdb.h, e.g.,
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 */ # define h_addr h_addr_list[0] /* address, for backward compatiblity */ };
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 */
};in bind931's equiv (built on 10.4) "/usr/local/bind9/bind/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 */
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
};and in OSX 10.3.9'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 */
#define h_addr h_addr_list[0] /* address, for backward compatiblity
};so, to my naive read, the define *is* properly defined, but the
#ifndef _POSIX_C_SOURCE
conditional is suspect.
making a temp change to /usr/include/netdb.h, removing the conditional:
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 */
};
then re-configure & make complete successfully:
% which lynx
/usr/local/bin/lynx% ls -al /usr/local/bin/lynx
-rwxr-xr-x 1 root wheel 1279580 May 1 13:33 /usr/local/bin/lynx% lynx -version
Lynx Version 2.8.5rel.1 (04 Feb 2004)
libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 0.9.7g
Built on darwin8.0.0 May 1 2005 13:26:16so the question is, what/where to change?
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 worry that, in any case other than (d), some OTHER app will "suffer" from the change to netdb.h ...
cheers,
richard
_______________________________________________ Lynx-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lynx-dev
