Summary: | Inconsistent definition of int64_t in sys/types and stdint.h | ||
---|---|---|---|
Product: | glibc | Reporter: | Mateusz Loskot <mateusz> |
Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | glibc-bugs, john |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.9 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Mateusz Loskot
2009-11-20 00:58:23 UTC
(In reply to comment #0) > Environment: > * OS: Linux / Ubuntu 9.10 > * GCC: gcc(Ubuntu 4.4.1-4ubuntu8) 4.4.1 > * glibc: 2.10.1-0ubuntu15 (http://packages.ubuntu.com/karmic/libc6-dev) *** CORRECTION TO ENVIRONMENT *** I'm terribly sorry for my mistake. I've given details of my other machine/system. Here are correct details of system on which the problem leaks and on which I prepared the two test programs: * Linux Ubuntu 9.04 32-bit * GCC 4.3.3 * glibc 2.9-4ubuntu (http://packages.ubuntu.com/jaunty/libc6-dev) * Comeau C/C++ Compiler front-end 4.3.10.1 I've also changed the glibc version to which this report applies from 2.10 to 2.9. I'm sorry for confusion. stdint.h is a C99 header and C99 demands the implementation of long long. The headers are correct. The point here is that stdint.h behaves differently depending upon what has been #included previously, for example: #include <sys/types.h> // possibly included from some deep dependency #include <stdint.h> May *NOT* result in int64_t being defined if __GLIBC_HAVE_LONG_LONG is not set, where as had stdint.h been the first include then it *would* have been defined. In other words stdint.h may not follow the C99 std depending upon what has happened to be included previously. Still think it's not a bug? IMO stdint.h should always define int64_t no matter what other headers may have been included first. John Maddock. You cannot have __GLIBC_HAVE_LONG_LONG *not* be defined if you include stdint.h. *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |