Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Alfonso E. Urdaneta" <aurdanet@ursa.ess.harris.com>
Subject: netdb.h file problems.
Date: 1997/03/28	[thread overview]
Message-ID: <333BFA70.31DF@ursa.ess.harris.com> (raw)


Hi all,

In <netdb.h>  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 <unistd.h> 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.



             reply	other threads:[~1997-03-28  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-28  5:00 Alfonso E. Urdaneta [this message]
     [not found] <199704020735.XAA15599@sierra.gis.ucdavis.edu>
1997-04-02  5:00 ` netdb.h file problems Alfonso E. Urdaneta
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox