This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/1017] gethostid should not sign-extend ids on 64-bit hosts


------- Additional Comments From jakub at redhat dot com  2005-06-16 22:51 -------
I disagree.  If you don't sign extend, then gethostid () on the same system
may return different id between 32-bit and 64-bit programs (for 32-bit
program it returns some negative value, for 64-bit program 2^32 bigger value).
When hostid(1) wants to print a signed value where only low 32 bits are
supposed to have the actual id as hexadecimal value (i.e. unsigned), it should
mask out all bits but the low 32.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1017

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]