This is the mail archive of the glibc-bugs@sourceware.org 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/4495] New: _POSIX_V6_ILP32_OFFBIG shouldn't be defined for __WORDSIZE == 32


in bits/environments.h: 

#if __WORDSIZE == 32
# define _POSIX_V6_ILP32_OFFBIG	1
# define _XBS5_ILP32_OFFBIG	1
#endif

then comment:

/* We optionally provide an environment with the above size but an 64-bit
   side `off_t'.  Therefore we don't define _XBS5_ILP32_OFFBIG.  */

The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition:
_POSIX_V6_ILP32_OFFBIG
    The implementation provides a C-language compilation environment with 32-bit
int, long, and pointer types and an off_t type using at least 64 bits.

also from stdint.h chapter in POSIX specification:
If an implementation provides integer types with width 64 that meet these
requirements, then the following types are required: int64_t uint64_t

In particular, this will be the case if any of the following are true:
      The implementation supports the _POSIX_V6_ILP32_OFFBIG programming
environment and the application is being built in the _POSIX_V6_ILP32_OFFBIG
programming environment (see the Shell and Utilities volume of IEEE Std
1003.1-2001, c99, Programming Environments).
...

My understanding:
If _POSIX_V6_ILP32_OFFBIG is defined then 64bit types are available, off_t will
be at least 64bits long. Same probably applies to _XBS5_ILP32_OFFBIG. All this
seems to be confirmed by the _XBS5_ILP32_OFFBIG comment quoted.

Suggestion:
Either undef both of these macros or
#if __WORDSIZE == 32
# define _POSIX_V6_ILP32_OFFBIG	-1
# define _XBS5_ILP32_OFFBIG	-1
#endif

-- 
           Summary: _POSIX_V6_ILP32_OFFBIG shouldn't be defined for
                    __WORDSIZE == 32
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: mfundarek at nds dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=4495

------- 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]