[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7881 - in /fsf/trunk/libc: ./ bits/ grp/ include/ malloc/ posix/ sunrpc/ sysdeps/posix/ sysdeps/unix/sysv/linux/i386/bits/ ...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7881 - in /fsf/trunk/libc: ./ bits/ grp/ include/ malloc/ posix/ sunrpc/ sysdeps/posix/ sysdeps/unix/sysv/linux/i386/bits/ ...
- From: eglibc@xxxxxxxxxx
- Date: Sun, 08 Feb 2009 08:11:34 -0000
Author: eglibc
Date: Sun Feb 8 00:11:33 2009
New Revision: 7881
Log:
Import glibc-mainline for 2009-02-08
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/bits/confname.h
fsf/trunk/libc/bits/environments.h
fsf/trunk/libc/grp/compat-initgroups.c
fsf/trunk/libc/include/malloc.h
fsf/trunk/libc/malloc/arena.c
fsf/trunk/libc/malloc/hooks.c
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/posix/Makefile
fsf/trunk/libc/posix/confstr.c
fsf/trunk/libc/posix/getconf.c
fsf/trunk/libc/posix/sysconf.c
fsf/trunk/libc/sunrpc/rpc_common.c
fsf/trunk/libc/sysdeps/posix/sysconf.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Feb 8 00:11:33 2009
@@ -1,3 +1,39 @@
+2009-02-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * malloc/malloc.c (_int_free): Second argument is now mchunkptr.
+ Change all callers.
+ (_int_realloc): Likewise. Third argument is now padded size
+ All _int_* functions are now static.
+
+ * malloc/hooks.c: Change all callers to _int_free and _int_realloc.
+ * malloc/arena.c: Likewise.
+ * include/malloc.h: Remove now unnecessary declarations of the _int_*
+ functions.
+
+ * sunrpc/rpc_common.c: We cannot move _null_auth into .rodata that
+ easily.
+
+ * malloc/malloc.c: Add branch prediction for use of the hooks.
+
+ * grp/compat-initgroups.c [NOT_IN_libc] (__libc_use_alloca): Define.
+
+2009-02-06 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #7095]
+ * bits/confname.h: Add SUSv7 macros for getconf environments.
+ * bits/environments.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/bits/environments.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/environments.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/environments.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/environments.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Likewise.
+ * posix/confstr.c: Handle SUSv5 and SUSv7 environments.
+ * posix/getconf.c: Likewise.
+ * posix/sysconf.c: Likewise.
+ * sysdeps/posix/sysconf.c: Likewise.
+ * posix/Makefile (getconf.speclist): Also collect SUSv5 and SUSv7
+ environments.
+
2009-01-16 Petr Baudis <pasky@xxxxxxx>
[BZ #9753]
Modified: fsf/trunk/libc/bits/confname.h
==============================================================================
--- fsf/trunk/libc/bits/confname.h (original)
+++ fsf/trunk/libc/bits/confname.h Sun Feb 8 00:11:33 2009
@@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
- Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007
+ Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -498,8 +498,17 @@
_SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
#define _SC_IPV6 _SC_IPV6
- _SC_RAW_SOCKETS
+ _SC_RAW_SOCKETS,
#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
+
+ _SC_V7_ILP32_OFF32,
+#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
+ _SC_V7_ILP32_OFFBIG,
+#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
+ _SC_V7_LP64_OFF64,
+#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
+ _SC_V7_LPBIG_OFFBIG,
+#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
};
/* Values for the NAME argument to `confstr'. */
@@ -516,6 +525,14 @@
#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION,
#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
+
+ _CS_V5_WIDTH_RESTRICTED_ENVS,
+#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
+#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
+
+ _CS_V7_WIDTH_RESTRICTED_ENVS,
+#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
+#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
_CS_LFS_CFLAGS = 1000,
#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
@@ -597,6 +614,39 @@
#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
- _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
+ _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
+
+ _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
+#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
+ _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
+#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
+ _CS_POSIX_V7_ILP32_OFF32_LIBS,
+#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
+ _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
+#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
+ _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
+#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
+ _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
+#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
+ _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
+#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
+ _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
+#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
+ _CS_POSIX_V7_LP64_OFF64_CFLAGS,
+#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
+ _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
+#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
+ _CS_POSIX_V7_LP64_OFF64_LIBS,
+#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
+ _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
+#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
+ _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
+#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
+ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
+#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
+ _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
+#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
+ _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
+#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
};
Modified: fsf/trunk/libc/bits/environments.h
==============================================================================
--- fsf/trunk/libc/bits/environments.h (original)
+++ fsf/trunk/libc/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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,30 +27,36 @@
`-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
/* We can never provide environments with 32-bit wide pointers. */
+# 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 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
@@ -58,15 +64,19 @@
/* 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. */
/* We can never provide environments with 64-bit wide pointers. */
+# define _POSIX_V7_LP64_OFF64 -1
+# define _POSIX_V7_LPBIG_OFFBIG -1
# define _POSIX_V6_LP64_OFF64 -1
# define _POSIX_V6_LPBIG_OFFBIG -1
# define _XBS5_LP64_OFF64 -1
Modified: fsf/trunk/libc/grp/compat-initgroups.c
==============================================================================
--- fsf/trunk/libc/grp/compat-initgroups.c (original)
+++ fsf/trunk/libc/grp/compat-initgroups.c Sun Feb 8 00:11:33 2009
@@ -7,6 +7,13 @@
/* Prototype for the setgrent functions we use here. */
typedef enum nss_status (*get_function) (struct group *, char *,
size_t, int *);
+
+/* This file is also used in nscd where __libc_alloca_cutoff is not
+ available. */
+#ifdef NOT_IN_libc
+# define __libc_use_alloca(size) ((size) < __MAX_ALLOCA_CUTOFF * 4)
+#endif
+
static enum nss_status
compat_call (service_user *nip, const char *user, gid_t group, long int *start,
Modified: fsf/trunk/libc/include/malloc.h
==============================================================================
--- fsf/trunk/libc/include/malloc.h (original)
+++ fsf/trunk/libc/include/malloc.h Sun Feb 8 00:11:33 2009
@@ -8,20 +8,7 @@
/* Nonzero if the malloc is already initialized. */
extern int __malloc_initialized attribute_hidden;
-/* Internal routines, operating on "arenas". */
struct malloc_state;
typedef struct malloc_state *mstate;
-extern __malloc_ptr_t _int_malloc (mstate __m, size_t __size) attribute_hidden;
-extern void _int_free (mstate __m, __malloc_ptr_t __ptr)
- attribute_hidden;
-extern __malloc_ptr_t _int_realloc (mstate __m,
- __malloc_ptr_t __ptr,
- size_t __size) attribute_hidden;
-extern __malloc_ptr_t _int_memalign (mstate __m, size_t __alignment,
- size_t __size)
- attribute_hidden;
-extern __malloc_ptr_t _int_valloc (mstate __m, size_t __size)
- attribute_hidden;
-
#endif
Modified: fsf/trunk/libc/malloc/arena.c
==============================================================================
--- fsf/trunk/libc/malloc/arena.c (original)
+++ fsf/trunk/libc/malloc/arena.c Sun Feb 8 00:11:33 2009
@@ -223,7 +223,7 @@
tsd_getspecific(arena_key, vptr);
if(vptr != ATFORK_ARENA_PTR)
(void)mutex_lock(&ar_ptr->mutex);
- _int_free(ar_ptr, mem);
+ _int_free(ar_ptr, p);
if(vptr != ATFORK_ARENA_PTR)
(void)mutex_unlock(&ar_ptr->mutex);
}
Modified: fsf/trunk/libc/malloc/hooks.c
==============================================================================
--- fsf/trunk/libc/malloc/hooks.c (original)
+++ fsf/trunk/libc/malloc/hooks.c Sun Feb 8 00:11:33 2009
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001-2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@xxxxxxxxx>, 2001.
@@ -293,7 +293,7 @@
#if 0 /* Erase freed memory. */
memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
#endif
- _int_free(&main_arena, mem);
+ _int_free(&main_arena, p);
(void)mutex_unlock(&main_arena.mutex);
}
@@ -305,8 +305,7 @@
Void_t* oldmem; size_t bytes; const Void_t *caller;
#endif
{
- mchunkptr oldp;
- INTERNAL_SIZE_T nb, oldsize;
+ INTERNAL_SIZE_T nb;
Void_t* newmem = 0;
unsigned char *magic_p;
@@ -320,13 +319,13 @@
return NULL;
}
(void)mutex_lock(&main_arena.mutex);
- oldp = mem2chunk_check(oldmem, &magic_p);
+ const mchunkptr oldp = mem2chunk_check(oldmem, &magic_p);
(void)mutex_unlock(&main_arena.mutex);
if(!oldp) {
malloc_printerr(check_action, "realloc(): invalid pointer", oldmem);
return malloc_check(bytes, NULL);
}
- oldsize = chunksize(oldp);
+ const INTERNAL_SIZE_T oldsize = chunksize(oldp);
checked_request2size(bytes+1, nb);
(void)mutex_lock(&main_arena.mutex);
@@ -355,8 +354,11 @@
}
} else {
#endif /* HAVE_MMAP */
- if (top_check() >= 0)
- newmem = _int_realloc(&main_arena, oldmem, bytes+1);
+ if (top_check() >= 0) {
+ INTERNAL_SIZE_T nb;
+ checked_request2size(bytes + 1, nb);
+ newmem = _int_realloc(&main_arena, oldp, nb);
+ }
#if 0 /* Erase freed memory. */
if(newmem)
newp = mem2chunk(newmem);
@@ -470,7 +472,7 @@
return;
}
#endif
- _int_free(&main_arena, mem);
+ _int_free(&main_arena, p);
}
# endif /* !defiend NO_STARTER */
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Sun Feb 8 00:11:33 2009
@@ -1581,11 +1581,11 @@
#if __STD_C
-Void_t* _int_malloc(mstate, size_t);
-void _int_free(mstate, Void_t*);
-Void_t* _int_realloc(mstate, Void_t*, size_t);
-Void_t* _int_memalign(mstate, size_t, size_t);
-Void_t* _int_valloc(mstate, size_t);
+static Void_t* _int_malloc(mstate, size_t);
+static void _int_free(mstate, mchunkptr);
+static Void_t* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T);
+static Void_t* _int_memalign(mstate, size_t, size_t);
+static Void_t* _int_valloc(mstate, size_t);
static Void_t* _int_pvalloc(mstate, size_t);
/*static Void_t* cALLOc(size_t, size_t);*/
#ifndef _LIBC
@@ -1632,12 +1632,12 @@
#else
-Void_t* _int_malloc();
-void _int_free();
-Void_t* _int_realloc();
-Void_t* _int_memalign();
-Void_t* _int_valloc();
-Void_t* _int_pvalloc();
+static Void_t* _int_malloc();
+static void _int_free();
+static Void_t* _int_realloc();
+static Void_t* _int_memalign();
+static Void_t* _int_valloc();
+static Void_t* _int_pvalloc();
/*static Void_t* cALLOc();*/
static Void_t** _int_icalloc();
static Void_t** _int_icomalloc();
@@ -3084,7 +3084,7 @@
set_head(chunk_at_offset(old_top, old_size), (2*SIZE_SZ)|PREV_INUSE);
set_foot(chunk_at_offset(old_top, old_size), (2*SIZE_SZ));
set_head(old_top, old_size|PREV_INUSE|NON_MAIN_ARENA);
- _int_free(av, chunk2mem(old_top));
+ _int_free(av, old_top);
} else {
set_head(old_top, (old_size + 2*SIZE_SZ)|PREV_INUSE);
set_foot(old_top, (old_size + 2*SIZE_SZ));
@@ -3131,7 +3131,7 @@
if (brk != (char*)(MORECORE_FAILURE)) {
/* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
+ if (__builtin_expect (__after_morecore_hook != NULL, 0))
(*__after_morecore_hook) ();
} else {
/*
@@ -3270,7 +3270,7 @@
snd_brk = (char*)(MORECORE(0));
} else
/* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
+ if (__builtin_expect (__after_morecore_hook != NULL, 0))
(*__after_morecore_hook) ();
}
@@ -3323,7 +3323,7 @@
/* If possible, release the rest. */
if (old_size >= MINSIZE) {
- _int_free(av, chunk2mem(old_top));
+ _int_free(av, old_top);
}
}
@@ -3415,7 +3415,7 @@
MORECORE(-extra);
/* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
+ if (__builtin_expect (__after_morecore_hook != NULL, 0))
(*__after_morecore_hook) ();
new_brk = (char*)(MORECORE(0));
@@ -3542,7 +3542,7 @@
Void_t *victim;
__malloc_ptr_t (*hook) (size_t, __const __malloc_ptr_t) = __malloc_hook;
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
return (*hook)(bytes, RETURN_ADDRESS (0));
arena_get(ar_ptr, bytes);
@@ -3585,7 +3585,7 @@
mchunkptr p; /* chunk corresponding to mem */
void (*hook) (__malloc_ptr_t, __const __malloc_ptr_t) = __free_hook;
- if (hook != NULL) {
+ if (__builtin_expect (hook != NULL, 0)) {
(*hook)(mem, RETURN_ADDRESS (0));
return;
}
@@ -3622,7 +3622,7 @@
#else
(void)mutex_lock(&ar_ptr->mutex);
#endif
- _int_free(ar_ptr, mem);
+ _int_free(ar_ptr, p);
(void)mutex_unlock(&ar_ptr->mutex);
}
#ifdef libc_hidden_def
@@ -3635,14 +3635,11 @@
mstate ar_ptr;
INTERNAL_SIZE_T nb; /* padded request size */
- mchunkptr oldp; /* chunk corresponding to oldmem */
- INTERNAL_SIZE_T oldsize; /* its size */
-
Void_t* newp; /* chunk to return */
__malloc_ptr_t (*hook) (__malloc_ptr_t, size_t, __const __malloc_ptr_t) =
__realloc_hook;
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
return (*hook)(oldmem, bytes, RETURN_ADDRESS (0));
#if REALLOC_ZERO_BYTES_FREES
@@ -3652,8 +3649,10 @@
/* realloc of null is supposed to be same as malloc */
if (oldmem == 0) return public_mALLOc(bytes);
- oldp = mem2chunk(oldmem);
- oldsize = chunksize(oldp);
+ /* chunk corresponding to oldmem */
+ const mchunkptr oldp = mem2chunk(oldmem);
+ /* its size */
+ const INTERNAL_SIZE_T oldsize = chunksize(oldp);
/* Little security check which won't hurt performance: the
allocator never wrapps around at the end of the address space.
@@ -3705,7 +3704,7 @@
tsd_setspecific(arena_key, (Void_t *)ar_ptr);
#endif
- newp = _int_realloc(ar_ptr, oldmem, bytes);
+ newp = _int_realloc(ar_ptr, oldp, nb);
(void)mutex_unlock(&ar_ptr->mutex);
assert(!newp || chunk_is_mmapped(mem2chunk(newp)) ||
@@ -3728,7 +3727,7 @@
#else
(void)mutex_lock(&ar_ptr->mutex);
#endif
- _int_free(ar_ptr, oldmem);
+ _int_free(ar_ptr, oldp);
(void)mutex_unlock(&ar_ptr->mutex);
}
}
@@ -3748,7 +3747,7 @@
__malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
__const __malloc_ptr_t)) =
__memalign_hook;
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
return (*hook)(alignment, bytes, RETURN_ADDRESS (0));
/* If need less alignment than we give anyway, just relay to malloc */
@@ -3805,7 +3804,7 @@
__malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
__const __malloc_ptr_t)) =
__memalign_hook;
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
return (*hook)(pagesz, bytes, RETURN_ADDRESS (0));
arena_get(ar_ptr, bytes + pagesz + MINSIZE);
@@ -3852,7 +3851,7 @@
__malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
__const __malloc_ptr_t)) =
__memalign_hook;
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
return (*hook)(pagesz, rounded_bytes, RETURN_ADDRESS (0));
arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE);
@@ -3906,7 +3905,7 @@
}
}
- if (hook != NULL) {
+ if (__builtin_expect (hook != NULL, 0)) {
sz = bytes;
mem = (*hook)(sz, RETURN_ADDRESS (0));
if(mem == 0)
@@ -4125,7 +4124,7 @@
------------------------------ malloc ------------------------------
*/
-Void_t*
+static Void_t*
_int_malloc(mstate av, size_t bytes)
{
INTERNAL_SIZE_T nb; /* normalized request size */
@@ -4589,10 +4588,9 @@
------------------------------ free ------------------------------
*/
-void
-_int_free(mstate av, Void_t* mem)
+static void
+_int_free(mstate av, mchunkptr p)
{
- mchunkptr p; /* chunk corresponding to mem */
INTERNAL_SIZE_T size; /* its size */
mfastbinptr* fb; /* associated fastbin */
mchunkptr nextchunk; /* next contiguous chunk */
@@ -4604,7 +4602,6 @@
const char *errstr = NULL;
- p = mem2chunk(mem);
size = chunksize(p);
/* Little security check which won't hurt performance: the
@@ -4616,7 +4613,7 @@
{
errstr = "free(): invalid pointer";
errout:
- malloc_printerr (check_action, errstr, mem);
+ malloc_printerr (check_action, errstr, chunk2mem(p));
return;
}
/* We know that each chunk is at least MINSIZE bytes in size. */
@@ -4663,7 +4660,7 @@
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (mem, size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - SIZE_SZ);
p->fd = *fb;
*fb = p;
@@ -4707,7 +4704,7 @@
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (mem, size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - SIZE_SZ);
/* consolidate backward */
if (!prev_inuse(p)) {
@@ -4943,13 +4940,8 @@
*/
Void_t*
-_int_realloc(mstate av, Void_t* oldmem, size_t bytes)
+_int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T nb)
{
- INTERNAL_SIZE_T nb; /* padded request size */
-
- mchunkptr oldp; /* chunk corresponding to oldmem */
- INTERNAL_SIZE_T oldsize; /* its size */
-
mchunkptr newp; /* chunk to return */
INTERNAL_SIZE_T newsize; /* its size */
Void_t* newmem; /* corresponding user mem */
@@ -4968,21 +4960,19 @@
INTERNAL_SIZE_T* d; /* copy destination */
const char *errstr = NULL;
-
-
- checked_request2size(bytes, nb);
-
- oldp = mem2chunk(oldmem);
- oldsize = chunksize(oldp);
/* Simple tests for old block integrity. */
if (__builtin_expect (misaligned_chunk (oldp), 0))
{
errstr = "realloc(): invalid pointer";
errout:
- malloc_printerr (check_action, errstr, oldmem);
+ malloc_printerr (check_action, errstr, chunk2mem(oldp));
return NULL;
}
+
+ /* oldmem size */
+ const INTERNAL_SIZE_T oldsize = chunksize(oldp);
+
if (__builtin_expect (oldp->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (oldsize >= av->system_mem, 0))
{
@@ -5054,7 +5044,7 @@
*/
copysize = oldsize - SIZE_SZ;
- s = (INTERNAL_SIZE_T*)(oldmem);
+ s = (INTERNAL_SIZE_T*)(chunk2mem(oldp));
d = (INTERNAL_SIZE_T*)(newmem);
ncopies = copysize / sizeof(INTERNAL_SIZE_T);
assert(ncopies >= 3);
@@ -5080,7 +5070,7 @@
}
}
- _int_free(av, oldmem);
+ _int_free(av, oldp);
check_inuse_chunk(av, newp);
return chunk2mem(newp);
}
@@ -5104,7 +5094,7 @@
(av != &main_arena ? NON_MAIN_ARENA : 0));
/* Mark remainder as inuse so free() won't complain */
set_inuse_bit_at_offset(remainder, remainder_size);
- _int_free(av, chunk2mem(remainder));
+ _int_free(av, remainder);
}
check_inuse_chunk(av, newp);
@@ -5129,7 +5119,7 @@
/* don't need to remap if still within same page */
if (oldsize == newsize - offset)
- return oldmem;
+ return chunk2mem(oldp);
cp = (char*)mremap((char*)oldp - offset, oldsize + offset, newsize, 1);
@@ -5157,13 +5147,13 @@
/* Note the extra SIZE_SZ overhead. */
if ((unsigned long)(oldsize) >= (unsigned long)(nb + SIZE_SZ))
- newmem = oldmem; /* do nothing */
+ newmem = chunk2mem(oldp); /* do nothing */
else {
/* Must alloc, copy, free. */
newmem = _int_malloc(av, nb - MALLOC_ALIGN_MASK);
if (newmem != 0) {
- MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ);
- _int_free(av, oldmem);
+ MALLOC_COPY(newmem, chunk2mem(oldp), oldsize - 2*SIZE_SZ);
+ _int_free(av, oldp);
}
}
return newmem;
@@ -5181,7 +5171,7 @@
------------------------------ memalign ------------------------------
*/
-Void_t*
+static Void_t*
_int_memalign(mstate av, size_t alignment, size_t bytes)
{
INTERNAL_SIZE_T nb; /* padded request size */
@@ -5257,7 +5247,7 @@
(av != &main_arena ? NON_MAIN_ARENA : 0));
set_inuse_bit_at_offset(newp, newsize);
set_head_size(p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
- _int_free(av, chunk2mem(p));
+ _int_free(av, p);
p = newp;
assert (newsize >= nb &&
@@ -5273,7 +5263,7 @@
set_head(remainder, remainder_size | PREV_INUSE |
(av != &main_arena ? NON_MAIN_ARENA : 0));
set_head_size(p, nb);
- _int_free(av, chunk2mem(remainder));
+ _int_free(av, remainder);
}
}
@@ -5514,7 +5504,7 @@
------------------------------ valloc ------------------------------
*/
-Void_t*
+static Void_t*
#if __STD_C
_int_valloc(mstate av, size_t bytes)
#else
@@ -5531,7 +5521,7 @@
*/
-Void_t*
+static Void_t*
#if __STD_C
_int_pvalloc(mstate av, size_t bytes)
#else
@@ -6020,7 +6010,7 @@
/* Call the hook here, so that caller is posix_memalign's caller
and not posix_memalign itself. */
- if (hook != NULL)
+ if (__builtin_expect (hook != NULL, 0))
mem = (*hook)(alignment, size, RETURN_ADDRESS (0));
else
mem = public_mEMALIGn (alignment, size);
Modified: fsf/trunk/libc/posix/Makefile
==============================================================================
--- fsf/trunk/libc/posix/Makefile (original)
+++ fsf/trunk/libc/posix/Makefile Sun Feb 8 00:11:33 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-1999, 2000-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-1999, 2000-2006, 2007, 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
@@ -304,7 +304,11 @@
$(objpfx)getconf.speclist: $(objpfx)getconf
ifeq (no,$(cross-compiling))
LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
+ $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
+ LC_ALL=C GETCONF_DIR=/dev/null \
+ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
+ LC_ALL=C GETCONF_DIR=/dev/null \
+ $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
else
> $@.new
endif
Modified: fsf/trunk/libc/posix/confstr.c
==============================================================================
--- fsf/trunk/libc/posix/confstr.c (original)
+++ fsf/trunk/libc/posix/confstr.c Sun Feb 8 00:11:33 2009
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997, 2000-2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,2000-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
@@ -46,6 +45,69 @@
}
break;
+ case _CS_V7_WIDTH_RESTRICTED_ENVS:
+ /* We have to return a newline-separated list of named of
+ programming environements in which the widths of blksize_t,
+ cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t,
+ ssize_t, suseconds_t, tcflag_t, useconds_t, wchar_t, and
+ wint_t types are no greater than the width of type long.
+
+ Currently this means all environment which the system allows. */
+ {
+ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
+
+ string_len = 0;
+#ifndef _POSIX_V7_ILP32_OFF32
+ if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
+#endif
+#if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
+ {
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
+ sizeof "POSIX_V7_ILP32_OFF32" - 1);
+ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
+ }
+#endif
+#ifndef _POSIX_V7_ILP32_OFFBIG
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
+#endif
+#if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
+ sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
+ }
+#endif
+#ifndef _POSIX_V7_LP64_OFF64
+ if (__sysconf (_SC_V7_LP64_OFF64) > 0)
+#endif
+#if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
+ sizeof "POSIX_V7_LP64_OFF64" - 1);
+ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
+ }
+#endif
+#ifndef _POSIX_V7_LPBIG_OFFBIG
+ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
+#endif
+#if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
+ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
+ }
+#endif
+ restenvs[string_len++] = '\0';
+ string = restenvs;
+ }
+ break;
+
case _CS_V6_WIDTH_RESTRICTED_ENVS:
/* We have to return a newline-separated list of named of
programming environements in which the widths of blksize_t,
@@ -109,13 +171,77 @@
}
break;
+ case _CS_V5_WIDTH_RESTRICTED_ENVS:
+ /* We have to return a newline-separated list of named of
+ programming environements in which the widths of blksize_t,
+ cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t,
+ ssize_t, suseconds_t, tcflag_t, useconds_t, wchar_t, and
+ wint_t types are no greater than the width of type long.
+
+ Currently this means all environment which the system allows. */
+ {
+ char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
+
+ string_len = 0;
+#ifndef _XBS5_ILP32_OFF32
+ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
+#endif
+#if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
+ {
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
+ sizeof "XBS5_ILP32_OFF32" - 1);
+ string_len += sizeof "XBS5_ILP32_OFF32" - 1;
+ }
+#endif
+#ifndef _XBS5_ILP32_OFFBIG
+ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
+#endif
+#if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
+ sizeof "XBS5_ILP32_OFFBIG" - 1);
+ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
+ }
+#endif
+#ifndef _XBS5_LP64_OFF64
+ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
+#endif
+#if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
+ sizeof "XBS5_LP64_OFF64" - 1);
+ string_len += sizeof "XBS5_LP64_OFF64" - 1;
+ }
+#endif
+#ifndef _XBS5_LPBIG_OFFBIG
+ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
+#endif
+#if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
+ sizeof "XBS5_LPBIG_OFFBIG" - 1);
+ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
+ }
+#endif
+ restenvs[string_len++] = '\0';
+ string = restenvs;
+ }
+ break;
+
case _CS_XBS5_ILP32_OFF32_CFLAGS:
case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+ case _CS_POSIX_V7_ILP32_OFF32_CFLAGS:
#ifdef __ILP32_OFF32_CFLAGS
-# if _POSIX_V6_ILP32_OFF32 == -1
+# if _POSIX_V7_ILP32_OFF32 == -1
# error "__ILP32_OFF32_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFF32
- if (__sysconf (_SC_V6_ILP32_OFF32) < 0)
+# elif !defined _POSIX_V7_ILP32_OFF32
+ if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
break;
# endif
string = __ILP32_OFF32_CFLAGS;
@@ -125,11 +251,12 @@
case _CS_XBS5_ILP32_OFFBIG_CFLAGS:
case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+ case _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS:
#ifdef __ILP32_OFFBIG_CFLAGS
-# if _POSIX_V6_ILP32_OFFBIG == -1
+# if _POSIX_V7_ILP32_OFFBIG == -1
# error "__ILP32_OFFBIG_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFFBIG
- if (__sysconf (_SC_V6_ILP32_OFFBIG) < 0)
+# elif !defined _POSIX_V7_ILP32_OFFBIG
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
break;
# endif
string = __ILP32_OFFBIG_CFLAGS;
@@ -139,11 +266,12 @@
case _CS_XBS5_LP64_OFF64_CFLAGS:
case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+ case _CS_POSIX_V7_LP64_OFF64_CFLAGS:
#ifdef __LP64_OFF64_CFLAGS
-# if _POSIX_V6_LP64_OFF64 == -1
+# if _POSIX_V7_LP64_OFF64 == -1
# error "__LP64_OFF64_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_LP64_OFF64
- if (__sysconf (_SC_V6_LP64_OFF64) < 0)
+# elif !defined _POSIX_V7_LP64_OFF64
+ if (__sysconf (_SC_V7_LP64_OFF64) < 0)
break;
# endif
string = __LP64_OFF64_CFLAGS;
@@ -153,11 +281,12 @@
case _CS_XBS5_ILP32_OFF32_LDFLAGS:
case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+ case _CS_POSIX_V7_ILP32_OFF32_LDFLAGS:
#ifdef __ILP32_OFF32_LDFLAGS
-# if _POSIX_V6_ILP32_OFF32 == -1
+# if _POSIX_V7_ILP32_OFF32 == -1
# error "__ILP32_OFF32_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFF32
- if (__sysconf (_SC_V6_ILP32_OFF32) < 0)
+# elif !defined _POSIX_V7_ILP32_OFF32
+ if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
break;
# endif
string = __ILP32_OFF32_LDFLAGS;
@@ -167,11 +296,12 @@
case _CS_XBS5_ILP32_OFFBIG_LDFLAGS:
case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+ case _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS:
#ifdef __ILP32_OFFBIG_LDFLAGS
-# if _POSIX_V6_ILP32_OFFBIG == -1
+# if _POSIX_V7_ILP32_OFFBIG == -1
# error "__ILP32_OFFBIG_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFFBIG
- if (__sysconf (_SC_V6_ILP32_OFFBIG) < 0)
+# elif !defined _POSIX_V7_ILP32_OFFBIG
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
break;
# endif
string = __ILP32_OFFBIG_LDFLAGS;
@@ -181,11 +311,12 @@
case _CS_XBS5_LP64_OFF64_LDFLAGS:
case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
+ case _CS_POSIX_V7_LP64_OFF64_LDFLAGS:
#ifdef __LP64_OFF64_LDFLAGS
-# if _POSIX_V6_LP64_OFF64 == -1
+# if _POSIX_V7_LP64_OFF64 == -1
# error "__LP64_OFF64_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_LP64_OFF64
- if (__sysconf (_SC_V6_LP64_OFF64) < 0)
+# elif !defined _POSIX_V7_LP64_OFF64
+ if (__sysconf (_SC_V7_LP64_OFF64) < 0)
break;
# endif
string = __LP64_OFF64_LDFLAGS;
@@ -241,6 +372,17 @@
case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
case _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS:
+
+ case _CS_POSIX_V7_ILP32_OFF32_LIBS:
+ case _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS:
+ case _CS_POSIX_V7_ILP32_OFFBIG_LIBS:
+ case _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS:
+ case _CS_POSIX_V7_LP64_OFF64_LIBS:
+ case _CS_POSIX_V7_LP64_OFF64_LINTFLAGS:
+ case _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS:
+ case _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS:
+ case _CS_POSIX_V7_LPBIG_OFFBIG_LIBS:
+ case _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS:
/* GNU libc does not require special actions to use LFS functions. */
break;
Modified: fsf/trunk/libc/posix/getconf.c
==============================================================================
--- fsf/trunk/libc/posix/getconf.c (original)
+++ fsf/trunk/libc/posix/getconf.c Sun Feb 8 00:11:33 2009
@@ -528,6 +528,11 @@
#endif
/* Programming environments. */
+#ifdef _CS_V5_WIDTH_RESTRICTED_ENVS
+ { "_XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR },
+ { "XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR },
+#endif
+
#ifdef _SC_XBS5_ILP32_OFF32
{ "_XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32, SYSCONF },
#endif
@@ -661,6 +666,75 @@
{ "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
#endif
+#ifdef _SC_V7_ILP32_OFF32
+ { "_POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_CFLAGS
+ { "POSIX_V7_ILP32_OFF32_CFLAGS", _CS_POSIX_V7_ILP32_OFF32_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
+ { "POSIX_V7_ILP32_OFF32_LDFLAGS", _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LIBS
+ { "POSIX_V7_ILP32_OFF32_LIBS", _CS_POSIX_V7_ILP32_OFF32_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
+ { "POSIX_V7_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _CS_V7_WIDTH_RESTRICTED_ENVS
+ { "_POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR },
+ { "POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_ILP32_OFFBIG
+ { "_POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LIBS
+ { "POSIX_V7_ILP32_OFFBIG_LIBS", _CS_POSIX_V7_ILP32_OFFBIG_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_LP64_OFF64
+ { "_POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_CFLAGS
+ { "POSIX_V7_LP64_OFF64_CFLAGS", _CS_POSIX_V7_LP64_OFF64_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LDFLAGS
+ { "POSIX_V7_LP64_OFF64_LDFLAGS", _CS_POSIX_V7_LP64_OFF64_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LIBS
+ { "POSIX_V7_LP64_OFF64_LIBS", _CS_POSIX_V7_LP64_OFF64_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
+ { "POSIX_V7_LP64_OFF64_LINTFLAGS", _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_LPBIG_OFFBIG
+ { "_POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
+ { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
+#endif
+
#ifdef _SC_ADVISORY_INFO
{ "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
#endif
@@ -926,12 +1000,20 @@
};
-static struct { const char *name; int num; } specs[] =
+static const struct { const char *name; int num; } specs[] =
{
+ { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32 },
+ { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG },
+ { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64 },
+ { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG },
{ "POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32 },
{ "POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG },
{ "POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64 },
- { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG }
+ { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG },
+ { "POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32 },
+ { "POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG },
+ { "POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64 },
+ { "POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG },
};
static const int nspecs = sizeof (specs) / sizeof (specs[0]);
@@ -948,6 +1030,7 @@
_(" %s -a [pathname]\n"), __progname);
exit (2);
}
+
static void
print_all (const char *path)
@@ -1082,6 +1165,18 @@
switch (specs[i].num)
{
+#ifndef _XBS5_ILP32_OFF32
+ case _SC_XBS5_ILP32_OFF32:
+#endif
+#ifndef _XBS5_ILP32_OFFBIG
+ case _SC_XBS5_ILP32_OFFBIG:
+#endif
+#ifndef _XBS5_LP64_OFF64
+ case _SC_XBS5_LP64_OFF64:
+#endif
+#ifndef _XBS5_LPBIG_OFFBIG
+ case _SC_XBS5_LPBIG_OFFBIG:
+#endif
#ifndef _POSIX_V6_ILP32_OFF32
case _SC_V6_ILP32_OFF32:
#endif
@@ -1093,6 +1188,18 @@
#endif
#ifndef _POSIX_V6_LPBIG_OFFBIG
case _SC_V6_LPBIG_OFFBIG:
+#endif
+#ifndef _POSIX_V7_ILP32_OFF32
+ case _SC_V7_ILP32_OFF32:
+#endif
+#ifndef _POSIX_V7_ILP32_OFFBIG
+ case _SC_V7_ILP32_OFFBIG:
+#endif
+#ifndef _POSIX_V7_LP64_OFF64
+ case _SC_V7_LP64_OFF64:
+#endif
+#ifndef _POSIX_V7_LPBIG_OFFBIG
+ case _SC_V7_LPBIG_OFFBIG:
#endif
{
const char *args[argc + 3];
Modified: fsf/trunk/libc/posix/sysconf.c
==============================================================================
--- fsf/trunk/libc/posix/sysconf.c (original)
+++ fsf/trunk/libc/posix/sysconf.c Sun Feb 8 00:11:33 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1995-1997,2001,2002,2003
+/* Copyright (C) 1991,1993,1995-1997,2001,2002,2003,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -255,6 +255,16 @@
case _SC_XBS5_LP64_OFF64:
case _SC_XBS5_LPBIG_OFFBIG:
+ case _SC_POSIX_V6_ILP32_OFF32:
+ case _SC_POSIX_V6_ILP32_OFFBIG:
+ case _SC_POSIX_V6_LP64_OFF64:
+ case _SC_POSIX_V6_LPBIG_OFFBIG:
+
+ case _SC_POSIX_V7_ILP32_OFF32:
+ case _SC_POSIX_V7_ILP32_OFFBIG:
+ case _SC_POSIX_V7_LP64_OFF64:
+ case _SC_POSIX_V7_LPBIG_OFFBIG:
+
case _SC_XOPEN_LEGACY:
case _SC_XOPEN_REALTIME:
case _SC_XOPEN_REALTIME_THREADS:
Modified: fsf/trunk/libc/sunrpc/rpc_common.c
==============================================================================
--- fsf/trunk/libc/sunrpc/rpc_common.c (original)
+++ fsf/trunk/libc/sunrpc/rpc_common.c Sun Feb 8 00:11:33 2009
@@ -42,7 +42,7 @@
/* We are very tricky here. We want to have _null_auth in a read-only
section but we cannot add const to the type because this isn't how
the variable is declared. So we use the section attribute. */
-struct opaque_auth _null_auth __attribute__ ((nocommon, section (".rodata")));
+struct opaque_auth _null_auth __attribute__ ((nocommon));
libc_hidden_def (_null_auth)
fd_set svc_fdset;
struct rpc_createerr rpc_createerr;
Modified: fsf/trunk/libc/sysdeps/posix/sysconf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/sysconf.c (original)
+++ fsf/trunk/libc/sysdeps/posix/sysconf.c Sun Feb 8 00:11:33 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1995-1997,1999-2003,2004,2006
+/* Copyright (C) 1991,1993,1995-1997,1999-2003,2004,2006,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -38,7 +38,9 @@
(!defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \
|| !defined _XBS5_LP64_OFF64 || !defined _XBS5_LPBIG_OFFBIG \
|| !defined _POSIX_V6_ILP32_OFF32 || !defined _POSIX_V6_ILP32_OFFBIG \
- || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG)
+ || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG \
+ || !defined _POSIX_V7_ILP32_OFF32 || !defined _POSIX_V7_ILP32_OFFBIG \
+ || !defined _POSIX_V7_LP64_OFF64 || !defined _POSIX_V7_LPBIG_OFFBIG)
#if NEED_CHECK_SPEC
static long int __sysconf_check_spec (const char *spec);
#endif
@@ -836,6 +838,31 @@
case _SC_V6_LPBIG_OFFBIG:
#ifdef _POSIX_V6_LPBIG_OFFBIG
return _POSIX_V6_LPBIG_OFFBIG;
+#else
+ return __sysconf_check_spec ("LPBIG_OFFBIG");
+#endif
+
+ case _SC_V7_ILP32_OFF32:
+#ifdef _POSIX_V7_ILP32_OFF32
+ return _POSIX_V7_ILP32_OFF32;
+#else
+ return __sysconf_check_spec ("ILP32_OFF32");
+#endif
+ case _SC_V7_ILP32_OFFBIG:
+#ifdef _POSIX_V7_ILP32_OFFBIG
+ return _POSIX_V7_ILP32_OFFBIG;
+#else
+ return __sysconf_check_spec ("ILP32_OFFBIG");
+#endif
+ case _SC_V7_LP64_OFF64:
+#ifdef _POSIX_V7_LP64_OFF64
+ return _POSIX_V7_LP64_OFF64;
+#else
+ return __sysconf_check_spec ("LP64_OFF64");
+#endif
+ case _SC_V7_LPBIG_OFFBIG:
+#ifdef _POSIX_V7_LPBIG_OFFBIG
+ return _POSIX_V7_LPBIG_OFFBIG;
#else
return __sysconf_check_spec ("LPBIG_OFFBIG");
#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h Sun Feb 8 00:11:33 2009
@@ -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