diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-02-13 18:31:14 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-02-13 18:31:14 +0000 |
commit | 90b6943f0a77fe847ccc8037447ee56a796a1915 (patch) | |
tree | 5991cf54ea093cb5af534d3acdf7e012ac219b81 /libc/sysdeps/unix | |
parent | 75b72fe085a17b1448190cb9d5cd31124320f3a3 (diff) | |
download | eglibc2-90b6943f0a77fe847ccc8037447ee56a796a1915.tar.gz |
Merge changes between r7867 and r7922 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@7923 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix')
-rw-r--r-- | libc/sysdeps/unix/opendir.c | 40 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/i386/bits/environments.h | 24 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/lddlibc4.c | 13 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/ldsodefs.h | 22 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h | 28 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/s390/bits/environments.h | 28 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h | 28 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h | 28 |
8 files changed, 135 insertions, 76 deletions
diff --git a/libc/sysdeps/unix/opendir.c b/libc/sysdeps/unix/opendir.c index 92029c654..fbf14f5ee 100644 --- a/libc/sysdeps/unix/opendir.c +++ b/libc/sysdeps/unix/opendir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1996,98,2000-2003,2005,2007 +/* Copyright (C) 1991-1996,98,2000-2003,2005,2007,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -81,6 +81,7 @@ DIR * __opendir (const char *name) { struct stat64 statbuf; + struct stat64 *statp = NULL; if (__builtin_expect (name[0], '\1') == '\0') { @@ -119,16 +120,14 @@ __opendir (const char *name) if (__builtin_expect (fd, 0) < 0) return NULL; - /* Now make sure this really is a directory and nothing changed since - the `stat' call. We do not have to perform the test for the - descriptor being associated with a directory if we know the - O_DIRECTORY flag is honored by the kernel. */ - if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0) - goto lose; #ifdef O_DIRECTORY if (o_directory_works <= 0) #endif { + /* Now make sure this really is a directory and nothing changed since + the `stat' call. */ + if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0) + goto lose; if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0)) { __set_errno (ENOTDIR); @@ -136,9 +135,10 @@ __opendir (const char *name) close_not_cancel_no_status (fd); return NULL; } + statp = &statbuf; } - return __alloc_dir (fd, true, &statbuf); + return __alloc_dir (fd, true, statp); } weak_alias (__opendir, opendir) @@ -171,29 +171,23 @@ __alloc_dir (int fd, bool close_fd, const struct stat64 *statp) goto lose; } - const size_t default_allocation = (BUFSIZ < sizeof (struct dirent64) - ? sizeof (struct dirent64) : BUFSIZ); - size_t allocation; + const size_t default_allocation = (4 * BUFSIZ < sizeof (struct dirent64) + ? sizeof (struct dirent64) : 4 * BUFSIZ); + const size_t small_allocation = (BUFSIZ < sizeof (struct dirent64) + ? sizeof (struct dirent64) : BUFSIZ); + size_t allocation = default_allocation; #ifdef _STATBUF_ST_BLKSIZE - if (__builtin_expect ((size_t) statp->st_blksize >= sizeof (struct dirent64), - 1)) + if (statp != NULL && default_allocation < statp->st_blksize) allocation = statp->st_blksize; - else #endif - allocation = default_allocation; DIR *dirp = (DIR *) malloc (sizeof (DIR) + allocation); if (dirp == NULL) { -#ifdef _STATBUF_ST_BLKSIZE - if (allocation == statp->st_blksize - && allocation != default_allocation) - { - allocation = default_allocation; - dirp = (DIR *) malloc (sizeof (DIR) + allocation); - } + allocation = small_allocation; + dirp = (DIR *) malloc (sizeof (DIR) + allocation); + if (dirp == NULL) -#endif lose: { if (close_fd) diff --git a/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h b/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h index 16f7732aa..785dd7e8f 100644 --- a/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h +++ b/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,29 +25,35 @@ `-1' means it is never supported. Undefined means it cannot be statically decided. - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. */ /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ +#define _POSIX_V7_ILP32_OFF32 1 +#define _POSIX_V7_ILP32_OFFBIG 1 #define _POSIX_V6_ILP32_OFF32 1 #define _POSIX_V6_ILP32_OFFBIG 1 #define _XBS5_ILP32_OFF32 1 #define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 diff --git a/libc/sysdeps/unix/sysv/linux/lddlibc4.c b/libc/sysdeps/unix/sysv/linux/lddlibc4.c index b7dd660f5..c4b9b44fa 100644 --- a/libc/sysdeps/unix/sysv/linux/lddlibc4.c +++ b/libc/sysdeps/unix/sysv/linux/lddlibc4.c @@ -1,5 +1,5 @@ /* Stub for ldd script to print Linux libc4 dependencies. - Copyright (C) 1998, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -56,22 +56,21 @@ main (int argc, char *argv[]) if (argc != 2) return 1; - if (!strcmp (argv[1], "--help")) + if (strcmp (argv[1], "--help") == 0) { - printf (gettext ("Usage: lddlibc4 FILE\n\ -\n\ -For bug reporting instructions, please see:\n\ + printf (gettext ("Usage: lddlibc4 FILE\n\n")); + printf (gettext ("For bug reporting instructions, please see:\n\ %s.\n"), REPORT_BUGS_TO); return 0; } - else if (!strcmp (argv[1], "--version")) + else if (strcmp (argv[1], "--version") == 0) { printf ("lddlibc4 %s%s\n", PKGVERSION, VERSION); printf (gettext ("\ Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2008"); +"), "2009"); return 0; } diff --git a/libc/sysdeps/unix/sysv/linux/ldsodefs.h b/libc/sysdeps/unix/sysv/linux/ldsodefs.h index 0bdca3c3f..0965f1496 100644 --- a/libc/sysdeps/unix/sysv/linux/ldsodefs.h +++ b/libc/sysdeps/unix/sysv/linux/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -53,4 +53,24 @@ extern void _dl_non_dynamic_init (void) internal_function; # define HAVE_AUX_PAGESIZE #endif +/* Accept binaries which identify the binary as using Linux extensions. */ +#define VALID_ELF_HEADER(hdr,exp,size) (memcmp (hdr, exp, size) == 0 \ + || memcmp (hdr, expected2, size) == 0) +#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \ + || osabi == ELFOSABI_LINUX) +#define VALID_ELF_ABIVERSION(ver) (ver == 0) +#define MORE_ELF_HEADER_DATA \ + static const unsigned char expected2[EI_PAD] = \ + { \ + [EI_MAG0] = ELFMAG0, \ + [EI_MAG1] = ELFMAG1, \ + [EI_MAG2] = ELFMAG2, \ + [EI_MAG3] = ELFMAG3, \ + [EI_CLASS] = ELFW(CLASS), \ + [EI_DATA] = byteorder, \ + [EI_VERSION] = EV_CURRENT, \ + [EI_OSABI] = ELFOSABI_LINUX, \ + [EI_ABIVERSION] = 0 \ + } + #endif /* ldsodefs.h */ diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h b/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h index a51a564cb..c675ecc62 100644 --- a/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h +++ b/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,21 +27,25 @@ `-1' means it is never supported. Undefined means it cannot be statically decided. - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 @@ -50,10 +54,12 @@ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 @@ -61,16 +67,20 @@ /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFF32 1 # define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h b/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h index 713d21c9a..29628b2ed 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h +++ b/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,21 +27,25 @@ `-1' means it is never supported. Undefined means it cannot be statically decided. - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 @@ -50,10 +54,12 @@ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 @@ -61,16 +67,20 @@ /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFF32 1 # define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h index a51a564cb..c675ecc62 100644 --- a/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h +++ b/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,21 +27,25 @@ `-1' means it is never supported. Undefined means it cannot be statically decided. - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 @@ -50,10 +54,12 @@ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 @@ -61,16 +67,20 @@ /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFF32 1 # define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h b/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h index a51a564cb..c675ecc62 100644 --- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h +++ b/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,21 +27,25 @@ `-1' means it is never supported. Undefined means it cannot be statically decided. - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 @@ -50,10 +54,12 @@ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 @@ -61,16 +67,20 @@ /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFF32 1 # define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 |