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

Conference smurf::dec_mls_plus

Title:dec_mls_plus
Moderator:SMURF::BAT
Created:Mon Nov 29 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:534
Total number of notes:2544

521.0. "ORACLE: unistd.h gethostid definition wrong?" by SMURF::BAT (Segui la tua beatitudine) Fri May 23 1997 21:35

From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM" 22-MAY-1997 20:45:16.22
To:	smurf::bat, thomson@zk3.dec.com
CC:	
Subj:	Another header file snafoo?

Barbara, 
 
This time "/usr/include/unistd.h", line 489 defines "gethostid()" as returning 
long, when in fact, "/usr/include/netdb.h" defines it as returning int. 
 
Since longs are 64 bits on DEC and IP addesses are 32 bits, the definition 
in unistd.h seems wrong: 
 
   484  extern int  fchown __((int, uid_t, gid_t)); 
   485  extern int  ftruncate __((int, off_t)); 
   486  #ifdef _XOPEN_SOURCE_EXTENDED 
   487  extern int  readlink __((const char *, char *, size_t)); 
   488  extern int  fchdir __((int)); 
   489  extern long gethostid __((void)); 
   490  #else 
   491  extern int  readlink __((const char *, char *, int)); 
   492  #endif 
   493  extern int  symlink __((const char *, const char *)); 
   494  #ifdef _AES_SOURCE 
   495  extern int  setgroups __((int, gid_t [])); 
   496  #endif 
   497  extern int  truncate __((const char *, off_t)); 
   498 
   499  #endif  /* _AES_SOURCE || _XOPEN_SOURCE_EXTENDED */ 
   500 
 
 
BTW, we're not doing anything to explicitly turn on _XOPEN_SOURCE_EXTENDED. 
 
Thanks, 
 
	-Chris   
 
P.S. I'll be out Friday, be back Tuesday.  Have a good weekend! 
 
+------------------------------------------------------------------------+ 
| ORACLE Corporation                                                     | 
|                                                  cwolf@us.oracle.com   | 
| Chris Wolf, Senior Software Engineer             Voice +1.415.506.2529 | 
| World Wide Government & Education                Fax   +1.415.506.7800 | 
| Products Division                                                      | 
+------------------------------------------------------------------------+
T.RTitleUserPersonal
Name
DateLines
521.1fixed in steelSMURF::BATSegui la tua beatitudineFri May 23 1997 22:355
    This is in Digital Unix notesfile, notes 7745, and the QAR is 50254
    in OSF_QAR.  
    
    Chris is right, it is wrong, now I have to find out what DU wants it to
    be.
521.2sent to chrisSMURF::BATSegui la tua beatitudineSat May 24 1997 00:1820
From:	SMURF::BAT          "Barbara A. Thomson ZKO3-2/X46 1-2955" 23-MAY-1997 20:15:33.96
To:	US2RMC::"cwolf@us.oracle.com"
CC:	BAT
Subj:	unistd.h (and standards.h)

	I just found that there is a QAR against this, but no real
	answer.  I'll try and get one ASAP.  (You are correct in
	that it is supposed to be 32 bits -- at least until IPv6?
	but then it would be 128 anyway?)

Answer for QAR #50254:
------ --- ------- -------
<<<<< Appended by WEB/QAR [HALEY] on - Wed Jan 29 15:35:54 1997 >>>>>

We are still working the correct definition wrt the UNIX98 brand.
UNIX95 states "long gethostid(void)" is correct, but it should
return a 32-bit identifier.  For us, long=64 bits.