This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/1017] gethostid should not sign-extend ids on 64-bit hosts
- From: "jakub at redhat dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 16 Jun 2005 22:51:12 -0000
- Subject: [Bug libc/1017] gethostid should not sign-extend ids on 64-bit hosts
- References: <20050616224230.1017.eggert@gnu.org>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- 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.