about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-02-26 16:53:30 +0000
committerUlrich Drepper <drepper@redhat.com>2009-02-26 16:53:30 +0000
commit6cbe890a9d379d85fe849a8317010f05ace00809 (patch)
tree20155743e44ca4f276794e99ecbf49e8e7b05ea9
parentf503060bbbba36d1bb1f1548682b8b08e8a2cc0f (diff)
downloadglibc-6cbe890a9d379d85fe849a8317010f05ace00809.tar.gz
glibc-6cbe890a9d379d85fe849a8317010f05ace00809.tar.xz
glibc-6cbe890a9d379d85fe849a8317010f05ace00809.zip
* wctype/wctype.h: The *_l functions are in POSIX 2008.
	* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
	200112L to 200809L.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT.
	* posix/unistd.h: fexecve is in POSIX 2008.
	* time/time.h: strftime_l is in POSIX 2008.
	* io/sys/stat.h: futimens is in POSIX 2008.
	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
-rw-r--r--ChangeLog18
-rw-r--r--NEWS6
-rw-r--r--bits/confname.h5
-rw-r--r--io/sys/stat.h3
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h70
-rw-r--r--posix/getconf.c8
-rw-r--r--posix/unistd.h4
-rw-r--r--stdlib/stdlib.h4
-rw-r--r--string/string.h20
-rw-r--r--string/strings.h17
-rw-r--r--sysdeps/mach/hurd/bits/posix_opt.h22
-rw-r--r--sysdeps/unix/sysv/linux/bits/posix_opt.h24
-rw-r--r--time/time.h7
-rw-r--r--wcsmbs/wchar.h16
-rw-r--r--wctype/wctype.h6
16 files changed, 151 insertions, 86 deletions
diff --git a/ChangeLog b/ChangeLog
index f4a652ddd5..b57c3fb784 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
 
+	* wctype/wctype.h: The *_l functions are in POSIX 2008.
+	* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
+	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
+	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
+	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
+	200112L to 200809L.
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
+	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
+	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
+	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
+	_SC_THREAD_ROBUST_PRIO_PROTECT.
+	* posix/unistd.h: fexecve is in POSIX 2008.
+	* time/time.h: strftime_l is in POSIX 2008.
+	* io/sys/stat.h: futimens is in POSIX 2008.
+	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
+	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
+	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
+	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
 	* libio/stdio.h: dprintf, fmemopen, getdelim, getline,
 	open_memstream, and vdprintf are in POSIX 2008.
 
diff --git a/NEWS b/NEWS
index 15ef325b8e..48ef744e71 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2009-2-25
+GNU C Library NEWS -- history of user-visible changes.  2009-2-26
 Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -12,9 +12,11 @@ Version 2.10
 * Correct declarations of string function when used in C++ code.  This
   could lead to compile error for invalid C++ code.
 
-* XPG7/POSIX 2008 compilation environment.
+* XPG7/POSIX 2008 compilation environment.  Many GNU-specific functions are
+  now in POSIX.
 
 * New POSIX 2008 interface: psiginfo
+  Implemented by Ulrich Drepper.
 
 
 Version 2.9
diff --git a/bits/confname.h b/bits/confname.h
index 5836017c12..757ed4f3ca 100644
--- a/bits/confname.h
+++ b/bits/confname.h
@@ -524,6 +524,11 @@ enum
 
     _SC_XOPEN_STREAMS,
 #define _SC_XOPEN_STREAMS		_SC_XOPEN_STREAMS
+
+    _SC_THREAD_ROBUST_PRIO_INHERIT,
+#define _SC_THREAD_ROBUST_PRIO_INHERIT	_SC_THREAD_ROBUST_PRIO_INHERIT
+    _SC_THREAD_ROBUST_PRIO_PROTECT,
+#define _SC_THREAD_ROBUST_PRIO_PROTECT	_SC_THREAD_ROBUST_PRIO_PROTECT
   };
 
 /* Values for the NAME argument to `confstr'.  */
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 60955016eb..7d769052a1 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -365,8 +365,7 @@ extern int utimensat (int __fd, __const char *__path,
      __THROW __nonnull ((2));
 #endif
 
-#ifdef __USE_GNU
-/* XXX This will change to the macro for the next 2008 POSIX revision.  */
+#ifdef __USE_XOPEN2K8
 /* Set file access and modification times of the file associated with FD.  */
 extern int futimens (int __fd, __const struct timespec __times[2]) __THROW;
 #endif
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index edb5f67e48..3c3ce82566 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-26  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
+	_POSIX_THREAD_ROBUST_PRIO_INHERIT and
+	_POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
+	200112L to 200809L.
+
 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/pthread/pthread.h: The robust mutex functions are in
diff --git a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 5724fa33a3..f9fa4e52eb 100644
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -27,25 +27,25 @@
 #define	_POSIX_SAVED_IDS	1
 
 /* Priority scheduling is supported.  */
-#define	_POSIX_PRIORITY_SCHEDULING	200112L
+#define	_POSIX_PRIORITY_SCHEDULING	200809L
 
 /* Synchronizing file data is supported.  */
-#define	_POSIX_SYNCHRONIZED_IO	200112L
+#define	_POSIX_SYNCHRONIZED_IO	200809L
 
 /* The fsync function is present.  */
-#define	_POSIX_FSYNC	200112L
+#define	_POSIX_FSYNC	200809L
 
 /* Mapping of files to memory is supported.  */
-#define	_POSIX_MAPPED_FILES	200112L
+#define	_POSIX_MAPPED_FILES	200809L
 
 /* Locking of all memory is supported.  */
-#define	_POSIX_MEMLOCK	200112L
+#define	_POSIX_MEMLOCK	200809L
 
 /* Locking of ranges of memory is supported.  */
-#define	_POSIX_MEMLOCK_RANGE	200112L
+#define	_POSIX_MEMLOCK_RANGE	200809L
 
 /* Setting of memory protections is supported.  */
-#define	_POSIX_MEMORY_PROTECTION	200112L
+#define	_POSIX_MEMORY_PROTECTION	200809L
 
 /* Some filesystems allow all users to change file ownership.  */
 #define	_POSIX_CHOWN_RESTRICTED	0
@@ -67,41 +67,47 @@
 #define	_XOPEN_SHM	1
 
 /* Tell we have POSIX threads.  */
-#define _POSIX_THREADS	200112L
+#define _POSIX_THREADS	200809L
 
 /* We have the reentrant functions described in POSIX.  */
 #define _POSIX_REENTRANT_FUNCTIONS      1
-#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
 
 /* We provide priority scheduling for threads.  */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING	200112L
+#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
 
 /* We support user-defined stack sizes.  */
-#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
+#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
 
 /* We support user-defined stacks.  */
-#define _POSIX_THREAD_ATTR_STACKADDR	200112L
+#define _POSIX_THREAD_ATTR_STACKADDR	200809L
 
 /* We support priority inheritence.  */
-#define _POSIX_THREAD_PRIO_INHERIT	200112L
+#define _POSIX_THREAD_PRIO_INHERIT	200809L
+
+/* We support priority inheritence for robust mutexes.  */
+#define _POSIX_THREAD_ROBUST_PRIO_INHERIT	200809L
 
 /* We support priority protection, though only for non-robust
    mutexes.  */
-#define _POSIX_THREAD_PRIO_PROTECT	200112L
+#define _POSIX_THREAD_PRIO_PROTECT	200809L
+
+/* We do not support priority protection for robust mutexes.  */
+#define _POSIX_THREAD_ROBUST_PRIO_PROTECT	-1
 
 /* We support POSIX.1b semaphores.  */
-#define _POSIX_SEMAPHORES	200112L
+#define _POSIX_SEMAPHORES	200809L
 
 /* Real-time signals are supported.  */
-#define _POSIX_REALTIME_SIGNALS	200112L
+#define _POSIX_REALTIME_SIGNALS	200809L
 
 /* We support asynchronous I/O.  */
-#define _POSIX_ASYNCHRONOUS_IO	200112L
+#define _POSIX_ASYNCHRONOUS_IO	200809L
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
 /* Support for prioritization is also available.  */
-#define _POSIX_PRIORITIZED_IO	200112L
+#define _POSIX_PRIORITIZED_IO	200809L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -112,7 +118,7 @@
 #define _LFS64_STDIO		1
 
 /* POSIX shared memory objects are implemented.  */
-#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
 
 /* CPU-time clocks support needs to be checked at runtime.  */
 #define _POSIX_CPUTIME	0
@@ -124,49 +130,49 @@
 #define _POSIX_REGEXP	1
 
 /* Reader/Writer locks are available.  */
-#define _POSIX_READER_WRITER_LOCKS	200112L
+#define _POSIX_READER_WRITER_LOCKS	200809L
 
 /* We have a POSIX shell.  */
 #define _POSIX_SHELL	1
 
 /* We support the Timeouts option.  */
-#define _POSIX_TIMEOUTS	200112L
+#define _POSIX_TIMEOUTS	200809L
 
 /* We support spinlocks.  */
-#define _POSIX_SPIN_LOCKS	200112L
+#define _POSIX_SPIN_LOCKS	200809L
 
 /* The `spawn' function family is supported.  */
-#define _POSIX_SPAWN	200112L
+#define _POSIX_SPAWN	200809L
 
 /* We have POSIX timers.  */
-#define _POSIX_TIMERS	200112L
+#define _POSIX_TIMERS	200809L
 
 /* The barrier functions are available.  */
-#define _POSIX_BARRIERS	200112L
+#define _POSIX_BARRIERS	200809L
 
 /* POSIX message queues are available.  */
-#define	_POSIX_MESSAGE_PASSING	200112L
+#define	_POSIX_MESSAGE_PASSING	200809L
 
 /* Thread process-shared synchronization is supported.  */
-#define _POSIX_THREAD_PROCESS_SHARED	200112L
+#define _POSIX_THREAD_PROCESS_SHARED	200809L
 
 /* The monotonic clock might be available.  */
 #define _POSIX_MONOTONIC_CLOCK	0
 
 /* The clock selection interfaces are available.  */
-#define _POSIX_CLOCK_SELECTION	200112L
+#define _POSIX_CLOCK_SELECTION	200809L
 
 /* Advisory information interfaces are available.  */
-#define _POSIX_ADVISORY_INFO	200112L
+#define _POSIX_ADVISORY_INFO	200809L
 
 /* IPv6 support is available.  */
-#define _POSIX_IPV6	200112L
+#define _POSIX_IPV6	200809L
 
 /* Raw socket support is available.  */
-#define _POSIX_RAW_SOCKETS	200112L
+#define _POSIX_RAW_SOCKETS	200809L
 
 /* We have at least one terminal.  */
-#define _POSIX2_CHAR_TERM	200112L
+#define _POSIX2_CHAR_TERM	200809L
 
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
diff --git a/posix/getconf.c b/posix/getconf.c
index 2b1f6c9871..59ccab606c 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -355,6 +355,14 @@ static const struct conf vars[] =
 #ifdef _SC_THREAD_PRIO_PROTECT
     { "_POSIX_THREAD_PRIO_PROTECT", _SC_THREAD_PRIO_PROTECT, SYSCONF },
 #endif
+#ifdef _SC_THREAD_ROBUST_PRIO_INHERIT
+    { "_POSIX_THREAD_ROBUST_PRIO_INHERIT", _SC_THREAD_ROBUST_PRIO_INHERIT,
+      SYSCONF },
+#endif
+#ifdef _SC_THREAD_ROBUST_PRIO_PROTECT
+    { "_POSIX_THREAD_ROBUST_PRIO_PROTECT", _SC_THREAD_ROBUST_PRIO_PROTECT,
+      SYSCONF },
+#endif
 #ifdef _SC_THREAD_PROCESS_SHARED
     { "_POSIX_THREAD_PROCESS_SHARED", _SC_THREAD_PROCESS_SHARED, SYSCONF },
 #endif
diff --git a/posix/unistd.h b/posix/unistd.h
index 96bb02dff4..6876e3af31 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2006, 2007, 2008, 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
@@ -516,7 +516,7 @@ extern char **environ;
 extern int execve (__const char *__path, char *__const __argv[],
 		   char *__const __envp[]) __THROW __nonnull ((1));
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Execute the file FD refers to, overlaying the running program image.
    ARGV and ENVP are passed to the new program, as for `execve'.  */
 extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 732e7d65d2..ff249ad4cb 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-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
@@ -605,7 +605,7 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur;
 # endif
 #endif
 
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_XOPEN2K8
 /* Create a unique temporary directory from TEMPLATE.
    The last six characters of TEMPLATE must be "XXXXXX";
    they are replaced with a string that makes the directory name unique.
diff --git a/string/string.h b/string/string.h
index 849255f75c..3c760092f0 100644
--- a/string/string.h
+++ b/string/string.h
@@ -154,7 +154,7 @@ extern size_t strxfrm (char *__restrict __dest,
      __THROW __nonnull ((2));
 __END_NAMESPACE_STD
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* The following functions are equivalent to the both above but they
    take the locale they use for the collation as an extra argument.
    This is not standardsized but something like will come.  */
@@ -177,7 +177,7 @@ extern char *strdup (__const char *__s)
 /* Return a malloc'd copy of at most N bytes of STRING.  The
    resultant string is terminated even if no null terminator
    appears before STRING[N].  */
-#if defined __USE_GNU
+#if defined __USE_XOPEN2K8
 extern char *strndup (__const char *__string, size_t __n)
      __THROW __attribute_malloc__ __nonnull ((1));
 #endif
@@ -398,7 +398,7 @@ extern size_t strlen (__const char *__s)
      __THROW __attribute_pure__ __nonnull ((1));
 __END_NAMESPACE_STD
 
-#ifdef	__USE_GNU
+#ifdef	__USE_XOPEN2K8
 /* Find the length of STRING, but scan at most MAXLEN characters.
    If no '\0' terminator is found in that many characters, return MAXLEN.  */
 extern size_t strnlen (__const char *__string, size_t __maxlen)
@@ -438,7 +438,7 @@ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
 # endif
 #endif
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Translate error number to string according to the locale L.  */
 extern char *strerror_l (int __errnum, __locale_t __l) __THROW;
 #endif
@@ -559,11 +559,7 @@ extern char *strsep (char **__restrict __stringp,
      __THROW __nonnull ((1, 2));
 #endif
 
-#ifdef	__USE_GNU
-/* Compare S1 and S2 as strings holding name & indices/version numbers.  */
-extern int strverscmp (__const char *__s1, __const char *__s2)
-     __THROW __attribute_pure__ __nonnull ((1, 2));
-
+#ifdef	__USE_XOPEN2K8
 /* Return a string describing the meaning of the signal number in SIG.  */
 extern char *strsignal (int __sig) __THROW;
 
@@ -581,6 +577,12 @@ extern char *__stpncpy (char *__restrict __dest,
 extern char *stpncpy (char *__restrict __dest,
 		      __const char *__restrict __src, size_t __n)
      __THROW __nonnull ((1, 2));
+#endif
+
+#ifdef	__USE_GNU
+/* Compare S1 and S2 as strings holding name & indices/version numbers.  */
+extern int strverscmp (__const char *__s1, __const char *__s2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
 
 /* Sautee STRING briskly.  */
 extern char *strfry (char *__string) __THROW __nonnull ((1));
diff --git a/string/strings.h b/string/strings.h
index 0db756ae56..16ab6b1c4d 100644
--- a/string/strings.h
+++ b/string/strings.h
@@ -113,6 +113,23 @@ extern int strcasecmp (__const char *__s1, __const char *__s2)
 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
      __THROW __attribute_pure__;
 
+#ifdef	__USE_XOPEN2K8
+/* The following functions are equivalent to the both above but they
+   take the locale they use for the collation as an extra argument.
+   This is not standardsized but something like will come.  */
+# include <xlocale.h>
+
+/* Again versions of a few functions which use the given locale instead
+   of the global one.  */
+extern int strcasecmp_l (__const char *__s1, __const char *__s2,
+			 __locale_t __loc)
+     __THROW __attribute_pure__ __nonnull ((1, 2, 3));
+
+extern int strncasecmp_l (__const char *__s1, __const char *__s2,
+			  size_t __n, __locale_t __loc)
+     __THROW __attribute_pure__ __nonnull ((1, 2, 4));
+#endif
+
 __END_DECLS
 
 #endif	/* string.h  */
diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
index 6747bc276e..775c921eeb 100644
--- a/sysdeps/mach/hurd/bits/posix_opt.h
+++ b/sysdeps/mach/hurd/bits/posix_opt.h
@@ -1,5 +1,5 @@
 /* Define POSIX options for GNU/Hurd.
-   Copyright (C) 1998,2000,2001,2002,2006 Free Software Foundation, Inc.
+   Copyright (C) 1998,2000,2001,2002,2006,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,19 +35,19 @@
 #undef _POSIX_SYNCHRONIZED_IO
 
 /* The fsync function is present.  */
-#define	_POSIX_FSYNC	200112L
+#define	_POSIX_FSYNC	200809L
 
 /* Mapping of files to memory is supported.  */
-#define	_POSIX_MAPPED_FILES	200112L
+#define	_POSIX_MAPPED_FILES	200809L
 
 /* Locking of all memory could be supported in future.  */
 #define	_POSIX_MEMLOCK	0
 
 /* Locking of ranges of memory is supported.  */
-#define	_POSIX_MEMLOCK_RANGE	200112L
+#define	_POSIX_MEMLOCK_RANGE	200809L
 
 /* Setting of memory protections is supported.  */
-#define	_POSIX_MEMORY_PROTECTION	200112L
+#define	_POSIX_MEMORY_PROTECTION	200809L
 
 /* Elements of the `c_cc' member of `struct termios' structure
    can be disabled by using the value _POSIX_VDISABLE.  */
@@ -66,7 +66,7 @@
 
 /* We have the reentrant functions described in POSIX.  */
 #define _POSIX_REENTRANT_FUNCTIONS      1
-#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
 
 /* These are all things that won't be supported when _POSIX_THREADS is not.  */
 #define _POSIX_THREAD_PRIORITY_SCHEDULING	-1
@@ -112,7 +112,7 @@
 #define _POSIX_TIMEOUTS	-1
 
 /* The `spawn' function family is supported.  */
-#define _POSIX_SPAWN	200112L
+#define _POSIX_SPAWN	200809L
 
 /* We do not have POSIX timers, but could in future without ABI change.  */
 #define _POSIX_TIMERS	0
@@ -130,19 +130,19 @@
 #define _POSIX_MONOTONIC_CLOCK	0
 
 /* The clock selection interfaces are available.  */
-#define _POSIX_CLOCK_SELECTION	200112L
+#define _POSIX_CLOCK_SELECTION	200809L
 
 /* Advisory information interfaces could be available in future.  */
 #define _POSIX_ADVISORY_INFO	0
 
 /* IPv6 support is available.  */
-#define _POSIX_IPV6	200112L
+#define _POSIX_IPV6	200809L
 
 /* Raw socket support is available.  */
-#define _POSIX_RAW_SOCKETS	200112L
+#define _POSIX_RAW_SOCKETS	200809L
 
 /* We have at least one terminal.  */
-#define _POSIX2_CHAR_TERM	200112L
+#define _POSIX2_CHAR_TERM	200809L
 
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
diff --git a/sysdeps/unix/sysv/linux/bits/posix_opt.h b/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 37612e0bd5..69198a6650 100644
--- a/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -1,5 +1,5 @@
 /* Define POSIX options for Linux.
-   Copyright (C) 1996,1997,1999,2000,2002,2003,2008
+   Copyright (C) 1996,1997,1999,2000,2002,2003,2008,2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -32,25 +32,25 @@
 #define	_POSIX_SAVED_IDS	1
 
 /* Priority scheduling is supported.  */
-#define	_POSIX_PRIORITY_SCHEDULING	200112L
+#define	_POSIX_PRIORITY_SCHEDULING	200809L
 
 /* Synchronizing file data is supported.  */
-#define	_POSIX_SYNCHRONIZED_IO	200112L
+#define	_POSIX_SYNCHRONIZED_IO	200809L
 
 /* The fsync function is present.  */
-#define	_POSIX_FSYNC	200112L
+#define	_POSIX_FSYNC	200809L
 
 /* Mapping of files to memory is supported.  */
-#define	_POSIX_MAPPED_FILES	200112L
+#define	_POSIX_MAPPED_FILES	200809L
 
 /* Locking of all memory is supported.  */
-#define	_POSIX_MEMLOCK	200112L
+#define	_POSIX_MEMLOCK	200809L
 
 /* Locking of ranges of memory is supported.  */
-#define	_POSIX_MEMLOCK_RANGE	200112L
+#define	_POSIX_MEMLOCK_RANGE	200809L
 
 /* Setting of memory protections is supported.  */
-#define	_POSIX_MEMORY_PROTECTION	200112L
+#define	_POSIX_MEMORY_PROTECTION	200809L
 
 /* Some filesystems allow all users to change file ownership.  */
 #define	_POSIX_CHOWN_RESTRICTED	0
@@ -69,7 +69,7 @@
 #define	_XOPEN_SHM	1
 
 /* Real-time signals are supported.  */
-#define _POSIX_REALTIME_SIGNALS	200112L
+#define _POSIX_REALTIME_SIGNALS	200809L
 
 /* The LFS interface is available, except for the asynchronous I/O.  */
 #define _LFS_LARGEFILE		1
@@ -77,10 +77,10 @@
 #define _LFS64_STDIO		1
 
 /* POSIX timers are available.  */
-#define _POSIX_TIMERS	200112L
+#define _POSIX_TIMERS	200809L
 
 /* POSIX shared memory objects are implemented.  */
-#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
 
 /* GNU libc provides regular expression handling.  */
 #define _POSIX_REGEXP	1
@@ -89,7 +89,7 @@
 #define _POSIX_SHELL	1
 
 /* The `spawn' function family is supported.  */
-#define _POSIX_SPAWN	200112L
+#define _POSIX_SPAWN	200809L
 
 /* The monotonic clock might be available.  */
 #define _POSIX_MONOTONIC_CLOCK	0
diff --git a/time/time.h b/time/time.h
index 6c8f79d422..eb7549ddf4 100644
--- a/time/time.h
+++ b/time/time.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991-1999,2000,2001,2002,2003,2006
-	Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003,2006,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -210,7 +209,7 @@ extern char *strptime (__const char *__restrict __s,
      __THROW;
 # endif
 
-# ifdef __USE_GNU
+# ifdef __USE_XOPEN2K8
 /* Similar to the two functions above but take the information from
    the provided locale and not the global locale.  */
 # include <xlocale.h>
@@ -219,7 +218,9 @@ extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
 			  __const char *__restrict __format,
 			  __const struct tm *__restrict __tp,
 			  __locale_t __loc) __THROW;
+# endif
 
+# ifdef __USE_GNU
 extern char *strptime_l (__const char *__restrict __s,
 			 __const char *__restrict __fmt, struct tm *__tp,
 			 __locale_t __loc) __THROW;
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index a9067e583b..7a659116c3 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2004,2005,2006,2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2008, 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
@@ -164,7 +164,7 @@ extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
      __THROW __attribute_pure__;
 __END_NAMESPACE_STD
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Compare S1 and S2, ignoring case.  */
 extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
 
@@ -194,7 +194,7 @@ extern size_t wcsxfrm (wchar_t *__restrict __s1,
 		       __const wchar_t *__restrict __s2, size_t __n) __THROW;
 __END_NAMESPACE_STD
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Similar to the two functions above but take the information from
    the provided locale and not the global locale.  */
 
@@ -298,7 +298,7 @@ extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
 # endif
 #endif
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Return the number of wide characters in S, but at most MAXLEN.  */
 extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
      __THROW __attribute_pure__;
@@ -415,7 +415,7 @@ extern size_t wcsrtombs (char *__restrict __dst,
 __END_NAMESPACE_STD
 
 
-#ifdef	__USE_GNU
+#ifdef	__USE_XOPEN2K8
 /* Write wide character representation of at most NMC bytes of the
    multibyte character string SRC to DST.  */
 extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
@@ -428,7 +428,7 @@ extern size_t wcsnrtombs (char *__restrict __dst,
 			  __const wchar_t **__restrict __src,
 			  size_t __nwc, size_t __len,
 			  mbstate_t *__restrict __ps) __THROW;
-#endif	/* use GNU */
+#endif	/* use POSIX 2008 */
 
 
 /* The following functions are extensions found in X/Open CAE.  */
@@ -558,7 +558,7 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr,
 #endif /* GNU */
 
 
-#ifdef	__USE_GNU
+#ifdef	__USE_XOPEN2K8
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in
    DEST.  */
 extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
@@ -572,7 +572,7 @@ extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
 
 /* Wide character I/O functions.  */
 
-#ifdef	__USE_GNU
+#ifdef	__USE_XOPEN2K8
 /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
    a wide character string.  */
 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
diff --git a/wctype/wctype.h b/wctype/wctype.h
index c36f0aa0d0..9b29af5638 100644
--- a/wctype/wctype.h
+++ b/wctype/wctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002,2005,2007,2008,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
@@ -222,7 +222,7 @@ extern wctrans_t wctrans (__const char *__property) __THROW;
 extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW;
 __END_NAMESPACE_C99
 
-# ifdef __USE_GNU
+# ifdef __USE_XOPEN2K8
 /* Declare the interface to extended locale model.  */
 #  include <xlocale.h>
 
@@ -310,7 +310,7 @@ extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
 extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
 			   __locale_t __locale) __THROW;
 
-# endif /* Use GNU.  */
+# endif /* Use POSIX 2008.  */
 
 __END_DECLS