[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

10003.0. "gethostid() defined incompatibly in unistd.h & netdb.h" by EDSCLU::GARROD (IBM Interconnect Engineering) Fri May 30 1997 11:40

    Under Digital UNIX V4 there seems to be a clash in the definitions
    of "gethostid" in the include files:
    
    /usr/include/unistd.h
    and
    /usr/include/netdb.h
    
    In unistd.h it is defined as:
    
    extern long gethostid __((void));
    
    in netdb.h it is defined as:
    
    extern int gethostid __((void));
    
    the compiler of course complains if both these files are #included.
    
    Which is the correct definition? The man page implies that it
    is the "int" one in netdb.h.
    
    Note that in Digital UNIX V3 there wasn't a definition of gethostid
    in unistd.h only in netdb.h.
    
    Is this a Digital UNIX V4 bug? Which include file should I edit
    temporarily to fix this so I can get clean compiles.
    
    Dave
T.RTitleUserPersonal
Name
DateLines
10003.1See note 9117.2NNTPD::"[email protected]"Brian HaleyFri May 30 1997 11:523
See note 9117.2, this has already been discussed many times in this
conference.
[Posted by WWW Notes gateway]