From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f347edec2c735805,start X-Google-Attributes: gidfee84,public From: "Alfonso E. Urdaneta" Subject: netdb.h file problems. Date: 1997/03/28 Message-ID: <333BFA70.31DF@ursa.ess.harris.com>#1/1 X-Deja-AN: 229069048 Organization: Harris Corp. Newsgroups: comp.unix.osf.osf1 Hi all, In there is a section that reads as follows. #ifdef _OSF_SOURCE extern int gethostid __((void)); #endif #ifdef _XOPEN_SOURCE_EXTENDED extern struct hostent *gethostbyaddr __((const void *, size_t, int)); extern void sethostent __((int)); extern struct netent *getnetbyaddr __((in_addr_t, int)); extern void setnetent __((int)); extern void setservent __((int)); extern void setprotoent __((int)); #else extern struct hostent *gethostbyaddr __((const char *, int, int)); extern int sethostent __((int)); extern struct netent *getnetbyaddr __((int, int)); extern int setnetent __((int)); extern int setservent __((int)); extern int setprotoent __((int)); #endif However, this causes problems, because if you have both _OSF_SOURCE and _XOPEN_SOURCE_EXTENDED defined, then you get a conflict in the declaration of gethostid which is defined in as follows. #ifdef _XOPEN_SOURCE_EXTENDED extern int readlink __((const char *, char *, size_t)); extern int fchdir __((int)); extern long gethostid __((void)); #else extern int readlink __((const char *, char *, int)); #endif Has anyone out there run into this problems before and possibly have solutions ? ( Other than modifying the system include files. ) DEC Alpha, 4.0, gcc 2.7.2.2 Alfonso. -- Alfonso E. Urdaneta VOX: 407.729.3840 Harris Corp/Transcomm Division FAX: 407.729.2003 PO Box 5100, MS 6B.3827 mailto:aurdanet@ursa.ess.harris.com Melbourne, FL 32902.5100 http://www.transcomm.ess.harris.com The Harris Corporation agrees with everything I say.