[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r9643 - in /fsf/trunk/libc: ./ bits/ conform/data/ conform/data/sys/ include/ io/sys/ posix/ stdlib/ sysdeps/mach/hurd/bits/...



Author: eglibc
Date: Tue Jan 12 00:03:15 2010
New Revision: 9643

Log:
Import glibc-mainline for 2010-01-12

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/bits/confname.h
    fsf/trunk/libc/conform/data/math.h-data
    fsf/trunk/libc/conform/data/sys/stat.h-data
    fsf/trunk/libc/conform/data/sys/types.h-data
    fsf/trunk/libc/conform/data/tgmath.h-data
    fsf/trunk/libc/conform/data/time.h-data
    fsf/trunk/libc/conform/data/unistd.h-data
    fsf/trunk/libc/conform/data/wchar.h-data
    fsf/trunk/libc/conform/data/wordexp.h-data
    fsf/trunk/libc/include/features.h
    fsf/trunk/libc/io/sys/stat.h
    fsf/trunk/libc/posix/unistd.h
    fsf/trunk/libc/stdlib/stdlib.h
    fsf/trunk/libc/sysdeps/mach/hurd/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/bsd/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
    fsf/trunk/libc/termios/termios.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Jan 12 00:03:15 2010
@@ -1,3 +1,47 @@
+2010-01-11  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* io/sys/stat.h: Declare fchmod for XPG7.
+	* conform/data/sys/stat.h-data: Fix up for XPG7.
+
+	* termios/termios.h: Define pid_t for XPG7.
+
+	* conform/data/math.h-data: Fix up for XPG6 and XPG7.
+	* conform/data/tgmath.h-data: Likewise.
+
+	* conform/data/time.h-data: Fix POSIX tests.
+
+	* conform/data/wchar.h-data: Fix up XPG7 tests.
+
+	* include/features.h: Fix __USE_ISOC95 handling.
+
+	* conform/data/wordexp.h-data: Fix typo in last change.
+
+	* conform/data/unistd.h-data: Fix up older POSIX tests.
+
+	* stdlib/stdlib.h: Fix handling symbols removed in XPG7.
+	* posix/unistd.h: Likewise.
+
+	* posix/unistd.h: Include environments.h also for XPG6 and up.
+	Define intptr_t for XPG6 and up.
+	Fix up for XPG7.
+	* conform/data/unistd.h-data: Fix up for XPG6 and XPG7.
+
+	* conform/data/sys/types.h-data: Fix up for XPG7.
+
+	* sysdeps/unix/bsd/bits/stat.h: Fix double-inclusion problem.
+	* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
+	* sysdeps/unix/sysv/bits/stat.h: Likewise.
+	* sysdeps/mach/hurd/bits/stat.h: Likewise.
+
+	* bits/confname.h: Fix typo in last change.
+
+	* conform/data/unistd.h-data: lockf-constants Not needed for POSIX.
+
 2010-01-10  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/bits/sigaction.h: SA_RESTART, SA_NODEFER,

Modified: fsf/trunk/libc/bits/confname.h
==============================================================================
--- fsf/trunk/libc/bits/confname.h (original)
+++ fsf/trunk/libc/bits/confname.h Tue Jan 12 00:03:15 2010
@@ -667,11 +667,11 @@
 #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
+    _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
 #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
 
     _CS_V6_ENV,
 #define _CS_V6_ENV			_CS_V6_ENV
-    _CS_V7_ENV,
+    _CS_V7_ENV
 #define _CS_V7_ENV			_CS_V7_ENV
   };

Modified: fsf/trunk/libc/conform/data/math.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/math.h-data (original)
+++ fsf/trunk/libc/conform/data/math.h-data Tue Jan 12 00:03:15 2010
@@ -51,6 +51,8 @@
 macro MATH_ERRNO == 1
 macro MATH_ERREXCEPT == 2
 #endif
+
+macro math_errhandling
 
 function double acos (double)
 function double asin (double)
@@ -79,7 +81,9 @@
 function double tanh (double)
 function double erf (double)
 function double erfc (double)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function double gamma (double)
+#endif
 function double hypot (double, double)
 #if !defined POSIX && !defined POSIX2008
 function double j0 (double)
@@ -93,7 +97,6 @@
 function double y1 (double)
 function double yn (int, double)
 #endif
-function int isnan (double)
 function double acosh (double)
 function double asinh (double)
 function double atanh (double)
@@ -114,7 +117,9 @@
 function long lround (double)
 function {long long} llround (double)
 function double remquo (double, double, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function double scalb (double, double)
+#endif
 function double scalbn (double, int)
 function double scalbln (double, long)
 function double fdim (double, double)
@@ -156,17 +161,22 @@
 function float tanhf (float)
 function float erff (float)
 function float erfcf (float)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function float gammaf (float)
+#endif
 function float hypotf (float, float)
+#if !defined POSIX && !defined POSIX2008
 function float j0f (float)
 function float j1f (float)
 function float jnf (int, float)
+#endif
 function float lgammaf (float)
 function float tgammaf (float)
+#if !defined POSIX && !defined POSIX2008
 function float y0f (float)
 function float y1f (float)
 function float ynf (int, float)
-function int isnanf (float)
+#endif
 function float acoshf (float)
 function float asinhf (float)
 function float atanhf (float)
@@ -187,7 +197,9 @@
 function long lroundf (float)
 function {long long} llroundf (float)
 function float remquof (float, float, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function float scalbf (float, float)
+#endif
 function float scalbnf (float, int)
 function float scalblnf (float, long)
 function float fdimf (float, float)
@@ -223,17 +235,22 @@
 function {long double} tanhl (long double)
 function {long double} erfl (long double)
 function {long double} erfcl (long double)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function {long double} gammal (long double)
+#endif
 function {long double} hypotl (long double, long double)
+#if !defined POSIX && !defined POSIX2008
 function {long double} j0l (long double)
 function {long double} j1l (long double)
 function {long double} jnl (int, long double)
+#endif
 function {long double} lgammal (long double)
 function {long double} tgammal (long double)
+#if !defined POSIX && !defined POSIX2008
 function {long double} y0l (long double)
 function {long double} y1l (long double)
 function {long double} ynl (int, long double)
-function int isnanl (long double)
+#endif
 function {long double} acoshl (long double)
 function {long double} asinhl (long double)
 function {long double} atanhl (long double)
@@ -254,7 +271,9 @@
 function long lroundl (long double)
 function {long long} llroundl (long double)
 function {long double} remquol (long double, long double, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function {long double} scalbl (long double, long double)
+#endif
 function {long double} scalbnl (long double, int)
 function {long double} scalblnl (long double, long)
 function {long double} fdiml (long double, long double)

Modified: fsf/trunk/libc/conform/data/sys/stat.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/sys/stat.h-data (original)
+++ fsf/trunk/libc/conform/data/sys/stat.h-data Tue Jan 12 00:03:15 2010
@@ -20,8 +20,10 @@
 element {struct stat} blkcnt_t st_blocks
 #endif
 
+#if !defined POSIX && !defined POSIX2008
 type blkcnt_t
 type blksize_t
+#endif
 type dev_t
 type ino_t
 type mode_t
@@ -30,7 +32,7 @@
 type gid_t
 type off_t
 type time_t
-# ifdef XOPEN2K8
+# if defined XOPEN2K8 || defined POSIX2008
 type {struct timespec}
 element {struct timespec} time_t tv_sec
 element {struct timespec} long tv_nsec
@@ -107,8 +109,6 @@
 # endif
 # if !defined POSIX && !defined POSIX2008
 function int mknod (const char*, mode_t, dev_t)
-# endif
-# if defined XOPEN2K8 || defined POSIX2008
 function int mknodat (int, const char*, mode_t, dev_t)
 # endif
 function int stat (const char*, struct stat*)

Modified: fsf/trunk/libc/conform/data/sys/types.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/sys/types.h-data (original)
+++ fsf/trunk/libc/conform/data/sys/types.h-data Tue Jan 12 00:03:15 2010
@@ -4,7 +4,7 @@
 type clock_t
 type clockid_t
 type dev_t
-# if !defined POSIX && !defined POSIX2008
+# if !defined POSIX
 type fsblkcnt_t
 type fsfilcnt_t
 # endif

Modified: fsf/trunk/libc/conform/data/tgmath.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/tgmath.h-data (original)
+++ fsf/trunk/libc/conform/data/tgmath.h-data Tue Jan 12 00:03:15 2010
@@ -1,4 +1,4 @@
-#ifdef XOPEN2K
+#if defined XOPEN2K || defined POSIX2008
 // <math.h>
 macro fpclassify
 macro isfinite
@@ -13,6 +13,7 @@
 macro islessgreater
 macro isunordered
 
+#ifndef POSIX2008
 constant M_E
 constant M_LOG2E
 constant M_LOG10E
@@ -28,6 +29,7 @@
 constant M_SQRT1_2
 
 constant MAXFLOAT
+#endif
 constant HUGE_VAL
 constant HUGE_VALF
 constant HUGE_VALL
@@ -49,6 +51,8 @@
 
 macro MATH_ERRNO == 1
 macro MATH_ERREXCEPT == 2
+
+macro math_errhandling
 
 function double acos (double)
 function double asin (double)
@@ -77,17 +81,22 @@
 function double tanh (double)
 function double erf (double)
 function double erfc (double)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function double gamma (double)
+#endif
 function double hypot (double, double)
+#if !defined POSIX && !defined POSIX2008
 function double j0 (double)
 function double j1 (double)
 function double jn (int, double)
+#endif
 function double lgamma (double)
 function double tgamma (double)
+#if !defined POSIX && !defined POSIX2008
 function double y0 (double)
 function double y1 (double)
 function double yn (int, double)
-function int isnan (double)
+#endif
 function double acosh (double)
 function double asinh (double)
 function double atanh (double)
@@ -108,7 +117,9 @@
 function long lround (double)
 function {long long} llround (double)
 function double remquo (double, double, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function double scalb (double, double)
+#endif
 function double scalbn (double, int)
 function double scalbln (double, long)
 function double fdim (double, double)
@@ -147,17 +158,22 @@
 function float tanhf (float)
 function float erff (float)
 function float erfcf (float)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function float gammaf (float)
+#endif
 function float hypotf (float, float)
+#if !defined POSIX && !defined POSIX2008
 function float j0f (float)
 function float j1f (float)
 function float jnf (int, float)
+#endif
 function float lgammaf (float)
 function float tgammaf (float)
+#if !defined POSIX && !defined POSIX2008
 function float y0f (float)
 function float y1f (float)
 function float ynf (int, float)
-function int isnanf (float)
+#endif
 function float acoshf (float)
 function float asinhf (float)
 function float atanhf (float)
@@ -178,7 +194,9 @@
 function long lroundf (float)
 function {long long} llroundf (float)
 function float remquof (float, float, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function float scalbf (float, float)
+#endif
 function float scalbnf (float, int)
 function float scalblnf (float, long)
 function float fdimf (float, float)
@@ -214,17 +232,22 @@
 function {long double} tanhl (long double)
 function {long double} erfl (long double)
 function {long double} erfcl (long double)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function {long double} gammal (long double)
+#endif
 function {long double} hypotl (long double, long double)
+#if !defined POSIX && !defined POSIX2008
 function {long double} j0l (long double)
 function {long double} j1l (long double)
 function {long double} jnl (int, long double)
+#endif
 function {long double} lgammal (long double)
 function {long double} tgammal (long double)
+#if !defined POSIX && !defined POSIX2008
 function {long double} y0l (long double)
 function {long double} y1l (long double)
 function {long double} ynl (int, long double)
-function int isnanl (long double)
+#endif
 function {long double} acoshl (long double)
 function {long double} asinhl (long double)
 function {long double} atanhl (long double)
@@ -245,7 +268,9 @@
 function long lroundl (long double)
 function {long long} llroundl (long double)
 function {long double} remquol (long double, long double, int*)
+#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K
 function {long double} scalbl (long double, long double)
+#endif
 function {long double} scalbnl (long double, int)
 function {long double} scalblnl (long double, long)
 function {long double} fdiml (long double, long double)

Modified: fsf/trunk/libc/conform/data/time.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/time.h-data (original)
+++ fsf/trunk/libc/conform/data/time.h-data Tue Jan 12 00:03:15 2010
@@ -44,7 +44,9 @@
 tag {struct sigevent}
 #endif
 
+#if !defined POSIX && !defined POSIX2008
 variable int getdate_err
+#endif
 
 function {char*} asctime (const struct tm*)
 function {char*} asctime_r (const struct tm*, char*)

Modified: fsf/trunk/libc/conform/data/unistd.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/unistd.h-data (original)
+++ fsf/trunk/libc/conform/data/unistd.h-data Tue Jan 12 00:03:15 2010
@@ -300,10 +300,12 @@
 constant _SC_THREAD_ROBUST_PRIO_INHERIT
 constant _SC_THREAD_ROBUST_PRIO_PROTECT
 
+#if !defined POSIX && !defined POSIX2008
 constant F_LOCK
 constant F_ULOCK
 constant F_TEST
 constant F_TLOCK
+#endif
 
 constant _PC_ASYNC_IO
 constant _PC_CHOWN_RESTRICTED
@@ -340,7 +342,9 @@
 
 function int access (const char*, int)
 function {unsigned int} alarm (unsigned int)
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
 function int brk (void*)
+#endif
 function int chdir (const char*)
 #if defined XPG3 || defined XPG4 || defined UNIX98
 function int chroot (const char*)
@@ -374,7 +378,9 @@
 # if defined XOPEN2K8 || defined POSIX2008
 function int fchownat (int, const char*, uid_t, gid_t, int)
 # endif
+#ifndef POSIX
 function int fchdir (int)
+#endif
 function int fdatasync (int)
 # if defined XOPEN2K8 || defined POSIX2008
 function int fexecve (int, char *const[], char *const[])
@@ -384,7 +390,9 @@
 function int fsync (int)
 function int ftruncate (int, off_t)
 function {char*} getcwd (char*, size_t)
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
 function int getdtablesize (void)
+#endif
 function gid_t getegid (void)
 function uid_t geteuid (void)
 function gid_t getgid (void)
@@ -396,19 +404,27 @@
 function {char*} getlogin (void)
 function int getlogin_r (char*, size_t)
 function int getopt (int, char*const[], const char*)
+#if defined XPG3 || defined XPG4 || defined UNIX98
 function int getpagesize (void)
-#if defined XPG3 || defined XPG4 || defined UNIX98
 function {char*} getpass (const char*)
 #endif
+#ifndef POSIX
 function pid_t getpgid (pid_t)
+#endif
 function pid_t getpgrp (void)
 function pid_t getpid (void)
 function pid_t getppid (void)
+#ifndef POSIX
 function pid_t getsid (pid_t)
+#endif
 function uid_t getuid (void)
+#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
 function {char*} getwd (char*)
+#endif
 function int isatty (int)
+#ifndef POSIX
 function int lchown (const char*, uid_t, gid_t)
+#endif
 function int link (const char*, const char*)
 # if defined XOPEN2K8 || defined POSIX2008
 function int linkat (int, const char*, int, const char*, int)
@@ -423,18 +439,24 @@
 function {long int} pathconf (const char*, int)
 function int pause (void)
 function int pipe (int[2])
+#ifndef POSIX
 function ssize_t pread (int, void*, size_t, off_t)
+#endif
 #if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
 function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void))
 #endif
+#ifndef POSIX
 function ssize_t pwrite (int, const void*, size_t, off_t)
+#endif
 function ssize_t read (int, void*, size_t)
 function ssize_t readlink (const char*, char*, size_t)
 # if defined XOPEN2K8 || defined POSIX2008
 function ssize_t readlinkat (int, const char*, char*, size_t)
 # endif
 function int rmdir (const char*)
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
 function {void*} sbrk (intptr_t)
+#endif
 function int setegid (gid_t)
 function int seteuid (uid_t)
 function int setgid (gid_t)
@@ -460,16 +482,22 @@
 function {long int} sysconf (int)
 function pid_t tcgetpgrp (int)
 function int tcsetpgrp (int, pid_t)
+#ifndef POSIX
 function int truncate (const char*, off_t)
+#endif
 function {char*} ttyname (int)
 function int ttyname_r (int, char*, size_t)
+#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
 function useconds_t ualarm (useconds_t, useconds_t)
+#endif
 function int unlink (const char*)
 # if defined XOPEN2K8 || defined POSIX2008
 function int unlinkat (int, const char*, int)
 # endif
+#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
 function int usleep (useconds_t)
 function pid_t vfork (void)
+#endif
 function ssize_t write (int, const void*, size_t)
 
 variable {char*} optarg

Modified: fsf/trunk/libc/conform/data/wchar.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/wchar.h-data (original)
+++ fsf/trunk/libc/conform/data/wchar.h-data Tue Jan 12 00:03:15 2010
@@ -53,12 +53,12 @@
 function wint_t towupper (wint_t)
 #endif
 function wint_t ungetwc (wint_t, FILE*)
-function int vfwprintf (FILE*, const wchar_t*, va_list)
-function int vfwscanf (FILE*, const wchar_t*, va_list)
-function int vwprintf (const wchar_t*, va_list)
-function int vwscanf (const wchar_t*, va_list)
-function int vswprintf (wchar_t*, size_t, const wchar_t*, va_list)
-function int vswscanf (const wchar_t*, const wchar_t*, va_list)
+function int vfwprintf (FILE*, const wchar_t*, __gnuc_va_list)
+function int vfwscanf (FILE*, const wchar_t*, __gnuc_va_list)
+function int vwprintf (const wchar_t*, __gnuc_va_list)
+function int vwscanf (const wchar_t*, __gnuc_va_list)
+function int vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
+function int vswscanf (const wchar_t*, const wchar_t*, __gnuc_va_list)
 #if defined XOPEN2K8 || defined POSIX2008
 function {wchar_t*} wcpcpy (wchar_t*, const wchar_t*)
 function {wchar_t*} wcpncpy (wchar_t*, const wchar_t*, size_t)
@@ -102,7 +102,9 @@
 function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**)
 function {long int} wcstol (const wchar_t*, wchar_t**, int)
 function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int)
+#if defined UNIX98 || defined XOPEN2K
 function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*)
+#endif
 #if !defined ISO && !defined POSIX && !defined POSIX2008
 function int wcswidth (const wchar_t*, size_t)
 #endif

Modified: fsf/trunk/libc/conform/data/wordexp.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/wordexp.h-data (original)
+++ fsf/trunk/libc/conform/data/wordexp.h-data Tue Jan 12 00:03:15 2010
@@ -14,7 +14,7 @@
 constant WRDE_BADCHAR
 constant WRDE_CMDSUB
 constant WRDE_NOSPACE
-#if defined XOPEN2K8 || defined POSIX2008
+#if !defined XOPEN2K8 && !defined POSIX2008
 constant WRDE_NOSYS
 #endif
 constant WRDE_SYNTAX

Modified: fsf/trunk/libc/include/features.h
==============================================================================
--- fsf/trunk/libc/include/features.h (original)
+++ fsf/trunk/libc/include/features.h Tue Jan 12 00:03:15 2010
@@ -153,6 +153,8 @@
 
 /* If _GNU_SOURCE was defined by the user, turn on all the other features.  */
 #ifdef _GNU_SOURCE
+# undef  _ISOC95_SOURCE
+# define _ISOC95_SOURCE	1
 # undef  _ISOC99_SOURCE
 # define _ISOC99_SOURCE	1
 # undef  _POSIX_SOURCE
@@ -233,6 +235,8 @@
 
 #if (_POSIX_C_SOURCE - 0) >= 200112L
 # define __USE_XOPEN2K		1
+# undef __USE_ISOC95
+# define __USE_ISOC95		1
 # undef __USE_ISOC99
 # define __USE_ISOC99		1
 #endif
@@ -257,6 +261,8 @@
 #   endif
 #   define __USE_XOPEN2K	1
 #   define __USE_XOPEN2KXSI	1
+#   undef __USE_ISOC95
+#   define __USE_ISOC95		1
 #   undef __USE_ISOC99
 #   define __USE_ISOC99		1
 #  endif

Modified: fsf/trunk/libc/io/sys/stat.h
==============================================================================
--- fsf/trunk/libc/io/sys/stat.h (original)
+++ fsf/trunk/libc/io/sys/stat.h Tue Jan 12 00:03:15 2010
@@ -29,7 +29,7 @@
 #include <bits/types.h>		/* For __mode_t and __dev_t.  */
 
 #if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC \
-         || defined __USE_ATFILE
+	 || defined __USE_ATFILE
 # if defined __USE_XOPEN || defined __USE_XOPEN2K
 #  define __need_time_t
 # endif
@@ -293,7 +293,7 @@
 #endif
 
 /* Set file access permissions of the file FD is open on to MODE.  */
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 extern int fchmod (int __fd, __mode_t __mode) __THROW;
 #endif
 

Modified: fsf/trunk/libc/posix/unistd.h
==============================================================================
--- fsf/trunk/libc/posix/unistd.h (original)
+++ fsf/trunk/libc/posix/unistd.h Tue Jan 12 00:03:15 2010
@@ -203,7 +203,7 @@
 #include <bits/posix_opt.h>
 
 /* Get the environment definitions from Unix98.  */
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
 # include <bits/environments.h>
 #endif
 
@@ -263,7 +263,7 @@
 # endif
 #endif	/* X/Open */
 
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
 # ifndef __intptr_t_defined
 typedef __intptr_t intptr_t;
 #  define __intptr_t_defined
@@ -362,7 +362,7 @@
    __THROW.  */
 extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
 
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # ifndef __USE_FILE_OFFSET64
 /* Read NBYTES into BUF from FD at the given position OFFSET without
    changing the file pointer.  Return the number read, -1 for errors
@@ -440,7 +440,8 @@
    __THROW.  */
 extern unsigned int sleep (unsigned int __seconds);
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K8) || defined __USE_GNU
 /* Set an alarm to go off (generating a SIGALRM signal) in VALUE
    microseconds.  If INTERVAL is nonzero, when the alarm goes off, the
    timer is reset to go off every INTERVAL microseconds thereafter.
@@ -469,7 +470,7 @@
 extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
      __THROW __nonnull ((1)) __wur;
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 /* Change the owner and group of the file that FD is open on.  */
 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur;
 
@@ -492,7 +493,7 @@
 /* Change the process's working directory to PATH.  */
 extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur;
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 /* Change the process's working directory to the one FD is open on.  */
 extern int fchdir (int __fd) __THROW __wur;
 #endif
@@ -513,7 +514,8 @@
 extern char *get_current_dir_name (void) __THROW;
 #endif
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K8) || defined __USE_GNU
 /* Put the absolute pathname of the current working directory in BUF.
    If successful, return BUF.  If not, put an error message in
    BUF and return NULL.  BUF should be at least PATH_MAX bytes long.  */
@@ -639,7 +641,7 @@
 
 /* Get the process group ID of process PID.  */
 extern __pid_t __getpgid (__pid_t __pid) __THROW;
-#ifdef __USE_XOPEN_EXTENDED
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 extern __pid_t getpgid (__pid_t __pid) __THROW;
 #endif
 
@@ -683,7 +685,7 @@
    are set to the process ID of the calling process, which is returned.  */
 extern __pid_t setsid (void) __THROW;
 
-#ifdef __USE_XOPEN_EXTENDED
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 /* Return the session ID of the given process.  */
 extern __pid_t getsid (__pid_t __pid) __THROW;
 #endif
@@ -772,7 +774,8 @@
    and the process ID of the new process to the old process.  */
 extern __pid_t fork (void) __THROW;
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K8) || defined __USE_GNU
 /* Clone the calling process, but without copying the whole address space.
    The calling process is suspended until the new process exits or is
    replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
@@ -888,7 +891,7 @@
 #endif
 
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
 /* Put the name of the current host in no more than LEN bytes of NAME.
    The result is null-terminated if LEN is large enough for the full
    name and the terminator.  */
@@ -983,15 +986,21 @@
 extern void sync (void) __THROW;
 
 
+# ifndef __USE_XOPEN2K
 /* Return the number of bytes in a page.  This is the system's page size,
    which is not necessarily the same as the hardware page size.  */
 extern int getpagesize (void)  __THROW __attribute__ ((__const__));
+# endif
 
 
 /* Return the maximum number of file descriptors
    the current process could possibly have.  */
 extern int getdtablesize (void) __THROW;
 
+#endif /* Use BSD || X/Open Unix.  */
+
+
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
 
 /* Truncate FILE to LENGTH bytes.  */
 # ifndef __USE_FILE_OFFSET64
@@ -1011,9 +1020,6 @@
      __THROW __nonnull ((1)) __wur;
 # endif
 
-#endif /* Use BSD || X/Open Unix.  */
-
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
 
 /* Truncate the file FD is open on to LENGTH bytes.  */
 # ifndef __USE_FILE_OFFSET64
@@ -1033,7 +1039,8 @@
 #endif /* Use BSD || X/Open Unix || POSIX 2003.  */
 
 
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
+    && !defined __USE_XOPEN2K
 
 /* Set the end of accessible data space (aka "the break") to ADDR.
    Returns zero on success and -1 for errors (with errno set).  */
@@ -1139,7 +1146,7 @@
 
 /* The Single Unix specification demands this prototype to be here.
    It is also found in <stdio.h>.  */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
 /* Return the name of the controlling terminal.  */
 extern char *ctermid (char *__s) __THROW;
 #endif

Modified: fsf/trunk/libc/stdlib/stdlib.h
==============================================================================
--- fsf/trunk/libc/stdlib/stdlib.h (original)
+++ fsf/trunk/libc/stdlib/stdlib.h Tue Jan 12 00:03:15 2010
@@ -497,8 +497,8 @@
 # include <alloca.h>
 #endif /* Use GNU, BSD, or misc.  */
 
-#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
-    && !defined __USE_XOPEN2K
+#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K) || defined __USE_GNU
 /* Allocate SIZE bytes on a page boundary.  The storage cannot be freed.  */
 extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
 #endif
@@ -597,8 +597,8 @@
 #endif
 
 
-#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
-    && !defined __USE_XOPEN2K
+#if ((defined __USE_MISC || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K) || defined __USE_GNU
 /* Generate a unique temporary file name from TEMPLATE.
    The last six characters of TEMPLATE must be "XXXXXX";
    they are replaced with a string that makes the file name unique.
@@ -797,8 +797,8 @@
 #endif
 
 
-#if (defined __USE_SVID || defined __USE_XOPEN_EXTENDED) \
-    && !defined __USE_XOPEN2K
+#if ((defined __USE_SVID || defined __USE_XOPEN_EXTENDED)	\
+     && !defined __USE_XOPEN2K) || defined __USE_GNU
 /* Convert floating point numbers to strings.  The returned values are
    valid only until another call to the same function.  */
 

Modified: fsf/trunk/libc/sysdeps/mach/hurd/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -20,6 +20,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 #include <bits/types.h>
 
@@ -193,5 +196,7 @@
 
 /* Default file creation mask (umask).  */
 #ifdef	__USE_BSD
-#define	CMASK		0022
-#endif
+# define CMASK		0022
+#endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/bsd/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/bsd/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/bsd/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 #include <bits/types.h>
 
@@ -84,3 +87,5 @@
 #define	__S_IREAD	0400	/* Read by owner.  */
 #define	__S_IWRITE	0200	/* Write by owner.  */
 #define	__S_IEXEC	0100	/* Execute by owner.  */
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 struct stat
   {
@@ -63,3 +66,5 @@
 #define	__S_IREAD	0400	/* Read by owner.  */
 #define	__S_IWRITE	0200	/* Write by owner.  */
 #define	__S_IEXEC	0100	/* Execute by owner.  */
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_LINUX_OLD	1
@@ -166,3 +169,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_KERNEL	0
@@ -143,3 +146,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits//stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -20,6 +20,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 #include <bits/wordsize.h>
 
@@ -270,3 +273,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 #include <bits/wordsize.h>
 
@@ -259,3 +262,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_LINUX_OLD	1
@@ -167,3 +170,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h Tue Jan 12 00:03:15 2010
@@ -19,6 +19,9 @@
 #if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_KERNEL	0
@@ -206,3 +209,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */

Modified: fsf/trunk/libc/termios/termios.h
==============================================================================
--- fsf/trunk/libc/termios/termios.h (original)
+++ fsf/trunk/libc/termios/termios.h Tue Jan 12 00:03:15 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,99, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-1999,2003,2010 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
@@ -24,7 +24,7 @@
 #define	_TERMIOS_H	1
 
 #include <features.h>
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
 /* We need `pid_t'.  */
 # include <bits/types.h>
 # ifndef __pid_t_defined