[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | dec_mls_plus |
|
Moderator: | SMURF::BAT |
|
Created: | Mon Nov 29 1993 |
Last Modified: | Thu Jun 05 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 18:35
From: US2RMC::"[email protected]" "CWOLF.US.ORACLE.COM" 22-MAY-1997 20:45:16.22
To: smurf::bat, [email protected]
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 |
| [email protected] |
| Chris Wolf, Senior Software Engineer Voice +1.415.506.2529 |
| World Wide Government & Education Fax +1.415.506.7800 |
| Products Division |
+------------------------------------------------------------------------+
T.R | Title | User | Personal Name | Date | Lines |
---|
521.1 | fixed in steel | SMURF::BAT | Segui la tua beatitudine | Fri May 23 1997 19:35 | 5 |
| 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.2 | sent to chris | SMURF::BAT | Segui la tua beatitudine | Fri May 23 1997 21:18 | 20 |
| From: SMURF::BAT "Barbara A. Thomson ZKO3-2/X46 1-2955" 23-MAY-1997 20:15:33.96
To: US2RMC::"[email protected]"
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.
|