On Sat, Apr 27, 2002 at 06:20:23PM +0100, Jason Williams wrote: | On Sat, Apr 27, 2002 at 11:58:38AM -0500, dman wrote: | > grep tells me that function is declared in /usr/include/netdb.h. With | > g++ 2.95 I get the same error, but g++ 3.0 works fine. I get the same | > set of results with gcc. | | Excellent, thanks, using 3.0 does indeed fix the problem. Is this a bug, | then? (what package? gcc?) I don't know for sure, but I just noticed this : -- netdb.h : #ifdef __USE_MISC ... extern struct hostent *gethostbyname2 (__const char *__name, int __af) __THROW; ... #endif If you put #define __USE_MISC above the include of netdb.h gcc/g++ 2.95 will work. I don't know about this one, but I do recall some other situations where changes in gcc 3.0 cause one version to work and the other to "not" work, but really the problem is a programmer error wrt the standards (one is more standards conforming than the other). -D -- "...In the UNIX world, people tend to interpret `non-technical user' as meaning someone who's only ever written one device driver." --Daniel Pead GnuPG key : http://dman.ddts.net/~dman/public_key.gpg
Attachment:
pgpYnof3TXtJd.pgp
Description: PGP signature