]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* ctype/ctype.h: The *_l functions are in POSIX 2008.
authorUlrich Drepper <drepper@redhat.com>
Thu, 26 Feb 2009 02:23:50 +0000 (02:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 26 Feb 2009 02:23:50 +0000 (02:23 +0000)
* dirent/dirent.h: alphasort, dirfd, scandir, and fdopendir are in
POSIX 2008.
/proc/sys/kernel/rtsig_max doesn't exist anymore, use getrlimit

ChangeLog
NEWS
ctype/ctype.h
dirent/dirent.h
locale/langinfo.h
locale/locale.h
locale/xlocale.h
nptl/ChangeLog
nptl/sysdeps/pthread/pthread.h
stdlib/monetary.h

index d196f534eb04d5e7e635cf0831149926dff309ef..b970d2b4be69370914073ba8abd2956cbb9ebd79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
 
        * include/features.h: Define macros for XPG7/POSIX 2008.
+       * ctype/ctype.h: The *_l functions are in POSIX 2008.
+       * dirent/dirent.h: alphasort, dirfd, scandir, and fdopendir are in
+       POSIX 2008.
        * sysdeps/unix/sysv/linux/bits/stat.h: Protect UTIME_NOW and
        UTIME_OMIT only with __USE_ATFILE.
        * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
@@ -52,7 +55,7 @@
 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/sysconf.c (__sysconf):
-       /proc/sys/kenrel/rtsig_max doesn't exist anymore, use getrlimit
+       /proc/sys/kernel/rtsig_max doesn't exist anymore, use getrlimit
        instead.
 
        * io/sys/stat.h: The lstat functions have been mandatory since 2001.
diff --git a/NEWS b/NEWS
index 5c2d9a7ef75347c6c5c558505181bd9571145b13..04a196c8fd4d6a36f254fe48dd2ed0ed6eb4eb15 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2009-1-30
+GNU C Library NEWS -- history of user-visible changes.  2009-2-25
 Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -12,6 +12,8 @@ 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.
+
 \f
 Version 2.9
 
index 301e25d4d191ef64b411cd1bf3e8a1ca9a4b42b9..e859c4a6240dc8a4e68cd8df38db8d8ea9d7bffc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -216,7 +216,7 @@ __NTH (toupper (int __c))
 #endif /* Not __NO_CTYPE.  */
 
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* The concept of one static locale per category is not very well
    thought out.  Many applications will need to process its data using
    information from several different locales.  Another application is
@@ -292,7 +292,7 @@ extern int toupper_l (int __c, __locale_t __l) __THROW;
 
 #  define __isblank_l(c,l)     __isctype_l((c), _ISblank, (l))
 
-#  if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+#  if defined __USE_SVID || defined __USE_MISC
 #   define __isascii_l(c,l)    ((l), __isascii (c))
 #   define __toascii_l(c,l)    ((l), __toascii (c))
 #  endif
@@ -311,14 +311,14 @@ extern int toupper_l (int __c, __locale_t __l) __THROW;
 
 #  define isblank_l(c,l)       __isblank_l ((c), (l))
 
-#  if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+#  if defined __USE_SVID || defined __USE_MISC
 #   define isascii_l(c,l)      __isascii_l ((c), (l))
 #   define toascii_l(c,l)      __toascii_l ((c), (l))
 #  endif
 
 # endif /* Not __NO_CTYPE.  */
 
-#endif /* Use GNU.  */
+#endif /* Use POSIX 2008.  */
 
 __END_DECLS
 
index ed4147dbcaacb0c7a7ba250889ecb600d67c3487..cb6d0bc2d5a56932e0e19e4a012bbbd5623830ed 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2003-2005, 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
@@ -134,7 +134,7 @@ typedef struct __dirstream DIR;
    marked with __THROW.  */
 extern DIR *opendir (__const char *__name) __nonnull ((1));
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Same as opendir, but open the stream on the file descriptor FD.
 
    This function is a possible cancellation point and therefore not
@@ -218,7 +218,7 @@ extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1));
 extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
 #endif
 
-#if defined __USE_BSD || defined __USE_MISC
+#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8
 
 /* Return the file descriptor used by DIRP.  */
 extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
@@ -227,15 +227,17 @@ extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
 #  define dirfd(dirp)  _DIR_dirfd (dirp)
 # endif
 
-# ifndef MAXNAMLEN
+# if defined __USE_BSD || defined __USE_MISC
+#  ifndef MAXNAMLEN
 /* Get the definitions of the POSIX.1 limits.  */
 #  include <bits/posix1_lim.h>
 
 /* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'.  */
-#  ifdef NAME_MAX
-#   define MAXNAMLEN   NAME_MAX
-#  else
-#   define MAXNAMLEN   255
+#   ifdef NAME_MAX
+#    define MAXNAMLEN  NAME_MAX
+#   else
+#    define MAXNAMLEN  255
+#   endif
 #  endif
 # endif
 
@@ -294,57 +296,59 @@ extern int alphasort64 (__const void *__e1, __const void *__e2)
      __THROW __attribute_pure__ __nonnull ((1, 2));
 # endif
 
-# ifdef __USE_GNU
-/* Function to compare two `struct dirent's by name & version.  */
-#  ifndef __USE_FILE_OFFSET64
-extern int versionsort (__const void *__e1, __const void *__e2)
-     __THROW __attribute_pure__ __nonnull ((1, 2));
-#  else
-#   ifdef __REDIRECT
-extern int __REDIRECT_NTH (versionsort,
-                          (__const void *__e1, __const void *__e2),
-                          versionsort64)
-     __attribute_pure__ __nonnull ((1, 2));
-#   else
-#    define versionsort versionsort64
-#   endif
-#  endif
-
-#  ifdef __USE_LARGEFILE64
-extern int versionsort64 (__const void *__e1, __const void *__e2)
-     __THROW __attribute_pure__ __nonnull ((1, 2));
-#  endif
-# endif
 
+# if defined __USE_BSD || defined __USE_MISC
 /* Read directory entries from FD into BUF, reading at most NBYTES.
    Reading starts at offset *BASEP, and *BASEP is updated with the new
    position after reading.  Returns the number of bytes read; zero when at
    end of directory; or -1 for errors.  */
-# ifndef __USE_FILE_OFFSET64
+#  ifndef __USE_FILE_OFFSET64
 extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
                                size_t __nbytes,
                                __off_t *__restrict __basep)
      __THROW __nonnull ((2, 4));
-# else
-#  ifdef __REDIRECT
+#  else
+#   ifdef __REDIRECT
 extern __ssize_t __REDIRECT_NTH (getdirentries,
                                 (int __fd, char *__restrict __buf,
                                  size_t __nbytes,
                                  __off64_t *__restrict __basep),
                                 getdirentries64) __nonnull ((2, 4));
-#  else
-#   define getdirentries getdirentries64
+#   else
+#    define getdirentries getdirentries64
+#   endif
 #  endif
-# endif
 
-# ifdef __USE_LARGEFILE64
+#  ifdef __USE_LARGEFILE64
 extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
                                  size_t __nbytes,
                                  __off64_t *__restrict __basep)
      __THROW __nonnull ((2, 4));
+#  endif
+# endif /* Use BSD or misc.  */
+#endif /* Use BSD or misc or XPG7.  */
+
+#ifdef __USE_GNU
+/* Function to compare two `struct dirent's by name & version.  */
+# ifndef __USE_FILE_OFFSET64
+extern int versionsort (__const void *__e1, __const void *__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT_NTH (versionsort,
+                          (__const void *__e1, __const void *__e2),
+                          versionsort64)
+     __attribute_pure__ __nonnull ((1, 2));
+#  else
+#   define versionsort versionsort64
+#  endif
 # endif
 
-#endif /* Use BSD or misc.  */
+# ifdef __USE_LARGEFILE64
+extern int versionsort64 (__const void *__e1, __const void *__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# endif
+#endif /* Use GNU.  */
 
 __END_DECLS
 
index 84f53ef1721927c69b45a24af6f1afe4e3d6026e..59017b31c89763997d73bbd5a39a431685b739f7 100644 (file)
@@ -582,7 +582,7 @@ enum
 extern char *nl_langinfo (nl_item __item) __THROW;
 
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
 /* This interface is for the extended locale model.  See <locale.h> for
    more information.  */
 
index 08fc531d7e1878adf5afbb97e8c68a19a477bce9..b24ae245fe0bcc0e9bfcfeb301df01b022dc707e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1995-2002,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2002,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
@@ -130,7 +130,7 @@ extern struct lconv *localeconv (void) __THROW;
 __END_NAMESPACE_STD
 
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
 /* The concept of one static locale per category is not very well
    thought out.  Many applications will need to process its data using
    information from several different locales.  Another application is
@@ -145,8 +145,6 @@ __END_NAMESPACE_STD
 /* Get locale datatype definition.  */
 # include <xlocale.h>
 
-typedef __locale_t locale_t;
-
 /* Return a reference to a data structure representing a set of locale
    datasets.  Unlike for the CATEGORY parameter for `setlocale' the
    CATEGORY_MASK parameter here uses a single bit for each category,
index 2b17d6973f3b74d599b6227a670946aeb635e82b..e879212b790c3928637352c167901fbc61b0a21a 100644 (file)
@@ -1,5 +1,5 @@
 /* Definition of locale datatype.
-   Copyright (C) 1997,2000,02 Free Software Foundation, Inc.
+   Copyright (C) 1997,2000,2002,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -39,4 +39,7 @@ typedef struct __locale_struct
   const char *__names[13];
 } *__locale_t;
 
+/* POSIX 2008 makes locale_t official.  */
+typedef __locale_t locale_t;
+
 #endif /* xlocale.h */
index 124c3d6eb1d984f1a7dac0ce3b99be776488cf8d..edb5f67e4865b265dc1004216299e18c9ba06f2b 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-25  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/pthread.h: The robust mutex functions are in
+       POSIX 2008.
+
 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
index cc7472eafff6d7c857e984ed8d3a85bc29147c55..3155d85a09a95b684f4f14057f02cff87d8f482a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -63,12 +63,14 @@ enum
 };
 
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
 /* Robust mutex or not flags.  */
 enum
 {
-  PTHREAD_MUTEX_STALLED_NP,
-  PTHREAD_MUTEX_ROBUST_NP
+  PTHREAD_MUTEX_STALLED,
+  PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
+  PTHREAD_MUTEX_ROBUST_NP,
+  PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
 };
 #endif
 
@@ -762,10 +764,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
 #endif
 
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 /* Declare the state protected by MUTEX as consistent.  */
 extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
      __THROW __nonnull ((1));
+# ifdef __USE_GNU
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
+# endif
 #endif
 
 
@@ -827,16 +833,26 @@ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
      __THROW __nonnull ((1));
 #endif
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
 /* Get the robustness flag of the mutex attribute ATTR.  */
+extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
+                                       int *__robustness)
+     __THROW __nonnull ((1, 2));
+# ifdef __USE_GNU
 extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
                                           int *__robustness)
      __THROW __nonnull ((1, 2));
+# endif
 
 /* Set the robustness flag of the mutex attribute ATTR.  */
+extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
+                                       int __robustness)
+     __THROW __nonnull ((1));
+# ifdef __USE_GNU
 extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
                                           int __robustness)
      __THROW __nonnull ((1));
+# endif
 #endif
 
 
index c8483b27a89055c21508620439e4f8e73ba6f96e..7f0c0ec208e89e6bc40e7cfe12863fda774ae19e 100644 (file)
@@ -41,7 +41,7 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
                        __const char *__restrict __format, ...)
      __THROW __attribute_format_strfmon__ (3, 4);
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # include <xlocale.h>
 
 /* Formatting a monetary value according to the current locale.  */