This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-24-g5e0d030


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5e0d030065a49247b306a2b445fa7720b8ee09cb (commit)
       via  d1863a4e958fb6fcdfdc1a93188c8125ce5476ee (commit)
       via  aff067358751a03ad1f9e397204490b8bfb2fb29 (commit)
       via  9f1151705e3d861a4d6d680e74158cd708119053 (commit)
       via  db6af3ebf46a83b885455dc03a3c2c1c2c2dedec (commit)
       via  8ea79a616e43093f403927e425c197afe39196b7 (commit)
       via  16578fa7b34a92c40f6c657ddadc33a7384b6537 (commit)
       via  8b43a4cc567222ed61f157eccc0a8e1411082994 (commit)
       via  0c023bb722bf89f95308f96cf567ac6fe03d402b (commit)
       via  dadebdaeeba87778cad0fb842f8e75bdd22a7043 (commit)
       via  ce5294e268bf222af614a53689904eef69dff791 (commit)
       via  74033a2507841cf077e31221de2481ff30b43d51 (commit)
       via  380d7e87dc80978581e73063dff0e264283c0306 (commit)
       via  c0e87cc01807aee964014bb6518694e7f42b71a7 (commit)
       via  4e9e7a356c37edc428339b4ba27420fe320d0a3c (commit)
       via  8fd8ff3bd8234593a694be045460e471d295a6af (commit)
       via  03a718297d64e68efb36069b0cc14c1039f32d89 (commit)
       via  839e283ece8f4a8312dd6c558df8c739356fddb7 (commit)
       via  90fa7312770b1caca8843a55a9c3825585aac140 (commit)
       via  8d44e1508660d4195146730541876147013d484f (commit)
       via  d78099052b6bdc164f8f6a582a9b7b574f700e28 (commit)
      from  a316c1f6823590fc6209e470c77d4cb44f4e2f50 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e0d030065a49247b306a2b445fa7720b8ee09cb

commit 5e0d030065a49247b306a2b445fa7720b8ee09cb
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Jan 3 10:37:59 2012 -0500

    Fix assertion in gconv's loop.c

diff --git a/ChangeLog b/ChangeLog
index 074c7a8..f31cc94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-01-03  Ulrich Drepper  <drepper@gmail.com>
 
+	* iconv/loop.c (single loop): Fix assertion in storing of
+	remaining bytes.
+
 	* posix/regcomp.c (init_word_char): Optimize a bit for sane encodings.
 
 2012-01-01  Ulrich Drepper  <drepper@gmail.com>
diff --git a/iconv/loop.c b/iconv/loop.c
index 4f43062..2e88b1d 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -1,5 +1,5 @@
 /* Conversion loop frame work.
-   Copyright (C) 1998-2003, 2005, 2008, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-2003, 2005, 2008, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -390,6 +390,7 @@ SINGLE(LOOPFCT) (struct __gconv_step *step,
   UNPACK_BYTES
 #else
   /* Add the bytes from the state to the input buffer.  */
+  assert ((state->__count & 7) <= sizeof (state->__value));
   for (inlen = 0; inlen < (size_t) (state->__count & 7); ++inlen)
     bytebuf[inlen] = state->__value.__wchb[inlen];
 #endif
@@ -474,7 +475,7 @@ SINGLE(LOOPFCT) (struct __gconv_step *step,
       /* We don't have enough input for another complete input
 	 character.  */
       assert (inend - inptr > (state->__count & ~7));
-      assert (inend - inptr <= 7);
+      assert (inend - inptr <= sizeof (state->__value));
       state->__count = (state->__count & ~7) | (inend - inptr);
       inlen = 0;
       while (inptr < inend)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1863a4e958fb6fcdfdc1a93188c8125ce5476ee

commit d1863a4e958fb6fcdfdc1a93188c8125ce5476ee
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Jan 3 08:01:45 2012 -0500

    Typo in test for C11-capable compiler

diff --git a/wcsmbs/c16rtomb.c b/wcsmbs/c16rtomb.c
index 33e6b92..c75ca3b 100644
--- a/wcsmbs/c16rtomb.c
+++ b/wcsmbs/c16rtomb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2011.
 
@@ -31,7 +31,7 @@
 # define EILSEQ EINVAL
 #endif
 
-#if __STDC__ >= 20100L
+#if __STDC__ >= 201000L
 # define u(c) U##c
 #else
 # define u(c) L##c
diff --git a/wcsmbs/mbrtoc16.c b/wcsmbs/mbrtoc16.c
index 3a3a45c..7b5822d 100644
--- a/wcsmbs/mbrtoc16.c
+++ b/wcsmbs/mbrtoc16.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 2011.
 
@@ -30,7 +30,7 @@
 # define EILSEQ EINVAL
 #endif
 
-#if __STDC__ >= 20100L
+#if __STDC__ >= 201000L
 # define U(c) U##c
 #else
 # define U(c) L##c

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aff067358751a03ad1f9e397204490b8bfb2fb29

commit aff067358751a03ad1f9e397204490b8bfb2fb29
Merge: 9f11517 db6af3e
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Jan 3 07:54:34 2012 -0500

    Merge branch 'c11'


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f1151705e3d861a4d6d680e74158cd708119053

commit 9f1151705e3d861a4d6d680e74158cd708119053
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Jan 3 07:54:15 2012 -0500

    Optimize regex a bit

diff --git a/ChangeLog b/ChangeLog
index 737c4ba..73b1d41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-03  Ulrich Drepper  <drepper@gmail.com>
+
+	* posix/regcomp.c (init_word_char): Optimize a bit for sane encodings.
+
 2012-01-01  Ulrich Drepper  <drepper@gmail.com>
 
 	* posix/getconf.c: Update copyright year.
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 34ee845..6771dbb 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2007,2009,2010,2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2007,2009,2010,2011,2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -926,10 +926,38 @@ static void
 internal_function
 init_word_char (re_dfa_t *dfa)
 {
-  int i, j, ch;
   dfa->word_ops_used = 1;
-  for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
-    for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+  int i = 0;
+  int ch = 0;
+  if (BE (dfa->map_notascii == 0, 1))
+    {
+      if (sizeof (dfa->word_char[0]) == 8)
+	{
+	  dfa->word_char[0] = UINT64_C (0x03ff000000000000);
+	  dfa->word_char[1] = UINT64_C (0x07fffffe87fffffe);
+	  i = 2;
+	}
+      else if (sizeof (dfa->word_char[0]) == 4)
+	{
+	  dfa->word_char[0] = UINT32_C (0x00000000);
+	  dfa->word_char[1] = UINT32_C (0x03ff0000);
+	  dfa->word_char[2] = UINT32_C (0x87fffffe);
+	  dfa->word_char[3] = UINT32_C (0x07fffffe);
+	  i = 4;
+	}
+      else
+	abort ();
+      ch = 128;
+
+      if (BE (dfa->is_utf8, 1))
+	{
+	  memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
+	  return;
+	}
+    }
+
+  for (; i < BITSET_WORDS; ++i)
+    for (int j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
       if (isalnum (ch) || ch == '_')
 	dfa->word_char[i] |= (bitset_word_t) 1 << j;
 }

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db6af3ebf46a83b885455dc03a3c2c1c2c2dedec

commit db6af3ebf46a83b885455dc03a3c2c1c2c2dedec
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Dec 28 06:19:42 2011 -0500

    Add uchar.h support, part 1
    
    c16 support for locales other than the C locale is still missing.

diff --git a/ChangeLog b/ChangeLog
index ca936b3..dab8e35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,24 @@
 
 2011-12-24  Ulrich Drepper  <drepper@gmail.com>
 
+	* iconv/gconv_simple.c: Add ASCII<->UTF-16 transformations.
+	* iconv/gconv_builtin.h: Add entries for internal ASCII<->UTF-16
+	transformations.
+	* iconv/gconv_int.h: Likewise.
+	* wcsmbs/Makefile (routines): Add mbrtoc16 and c16rtomb.
+	* wcsmbs/Versions: Export mbrtoc16, c16rtomb, mbrtoc32, c32rtomb
+	from libc for GLIBC_2.16.
+	* wcsmbs/mbrtowc.c: Define mbrtoc32 alias.
+	* wcsmbs/wcrtomb.c: Define c32rtomb alias.
+	* wcsmbs/uchar.h: Really define mbstate_t.
+	* wcsmbs/wchar.h: Allow defining mbstate_t in uchar.h.
+	* wcsmbs/c16rtomb.c: New file.
+	* wcsmbs/mbrtoc16.c: New file.
+	* wcsmbs/wcsmbsload.c: Add static definitions for c16 conversions
+	for C/POSIX locale.
+	(__wcsmbs_load_conv): Do not fill in c16 routines yet.
+	* wcsmbs/wcsmbsload.h (gconv_fcts): Add entries for c16 routines.
+
 	* wcsmbs/wchar.h: Add missing __restrict.
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
diff --git a/iconv/gconv_builtin.h b/iconv/gconv_builtin.h
index ef9ab8d..fd736a4 100644
--- a/iconv/gconv_builtin.h
+++ b/iconv/gconv_builtin.h
@@ -1,5 +1,5 @@
 /* Builtin transformations.
-   Copyright (C) 1997-1999, 2000-2002, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-1999, 2000-2002, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -122,3 +122,24 @@ BUILTIN_TRANSFORMATION ("INTERNAL", "UNICODEBIG//", 1,
 			__gconv_transform_internal_ucs2reverse, NULL,
 			4, 4, 2, 2)
 #endif
+
+
+BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16//", 1, "=ascii->UTF-16",
+			__gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
+
+BUILTIN_TRANSFORMATION ("UTF-16//", "ANSI_X3.4-1968//", 1, "=UTF-16->ascii",
+			__gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
+
+#if BYTE_ORDER == BIG_ENDIAN
+BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16BE//", 1, "=ascii->UTF-16BE",
+			__gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
+
+BUILTIN_TRANSFORMATION ("UTF-16BE//", "ANSI_X3.4-1968//", 1, "=UTF-16BE->ascii",
+			__gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
+#else
+BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16LE//", 1, "=ascii->UTF-16LE",
+			__gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
+
+BUILTIN_TRANSFORMATION ("UTF-16LE//", "ANSI_X3.4-1968//", 1, "=UTF-16LE->ascii",
+			__gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
+#endif
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index fd11220..80253dd 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2005, 2006, 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -303,6 +303,8 @@ __BUILTIN_TRANSFORM (__gconv_transform_internal_ucs4le);
 __BUILTIN_TRANSFORM (__gconv_transform_ucs4le_internal);
 __BUILTIN_TRANSFORM (__gconv_transform_internal_utf16);
 __BUILTIN_TRANSFORM (__gconv_transform_utf16_internal);
+__BUILTIN_TRANSFORM (__gconv_transform_ascii_utf16);
+__BUILTIN_TRANSFORM (__gconv_transform_utf16_ascii);
 # undef __BUITLIN_TRANSFORM
 
 /* Specialized conversion function for a single byte to INTERNAL, recognizing
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index e34f377..b0ef3e6 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -1,5 +1,5 @@
 /* Simple transformations functions.
-   Copyright (C) 1997-2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -965,7 +965,7 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
 	    cnt = 2;							      \
 	    ch &= 0x1f;							      \
 	  }								      \
-        else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1))		      \
+	else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1))		      \
 	  {								      \
 	    /* We expect three bytes.  */				      \
 	    cnt = 3;							      \
@@ -1221,7 +1221,7 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
     else								      \
       {									      \
 	put16 (outptr, val);						      \
-        outptr += sizeof (uint16_t);					      \
+	outptr += sizeof (uint16_t);					      \
 	inptr += 4;							      \
       }									      \
   }
@@ -1320,3 +1320,72 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
 #define LOOP_NEED_FLAGS
 #include <iconv/loop.c>
 #include <iconv/skeleton.c>
+
+
+/* Convert from ISO 646-IRV to UTF-16.  */
+#define DEFINE_INIT		0
+#define DEFINE_FINI		0
+#define MIN_NEEDED_FROM		1
+#define MIN_NEEDED_TO		2
+#define FROM_DIRECTION		1
+#define FROM_LOOP		ascii_utf16_loop
+#define TO_LOOP			ascii_utf16_loop /* This is not used.  */
+#define FUNCTION_NAME		__gconv_transform_ascii_utf16
+#define ONE_DIRECTION		1
+
+#define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
+#define LOOPFCT			FROM_LOOP
+#define BODY \
+  {									      \
+    if (__builtin_expect (*inptr > '\x7f', 0))				      \
+      {									      \
+	/* The value is too large.  We don't try transliteration here since   \
+	   this is not an error because of the lack of possibilities to	      \
+	   represent the result.  This is a genuine bug in the input since    \
+	   ASCII does not allow such values.  */			      \
+	STANDARD_FROM_LOOP_ERR_HANDLER (1);				      \
+      }									      \
+    else								      \
+      {									      \
+	/* It's an one byte sequence.  */				      \
+	*((uint16_t *) outptr) = *inptr++;				      \
+	outptr += sizeof (uint16_t);					      \
+      }									      \
+  }
+#define LOOP_NEED_FLAGS
+#include <iconv/loop.c>
+#include <iconv/skeleton.c>
+
+
+/* Convert from UTF-16 to ISO 646-IRV.  */
+#define DEFINE_INIT		0
+#define DEFINE_FINI		0
+#define MIN_NEEDED_FROM		2
+#define MIN_NEEDED_TO		1
+#define FROM_DIRECTION		1
+#define FROM_LOOP		utf16_ascii_loop
+#define TO_LOOP			utf16_ascii_loop /* This is not used.  */
+#define FUNCTION_NAME		__gconv_transform_utf16_ascii
+#define ONE_DIRECTION		1
+
+#define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
+#define LOOPFCT			FROM_LOOP
+#define BODY \
+  {									      \
+    if (__builtin_expect (*((const uint16_t *) inptr) > 0x7f, 0))	      \
+      {									      \
+	UNICODE_TAG_HANDLER (*((const uint16_t *) inptr), 2);		      \
+	STANDARD_TO_LOOP_ERR_HANDLER (2);				      \
+      }									      \
+    else								      \
+      {									      \
+	/* It's an one byte sequence.  */				      \
+	*outptr++ = *((const uint16_t *) inptr);			      \
+	inptr += sizeof (uint16_t);					      \
+      }									      \
+  }
+#define LOOP_NEED_FLAGS
+#include <iconv/loop.c>
+#include <iconv/skeleton.c>
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 0bb1740..8c446e1 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -40,7 +40,8 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
 	    wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
 	    wcsmbsload mbsrtowcs_l \
 	    isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
-	    isoc99_swscanf isoc99_vswscanf
+	    isoc99_swscanf isoc99_vswscanf \
+	    mbrtoc16 c16rtomb
 
 strop-tests :=  wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
diff --git a/wcsmbs/Versions b/wcsmbs/Versions
index b6dfa85..10bccc9 100644
--- a/wcsmbs/Versions
+++ b/wcsmbs/Versions
@@ -28,4 +28,7 @@ libc {
     __isoc99_wscanf; __isoc99_vwscanf; __isoc99_fwscanf; __isoc99_vfwscanf;
     __isoc99_swscanf; __isoc99_vswscanf;
   }
+  GLIBC_2.16 {
+    mbrtoc16; c16rtomb; mbrtoc32; c32rtomb;
+  }
 }
diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/c16rtomb.c
similarity index 81%
copy from wcsmbs/wcrtomb.c
copy to wcsmbs/c16rtomb.c
index aa51b68..33e6b92 100644
--- a/wcsmbs/wcrtomb.c
+++ b/wcsmbs/c16rtomb.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996,1997,1998,2000,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 2011.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,7 @@
 #include <errno.h>
 #include <gconv.h>
 #include <stdlib.h>
-#include <wchar.h>
+#include <uchar.h>
 #include <wcsmbsload.h>
 
 #include <sysdep.h>
@@ -31,12 +31,18 @@
 # define EILSEQ EINVAL
 #endif
 
+#if __STDC__ >= 20100L
+# define u(c) U##c
+#else
+# define u(c) L##c
+#endif
+
 
 /* This is the private state used if PS is NULL.  */
 static mbstate_t state;
 
 size_t
-__wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+c16rtomb (char *s, char16_t c16, mbstate_t *ps)
 {
   char buf[MB_CUR_MAX];
   struct __gconv_step_data data;
@@ -57,7 +63,7 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
   if (s == NULL)
     {
       s = buf;
-      wc = L'\0';
+      c16 = u('\0');
     }
 
   /* Tell where we want to have the result.  */
@@ -66,18 +72,18 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
 
   /* Get the conversion functions.  */
   fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
-  __gconv_fct fct = fcts->tomb->__fct;
+  __gconv_fct fct = fcts->fromc16->__fct;
 #ifdef PTR_DEMANGLE
   if (fcts->tomb->__shlib_handle != NULL)
     PTR_DEMANGLE (fct);
 #endif
 
-  /* If WC is the NUL character we write into the output buffer the byte
+  /* If C16 is the NUL character we write into the output buffer the byte
      sequence necessary for PS to get into the initial state, followed
      by a NUL byte.  */
-  if (wc == L'\0')
+  if (c16 == L'\0')
     {
-      status = DL_CALL_FCT (fct, (fcts->tomb, &data, NULL, NULL,
+      status = DL_CALL_FCT (fct, (fcts->fromc16, &data, NULL, NULL,
 				  NULL, &dummy, 1, 1));
 
       if (status == __GCONV_OK || status == __GCONV_EMPTY_INPUT)
@@ -86,11 +92,11 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
   else
     {
       /* Do a normal conversion.  */
-      const unsigned char *inbuf = (const unsigned char *) &wc;
+      const unsigned char *inbuf = (const unsigned char *) &c16;
 
       status = DL_CALL_FCT (fct,
-			    (fcts->tomb, &data, &inbuf,
-			     inbuf + sizeof (wchar_t), NULL, &dummy, 0, 1));
+			    (fcts->fromc16, &data, &inbuf,
+			     inbuf + sizeof (char16_t), NULL, &dummy, 0, 1));
     }
 
   /* There must not be any problems with the conversion but illegal input
@@ -113,5 +119,3 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
 
   return result;
 }
-weak_alias (__wcrtomb, wcrtomb)
-libc_hidden_weak (wcrtomb)
diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtoc16.c
similarity index 82%
copy from wcsmbs/mbrtowc.c
copy to wcsmbs/mbrtoc16.c
index b534571..3a3a45c 100644
--- a/wcsmbs/mbrtowc.c
+++ b/wcsmbs/mbrtoc16.c
@@ -1,7 +1,6 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005
-   Free Software Foundation, Inc.
+/* Copyright (C) 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
+   Contributed by Ulrich Drepper <drepper@gnu.org>, 2011.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -22,7 +21,7 @@
 #include <dlfcn.h>
 #include <errno.h>
 #include <gconv.h>
-#include <wchar.h>
+#include <uchar.h>
 #include <wcsmbsload.h>
 
 #include <sysdep.h>
@@ -31,19 +30,26 @@
 # define EILSEQ EINVAL
 #endif
 
+#if __STDC__ >= 20100L
+# define U(c) U##c
+#else
+# define U(c) L##c
+#endif
+
+
 /* This is the private state used if PS is NULL.  */
 static mbstate_t state;
 
 size_t
-__mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+mbrtoc16 (char16_t *pc16, const char *s, size_t n, mbstate_t *ps)
 {
-  wchar_t buf[1];
+  char16_t buf[1];
   struct __gconv_step_data data;
   int status;
   size_t result;
   size_t dummy;
   const unsigned char *inbuf, *endbuf;
-  unsigned char *outbuf = (unsigned char *) (pwc ?: buf);
+  unsigned char *outbuf = (unsigned char *) (pc16 ?: buf);
   const struct gconv_fcts *fcts;
 
   /* Set information for this step.  */
@@ -64,7 +70,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 
   /* Tell where we want the result.  */
   data.__outbuf = outbuf;
-  data.__outbufend = outbuf + sizeof (wchar_t);
+  data.__outbufend = outbuf + sizeof (char16_t);
 
   /* Get the conversion functions.  */
   fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
@@ -74,12 +80,12 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   endbuf = inbuf + n;
   if (__builtin_expect (endbuf < inbuf, 0))
     endbuf = (const unsigned char *) ~(uintptr_t) 0;
-  __gconv_fct fct = fcts->towc->__fct;
+  __gconv_fct fct = fcts->toc16->__fct;
 #ifdef PTR_DEMANGLE
-  if (fcts->towc->__shlib_handle != NULL)
+  if (fcts->toc16->__shlib_handle != NULL)
     PTR_DEMANGLE (fct);
 #endif
-  status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf,
+  status = DL_CALL_FCT (fct, (fcts->toc16, &data, &inbuf, endbuf,
 			      NULL, &dummy, 0, 1));
 
   /* There must not be any problems with the conversion but illegal input
@@ -95,7 +101,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
       || status == __GCONV_FULL_OUTPUT)
     {
       if (data.__outbuf != (unsigned char *) outbuf
-	  && *(wchar_t *) outbuf == L'\0')
+	  && *(char16_t *) outbuf == U('\0'))
 	{
 	  /* The converted character is the NUL character.  */
 	  assert (__mbsinit (data.__statep));
@@ -114,6 +120,3 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 
   return result;
 }
-libc_hidden_def (__mbrtowc)
-weak_alias (__mbrtowc, mbrtowc)
-libc_hidden_weak (mbrtowc)
diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c
index b534571..03b8348 100644
--- a/wcsmbs/mbrtowc.c
+++ b/wcsmbs/mbrtowc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
@@ -117,3 +117,8 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 libc_hidden_def (__mbrtowc)
 weak_alias (__mbrtowc, mbrtowc)
 libc_hidden_weak (mbrtowc)
+
+/* There should be no difference between the UTF-32 handling required
+   by mbrtoc32 and the wchar_t handling which has long since been
+   implemented in mbrtowc.  */
+weak_alias (__mbrtowc, mbrtoc32)
diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
index 44637c3..bb5f3ba 100644
--- a/wcsmbs/uchar.h
+++ b/wcsmbs/uchar.h
@@ -31,6 +31,14 @@
 #define __need_mbstate_t
 #include <wchar.h>
 
+#ifndef __mbstate_t_defined
+__BEGIN_NAMESPACE_C99
+/* Public type.  */
+typedef __mbstate_t mbstate_t;
+__END_NAMESPACE_C99
+# define __mbstate_t_defined 1
+#endif
+
 
 #ifdef __GNUC__
 /* Define the 16-bit and 32-bit character types.  Use the information
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 2b35f51..ccaaed8 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -77,8 +77,8 @@ __END_NAMESPACE_STD
 # endif
 #endif
 
-#if (defined _WCHAR_H || defined __need_mbstate_t) && !defined __mbstate_t_defined
-# define __mbstate_t_defined	1
+#if (defined _WCHAR_H || defined __need_mbstate_t) && !defined ____mbstate_t_defined
+# define ____mbstate_t_defined	1
 /* Conversion state information.  */
 typedef struct
 {
@@ -101,10 +101,14 @@ typedef struct
    defined.  */
 #ifdef _WCHAR_H
 
+# ifndef __mbstate_t_defined
 __BEGIN_NAMESPACE_C99
 /* Public type.  */
 typedef __mbstate_t mbstate_t;
 __END_NAMESPACE_C99
+#  define __mbstate_t_defined 1
+# endif
+
 #ifdef __USE_GNU
 __USING_NAMESPACE_C99(mbstate_t)
 #endif
diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c
index aa51b68..547b05a 100644
--- a/wcsmbs/wcrtomb.c
+++ b/wcsmbs/wcrtomb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,2000,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2000,2002,2005,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -115,3 +115,8 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
 }
 weak_alias (__wcrtomb, wcrtomb)
 libc_hidden_weak (wcrtomb)
+
+/* There should be no difference between the UTF-32 handling required
+   by c32rtomb and the wchar_t handling which has long since been
+   implemented in wcrtomb.  */
+weak_alias (__wcrtomb, c32rtomb)
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
index 328f164..212a6c8 100644
--- a/wcsmbs/wcsmbsload.c
+++ b/wcsmbs/wcsmbsload.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002,2004,2005,2008,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002,2004,2005,2008,2010,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -67,6 +67,44 @@ static const struct __gconv_step to_mb =
   .__data = NULL
 };
 
+static const struct __gconv_step to_c16 =
+{
+  .__shlib_handle = NULL,
+  .__modname = NULL,
+  .__counter = INT_MAX,
+  .__from_name = (char *) "ANSI_X3.4-1968//TRANSLIT",
+  .__to_name = (char *) "UTF-16//",
+  .__fct = __gconv_transform_ascii_utf16,
+  .__btowc_fct = NULL,
+  .__init_fct = NULL,
+  .__end_fct = NULL,
+  .__min_needed_from = 1,
+  .__max_needed_from = 1,
+  .__min_needed_to = 4,
+  .__max_needed_to = 4,
+  .__stateful = 0,
+  .__data = NULL
+};
+
+static const struct __gconv_step from_c16 =
+{
+  .__shlib_handle = NULL,
+  .__modname = NULL,
+  .__counter = INT_MAX,
+  .__from_name = (char *) "UTF-16//",
+  .__to_name = (char *) "ANSI_X3.4-1968//TRANSLIT",
+  .__fct = __gconv_transform_utf16_ascii,
+  .__btowc_fct = NULL,
+  .__init_fct = NULL,
+  .__end_fct = NULL,
+  .__min_needed_from = 4,
+  .__max_needed_from = 4,
+  .__min_needed_to = 1,
+  .__max_needed_to = 1,
+  .__stateful = 0,
+  .__data = NULL
+};
+
 
 /* For the default locale we only have to handle ANSI_X3.4-1968.  */
 const struct gconv_fcts __wcsmbs_gconv_fcts_c =
@@ -74,7 +112,12 @@ const struct gconv_fcts __wcsmbs_gconv_fcts_c =
   .towc = (struct __gconv_step *) &to_wc,
   .towc_nsteps = 1,
   .tomb = (struct __gconv_step *) &to_mb,
-  .tomb_nsteps = 1
+  .tomb_nsteps = 1,
+
+  .toc16 = (struct __gconv_step *) &to_c16,
+  .toc16_nsteps = 1,
+  .fromc16 = (struct __gconv_step *) &from_c16,
+  .fromc16_nsteps = 1,
 };
 
 
@@ -191,6 +234,12 @@ __wcsmbs_load_conv (struct __locale_data *new_category)
 					   &new_fcts->tomb_nsteps)
 			: NULL);
 
+      // XXX
+      new_fcts->toc16 = (struct __gconv_step *) &to_c16;
+      new_fcts->toc16_nsteps = 1;
+      new_fcts->fromc16 = (struct __gconv_step *) &from_c16;
+      new_fcts->fromc16_nsteps = 1;
+
       /* If any of the conversion functions is not available we don't
 	 use any since this would mean we cannot convert back and
 	 forth.*/
@@ -242,14 +291,36 @@ internal_function
 __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
 {
   copy->towc = __wcsmbs_getfct ("INTERNAL", name, &copy->towc_nsteps);
-  if (copy->towc != NULL)
+  if (copy->towc == NULL)
+    return 1;
+
+  copy->tomb = __wcsmbs_getfct (name, "INTERNAL", &copy->tomb_nsteps);
+  if (copy->tomb == NULL)
+    goto out_mb;
+
+#if 0
+  copy->fromc16 = __wcsmbs_getfct (name, "UTF-16//", &copy->fromc16_nsteps);
+  if (copy->fromc16 == NULL)
+    goto out_fromc16;
+
+  copy->toc16 = __wcsmbs_getfct ("UTF-16//", name, &copy->toc16_nsteps);
+  if (copy->toc16 == NULL)
+#else
+  if (0)
+#endif
     {
-      copy->tomb = __wcsmbs_getfct (name, "INTERNAL", &copy->tomb_nsteps);
-      if (copy->tomb == NULL)
-	__gconv_close_transform (copy->towc, copy->towc_nsteps);
+#if 0
+      __gconv_close_transform (copy->fromc16, copy->fromc16_nsteps);
+    out_fromc16:
+      __gconv_close_transform (copy->tomb, copy->tomb_nsteps);
+#endif
+    out_mb:
+      __gconv_close_transform (copy->towc, copy->towc_nsteps);
+    out_wc:
+      return 1;
     }
 
-  return copy->towc == NULL || copy->tomb == NULL ? 1 : 0;
+  return 0;
 }
 
 void internal_function
@@ -264,6 +335,11 @@ _nl_cleanup_ctype (struct __locale_data *locale)
       /* Free the old conversions.  */
       __gconv_close_transform (data->tomb, data->tomb_nsteps);
       __gconv_close_transform (data->towc, data->towc_nsteps);
+#if 0
+      // XXX
+      __gconv_close_transform (data->fromc16, data->fromc16_nsteps);
+      __gconv_close_transform (data->toc16, data->toc16c_nsteps);
+#endif
       free ((char *) data);
     }
 }
diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h
index e2b1bfa..064c41c 100644
--- a/wcsmbs/wcsmbsload.h
+++ b/wcsmbs/wcsmbsload.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -32,6 +32,11 @@ struct gconv_fcts
     size_t towc_nsteps;
     struct __gconv_step *tomb;
     size_t tomb_nsteps;
+
+    struct __gconv_step *toc16;
+    size_t toc16_nsteps;
+    struct __gconv_step *fromc16;
+    size_t fromc16_nsteps;
   };
 
 /* Set of currently active conversion functions.  */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ea79a616e43093f403927e425c197afe39196b7

commit 8ea79a616e43093f403927e425c197afe39196b7
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Dec 27 09:57:25 2011 -0500

    More fallout from gets removal

diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
index 0ec8ab0..7f0186e 100644
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -33,6 +33,12 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
+__BEGIN_DECLS
+/* The <stdio.h> header does not include the declaration for gets
+   anymore when compiling with _GNU_SOURCE.  Provide a copy here.  */
+extern char *gets (char *__s);
+__END_DECLS
+
 #define obstack_chunk_alloc malloc
 #define obstack_chunk_free free
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16578fa7b34a92c40f6c657ddadc33a7384b6537

commit 16578fa7b34a92c40f6c657ddadc33a7384b6537
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Dec 27 09:53:32 2011 -0500

    Better gets prototype and fallout from removal

diff --git a/libio/stdio.h b/libio/stdio.h
index 3656bb5..b392028 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -638,7 +638,7 @@ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern char *gets (char *__s) __wur;
+extern char *gets (char *__s) __wur __attribute_deprecated__;
 #endif
 __END_NAMESPACE_STD
 
diff --git a/stdio-common/tst-gets.c b/stdio-common/tst-gets.c
index 87786f5..463f345 100644
--- a/stdio-common/tst-gets.c
+++ b/stdio-common/tst-gets.c
@@ -1,5 +1,5 @@
 /* Tests for gets.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
 
@@ -21,6 +21,11 @@
 #include <stdio.h>
 #include <string.h>
 
+/* The <stdio.h> header does not include the declaration for gets
+   anymore when compiling with _GNU_SOURCE.  Provide a copy here.  */
+extern char *gets (char *__s);
+
+
 int
 main (void)
 {

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b43a4cc567222ed61f157eccc0a8e1411082994

commit 8b43a4cc567222ed61f157eccc0a8e1411082994
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Dec 27 07:35:05 2011 -0500

    Fix aligned_alloc prototype

diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 5588666..99c34a4 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -511,7 +511,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
 
 #ifdef __USE_ISOC11
 /* ISO C variant of aligned allocation.  */
-extern int aligned_alloc (size_t __alignment, size_t __size) __THROW __wur;
+extern void *aligned_alloc (size_t __alignment, size_t __size)
+     __THROW __wur __attribute__ ((__malloc__, __alloc_size__ (2)));
 #endif
 
 __BEGIN_NAMESPACE_STD

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c023bb722bf89f95308f96cf567ac6fe03d402b

commit 0c023bb722bf89f95308f96cf567ac6fe03d402b
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Dec 25 05:52:37 2011 -0500

    Start of uchar.h work

diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 8b1ae6c..0bb1740 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -22,7 +22,7 @@
 #
 subdir	:= wcsmbs
 
-headers	:= wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h
+headers	:= wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
 distribute := wcwidth.h wcsmbsload.h
 
 routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
new file mode 100644
index 0000000..44637c3
--- /dev/null
+++ b/wcsmbs/uchar.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 2011 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/*
+ *      ISO C11 Standard: 7.28
+ *	Unicode utilities	<uchar.h>
+ */
+
+#ifndef _UCHAR_H
+#define _UCHAR_H	1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+#define __need_mbstate_t
+#include <wchar.h>
+
+
+#ifdef __GNUC__
+/* Define the 16-bit and 32-bit character types.  Use the information
+   provided by the compiler.  */
+# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__
+#  if defined __STDC__ && __STDC__ < 201000L
+#   error "<uchar.h> requires ISO C11 mode"
+#  else
+#   error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing"
+#  endif
+# endif
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+
+__BEGIN_DECLS
+
+/* Write char16_t representation of multibyte character pointed
+   to by S to PC16.  */
+extern size_t mbrtoc16 (char16_t *__restrict __pc16,
+			__const char *__restrict __s, size_t __n,
+			mbstate_t *__restrict __p) __THROW;
+
+/* Write multibyte representation of char16_t C16 to S.  */
+extern size_t c16rtomb (char *__restrict __s, char16_t __c16,
+			mbstate_t *__restrict __ps) __THROW;
+
+
+
+/* Write char32_t representation of multibyte character pointed
+   to by S to PC32.  */
+extern size_t mbrtoc32 (char32_t *__restrict __pc32,
+			__const char *__restrict __s, size_t __n,
+			mbstate_t *__restrict __p) __THROW;
+
+/* Write multibyte representation of char32_t C32 to S.  */
+extern size_t c32rtomb (char *__restrict __s, char32_t __c32,
+			mbstate_t *__restrict __ps) __THROW;
+
+__END_DECLS
+
+#endif	/* uchar.h */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dadebdaeeba87778cad0fb842f8e75bdd22a7043

commit dadebdaeeba87778cad0fb842f8e75bdd22a7043
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Dec 24 04:32:49 2011 -0500

    Add missing restrict in mbrtowc declaration

diff --git a/ChangeLog b/ChangeLog
index fb53698..ca936b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,10 @@
 	* posix/regex_internal.c (re_string_fetch_byte_case): Remove
 	pure attribute.
 
+2011-12-24  Ulrich Drepper  <drepper@gmail.com>
+
+	* wcsmbs/wchar.h: Add missing __restrict.
+
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #13532]
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 80d7ae2..2b35f51 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -361,7 +361,7 @@ extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__;
    to by S to PWC.  */
 extern size_t mbrtowc (wchar_t *__restrict __pwc,
 		       __const char *__restrict __s, size_t __n,
-		       mbstate_t *__p) __THROW;
+		       mbstate_t *__restrict __p) __THROW;
 
 /* Write multibyte representation of wide character WC to S.  */
 extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce5294e268bf222af614a53689904eef69dff791

commit ce5294e268bf222af614a53689904eef69dff791
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Dec 24 00:42:54 2011 -0500

    Typo in CL

diff --git a/ChangeLog b/ChangeLog
index 7ad4272..fb53698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,7 +56,7 @@
 	[BZ #13529]
 	* assert/assert.h (static_assert): Define.
 
-	* version.h: Update for 2.15 development version.
+	* version.h: Update for 2.16 development version.
 
 	[BZ #13526]
 	* include/features.h: Handle __STDC_VERSION__ >= 201112 and

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74033a2507841cf077e31221de2481ff30b43d51

commit 74033a2507841cf077e31221de2481ff30b43d51
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Dec 24 00:40:15 2011 -0500

    Implement timespec_get

diff --git a/ChangeLog b/ChangeLog
index c75d829..7ad4272 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,15 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13532]
+	* time/Makefile (routines): Add timespec_get.
+	* time/Versions: Export timespec_get from libc for GLIBC_2.16.
+	* time/time.h: Define TIME_UTC and declare timespec_get.  Define
+	timespec for ISO C11.
+	* time/timespec_get.c: New file.
+	* sysdeps/unix/sysv/linux/timespec_get.c: New file.
+	* sysdeps/unix/sysv/linux/x86_64/timespec_get.c: New file.
+
 	[BZ #13531]
 	* malloc/malloc.c: Define alias aligned_alloc for public_mEMALIGn.
 	* stdlib/stdlib.h: Declare aligned_alloc.
diff --git a/NEWS b/NEWS
index 43f02d9..2d7a9df 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.16
 
 * The following bugs are resolved with this release:
 
-  13526, 13527, 13528, 13529, 13531
+  13526, 13527, 13528, 13529, 13531, 13532
 
 * ISO C11 support:
 
@@ -24,6 +24,7 @@ Version 2.16
     in the standard but it is only a requirement on the caller, not the
     implementation.
 
+  + timespec_get added
 
 Version 2.15
 
diff --git a/sysdeps/unix/sysv/linux/timespec_get.c b/sysdeps/unix/sysv/linux/timespec_get.c
new file mode 100644
index 0000000..5d5bc3e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/timespec_get.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 2011 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <time.h>
+#include <sysdep.h>
+#include <kernel-features.h>
+
+#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
+# undef INTERNAL_VSYSCALL
+# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
+#else
+# include <bits/libc-vdso.h>
+#endif
+
+#ifndef INTERNAL_GETTIME
+# define INTERNAL_GETTIME(id, tp) \
+  INTERNAL_VSYSCALL (clock_gettime, err, 2, id, tp)
+#endif
+
+
+/* Set TS to calendar time based in time base BASE.  */
+int
+timespec_get (ts, base)
+     struct timespec *ts;
+     int base;
+{
+  switch (base)
+    {
+      int res;
+      INTERNAL_SYSCALL_DECL (err);
+    case TIME_UTC:
+      res = INTERNAL_GETTIME (CLOCK_REALTIME, ts);
+      if (INTERNAL_SYSCALL_ERROR_P (res, err))
+	return 0;
+      break;
+
+    default:
+      return 0;
+    }
+
+  return base;
+}
diff --git a/sysdeps/unix/sysv/linux/x86_64/timespec_get.c b/sysdeps/unix/sysv/linux/x86_64/timespec_get.c
new file mode 100644
index 0000000..cb26068
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/timespec_get.c
@@ -0,0 +1,10 @@
+#include "bits/libc-vdso.h"
+
+#ifdef SHARED
+# define INTERNAL_GETTIME(id, tp) \
+  ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+  PTR_DEMANGLE (f);							  \
+  f (id, tp); })
+#endif
+
+#include "../timespec_get.c"
diff --git a/time/Makefile b/time/Makefile
index 71d919d..badf2f9 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-2003, 2004, 2005, 2007, 2011 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
@@ -29,7 +29,8 @@ routines := offtime asctime clock ctime ctime_r difftime \
 	    tzfile getitimer setitimer			 \
 	    stime dysize timegm ftime			 \
 	    getdate strptime strptime_l			 \
-	    strftime wcsftime strftime_l wcsftime_l
+	    strftime wcsftime strftime_l wcsftime_l	 \
+	    timespec_get
 aux :=	    era alt_digit lc-time-cleanup
 distribute := datemsk
 
diff --git a/time/Versions b/time/Versions
index 273956d..a7c2630 100644
--- a/time/Versions
+++ b/time/Versions
@@ -62,4 +62,7 @@ libc {
   GLIBC_2.3.2 {
     strptime_l;
   }
+  GLIBC_2.16 {
+    timespec_get;
+  }
 }
diff --git a/time/time.h b/time/time.h
index fee8d27..5cb19db 100644
--- a/time/time.h
+++ b/time/time.h
@@ -107,10 +107,11 @@ typedef __timer_t timer_t;
 #undef	__need_timer_t
 
 
-#if !defined __timespec_defined &&				\
-    ((defined _TIME_H &&					\
-      (defined __USE_POSIX199309 || defined __USE_MISC)) ||	\
-      defined __need_timespec)
+#if (!defined __timespec_defined					\
+     && ((defined _TIME_H						\
+	  && (defined __USE_POSIX199309 || defined __USE_MISC		\
+	      || defined __USE_ISOC11))					\
+	 || defined __need_timespec))
 # define __timespec_defined	1
 
 # include <bits/types.h>	/* This defines __time_t for us.  */
@@ -142,13 +143,13 @@ struct tm
   int tm_yday;			/* Days in year.[0-365]	*/
   int tm_isdst;			/* DST.		[-1/0/1]*/
 
-#ifdef	__USE_BSD
+# ifdef	__USE_BSD
   long int tm_gmtoff;		/* Seconds east of UTC.  */
   __const char *tm_zone;	/* Timezone abbreviation.  */
-#else
+# else
   long int __tm_gmtoff;		/* Seconds east of UTC.  */
   __const char *__tm_zone;	/* Timezone abbreviation.  */
-#endif
+# endif
 };
 __END_NAMESPACE_STD
 #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC
@@ -156,7 +157,7 @@ __USING_NAMESPACE_STD(tm)
 #endif
 
 
-#ifdef __USE_POSIX199309
+# ifdef __USE_POSIX199309
 /* POSIX.1b structure for timer start values and intervals.  */
 struct itimerspec
   {
@@ -167,14 +168,23 @@ struct itimerspec
 /* We can use a simple forward declaration.  */
 struct sigevent;
 
-#endif	/* POSIX.1b */
+# endif	/* POSIX.1b */
 
-#ifdef __USE_XOPEN2K
-# ifndef __pid_t_defined
+# ifdef __USE_XOPEN2K
+#  ifndef __pid_t_defined
 typedef __pid_t pid_t;
-#  define __pid_t_defined
+#   define __pid_t_defined
+#  endif
+# endif
+
+
+# ifdef __USE_ISOC11
+/* Time base values for timespec_get.  */
+enum
+  {
+    TIME_UTC = 1
+  };
 # endif
-#endif
 
 
 __BEGIN_NAMESPACE_STD
@@ -353,6 +363,13 @@ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
 #  endif
 
 
+# ifdef __USE_ISOC11
+/* Set TS to calendar time based in time base BASE.  */
+extern int timespec_get (struct timespec *__ts, int __base)
+     __THROW __nonnull ((1));
+# endif
+
+
 /* Create new per-process timer using CLOCK_ID.  */
 extern int timer_create (clockid_t __clock_id,
 			 struct sigevent *__restrict __evp,
diff --git a/time/timespec_get.c b/time/timespec_get.c
new file mode 100644
index 0000000..05009ec
--- /dev/null
+++ b/time/timespec_get.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <time.h>
+
+
+/* Set TS to calendar time based in time base BASE.  */
+int
+timespec_get (ts, base)
+     struct timespec *ts;
+     int base;
+{
+  switch (base)
+    {
+    case TIME_UTC:
+      /* Not supported.  */
+      return 0;
+
+    default:
+      return 0;
+    }
+
+  return base;
+}
+stub_warning (timespec_get)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=380d7e87dc80978581e73063dff0e264283c0306

commit 380d7e87dc80978581e73063dff0e264283c0306
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 23:49:48 2011 -0500

    Implement aligned_alloc

diff --git a/ChangeLog b/ChangeLog
index 02d8a2b..c75d829 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,11 +28,17 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13531]
+	* malloc/malloc.c: Define alias aligned_alloc for public_mEMALIGn.
+	* stdlib/stdlib.h: Declare aligned_alloc.
+	* Versions.def: Add GLIBC_2.16 for libc.
+	* malloc/Versions: Export aligned_alloc from libc for GLIBC_2.16.
+
 	[BZ 13527]
 	* stdlib/stdlib.h: Make at_quick_exit and quick_exit available for
 	ISO C11.
 
-	* include/features.h: Define __USE_ISOCXX11 when compiling ISo C++11
+	* include/features.h: Define __USE_ISOCXX11 when compiling ISO C++11
 	code.
 
 	[BZ #13528]
diff --git a/NEWS b/NEWS
index 241f4b7..43f02d9 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,20 @@ Version 2.16
 
 * The following bugs are resolved with this release:
 
-  13526, 13527, 13528, 13529
+  13526, 13527, 13528, 13529, 13531
+
+* ISO C11 support:
+
+  + define static_assert
+
+  + do not declare gets
+
+  + declare at_quick_exit and quick_exit also for ISO C11
+
+  + aligned_alloc.  NB: The code is deliberately allows the size parameter
+    to not be a multiple of the alignment.  This is a moronic requirement
+    in the standard but it is only a requirement on the caller, not the
+    implementation.
 
 
 Version 2.15
diff --git a/Versions.def b/Versions.def
index 6b05e5b..2b44f5e 100644
--- a/Versions.def
+++ b/Versions.def
@@ -32,6 +32,7 @@ libc {
   GLIBC_2.13
   GLIBC_2.14
   GLIBC_2.15
+  GLIBC_2.16
   HURD_CTHREADS_0.3
 %ifdef EXPORT_UNWIND_FIND_FDE
   GCC_3.0
diff --git a/malloc/Versions b/malloc/Versions
index cf0b1e5..7ca9bdf 100644
--- a/malloc/Versions
+++ b/malloc/Versions
@@ -58,6 +58,9 @@ libc {
   GLIBC_2.10 {
     malloc_info;
   }
+  GLIBC_2.16 {
+    aligned_alloc;
+  }
   GLIBC_PRIVATE {
     # Internal startup hook for libpthread.
     __libc_malloc_pthread_startup;
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 8608083..300e879 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3124,6 +3124,8 @@ public_mEMALIGn(size_t alignment, size_t bytes)
 	 ar_ptr == arena_for_chunk(mem2chunk(p)));
   return p;
 }
+/* For ISO C11.  */
+weak_alias (public_mEMALIGn, aligned_alloc)
 libc_hidden_def (public_mEMALIGn)
 
 void*
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 754743f..5588666 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -509,6 +509,11 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
      __THROW __nonnull ((1)) __wur;
 #endif
 
+#ifdef __USE_ISOC11
+/* ISO C variant of aligned allocation.  */
+extern int aligned_alloc (size_t __alignment, size_t __size) __THROW __wur;
+#endif
+
 __BEGIN_NAMESPACE_STD
 /* Abort execution and generate a core-dump.  */
 extern void abort (void) __THROW __attribute__ ((__noreturn__));

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0e87cc01807aee964014bb6518694e7f42b71a7

commit c0e87cc01807aee964014bb6518694e7f42b71a7
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 23:37:07 2011 -0500

    Missed half the support for __USE_ISOC11

diff --git a/include/features.h b/include/features.h
index 173afc1..7bb27c5 100644
--- a/include/features.h
+++ b/include/features.h
@@ -194,6 +194,8 @@
 /* This is to enable the ISO C11 extension.  */
 #if (defined _ISOC11_SOURCE \
      || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
+# define __USE_ISOC11	1
+#endif
 
 /* This is to enable the ISO C99 extension.  */
 #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e9e7a356c37edc428339b4ba27420fe320d0a3c

commit 4e9e7a356c37edc428339b4ba27420fe320d0a3c
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 23:21:15 2011 -0500

    Enable at_quick_exit and quick_exit for ISO C11

diff --git a/ChangeLog b/ChangeLog
index c3483c8..02d8a2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,10 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ 13527]
+	* stdlib/stdlib.h: Make at_quick_exit and quick_exit available for
+	ISO C11.
+
 	* include/features.h: Define __USE_ISOCXX11 when compiling ISo C++11
 	code.
 
diff --git a/NEWS b/NEWS
index c22df47..241f4b7 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.16
 
 * The following bugs are resolved with this release:
 
-  13526, 13528, 13529
+  13526, 13527, 13528, 13529
 
 
 Version 2.15
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index f7d128c..754743f 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -517,9 +517,7 @@ extern void abort (void) __THROW __attribute__ ((__noreturn__));
 /* Register a function to be called when `exit' is called.  */
 extern int atexit (void (*__func) (void)) __THROW __nonnull ((1));
 
-#ifdef __USE_GNU
-// XXX There should be a macro to signal with C++ revision is used.
-// XXX This function is in the C++1x revision.
+#if defined __USE_ISOC11 || defined __USE_ISOCXX11
 /* Register a function to be called when `quick_exit' is called.  */
 # ifdef __cplusplus
 extern "C++" int at_quick_exit (void (*__func) (void))
@@ -543,9 +541,7 @@ __BEGIN_NAMESPACE_STD
    perform stdio cleanup, and terminate program execution with STATUS.  */
 extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
 
-#ifdef __USE_GNU
-// XXX There should be a macro to signal with C++ revision is used.
-// XXX This function is in the C++1x revision.
+#if defined __USE_ISOC11 || defined __USE_ISOCXX11
 /* Call all functions registered with `at_quick_exit' in the reverse
    of the order in which they were registered and terminate program
    execution with STATUS.  */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8fd8ff3bd8234593a694be045460e471d295a6af

commit 8fd8ff3bd8234593a694be045460e471d295a6af
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 23:20:07 2011 -0500

    Add __USE_ISOCXX11

diff --git a/ChangeLog b/ChangeLog
index 6be3d32..c3483c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	* include/features.h: Define __USE_ISOCXX11 when compiling ISo C++11
+	code.
+
 	[BZ #13528]
 	* libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.
 
diff --git a/include/features.h b/include/features.h
index b02ff75..173afc1 100644
--- a/include/features.h
+++ b/include/features.h
@@ -100,6 +100,7 @@
 #undef	__USE_ISOC11
 #undef	__USE_ISOC99
 #undef	__USE_ISOC95
+#undef	__USE_ISOCXX11
 #undef	__USE_POSIX
 #undef	__USE_POSIX2
 #undef	__USE_POSIX199309
@@ -206,6 +207,15 @@
 # define __USE_ISOC95	1
 #endif
 
+/* This is to enable compatibility for ISO C++11.
+
+   So far g++ does not provide a macro.  Check the temporary macro for
+   now, too.  */
+#if ((defined __cplusplus && __cplusplus >= 201103L)			      \
+     || defined __GXX_EXPERIMENTAL_CXX0X__)
+# define __USE_ISOCXX11	1
+#endif
+
 /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
    (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined).  */
 #if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03a718297d64e68efb36069b0cc14c1039f32d89

commit 03a718297d64e68efb36069b0cc14c1039f32d89
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 22:59:38 2011 -0500

    Remove gets declaration

diff --git a/ChangeLog b/ChangeLog
index c85afad..6be3d32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13528]
+	* libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.
+
 	[BZ #13529]
 	* assert/assert.h (static_assert): Define.
 
diff --git a/NEWS b/NEWS
index b276f31..c22df47 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.16
 
 * The following bugs are resolved with this release:
 
-  13526, 13529
+  13526, 13528, 13529
 
 
 Version 2.15
diff --git a/libio/stdio.h b/libio/stdio.h
index 8e23903..3656bb5 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -628,12 +628,18 @@ __BEGIN_NAMESPACE_STD
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      __wur;
 
+#ifndef __USE_ISOC11
 /* Get a newline-terminated string from stdin, removing the newline.
    DO NOT USE THIS FUNCTION!!  There is no limit on how much it will read.
 
+   The function has been officially removed in ISO C11.  This opportunity
+   is used to also remove it from the GNU feature list.  It is now only
+   available when explicitly using an old ISO C, Unix, or POSIX standard.
+
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
 extern char *gets (char *__s) __wur;
+#endif
 __END_NAMESPACE_STD
 
 #ifdef __USE_GNU

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=839e283ece8f4a8312dd6c558df8c739356fddb7

commit 839e283ece8f4a8312dd6c558df8c739356fddb7
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 22:55:44 2011 -0500

    Define static_assert

diff --git a/ChangeLog b/ChangeLog
index eee573c..c85afad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13529]
+	* assert/assert.h (static_assert): Define.
+
 	* version.h: Update for 2.15 development version.
 
 	[BZ #13526]
diff --git a/NEWS b/NEWS
index 69d4cbc..b276f31 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.16
 
 * The following bugs are resolved with this release:
 
-  13526
+  13526, 13529
 
 
 Version 2.15
diff --git a/assert/assert.h b/assert/assert.h
index 841f435..4022e28 100644
--- a/assert/assert.h
+++ b/assert/assert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2007
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2007,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -113,3 +113,10 @@ __END_DECLS
 # endif
 
 #endif /* NDEBUG.  */
+
+
+#ifdef __USE_ISOC11
+/* Static assertion.  Requires support in the compiler.  */
+# undef static_assert
+# define static_assert _Static_assert
+#endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90fa7312770b1caca8843a55a9c3825585aac140

commit 90fa7312770b1caca8843a55a9c3825585aac140
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 22:54:13 2011 -0500

    Start 2.16 development

diff --git a/ChangeLog b/ChangeLog
index 98c2c02..eee573c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	* version.h: Update for 2.15 development version.
+
 	[BZ #13526]
 	* include/features.h: Handle __STDC_VERSION__ >= 201112 and
 	_ISOC11_SOURCE.
diff --git a/version.h b/version.h
index 1dac425..f400088 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
 /* This file just defines the current version number of libc.  */
 
-#define RELEASE "stable"
-#define VERSION "2.15"
+#define RELEASE "development"
+#define VERSION "2.15.90"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d44e1508660d4195146730541876147013d484f

commit 8d44e1508660d4195146730541876147013d484f
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 22:53:02 2011 -0500

    Missing BZ

diff --git a/ChangeLog b/ChangeLog
index ae443ec..98c2c02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13526]
 	* include/features.h: Handle __STDC_VERSION__ >= 201112 and
 	_ISOC11_SOURCE.
 
diff --git a/NEWS b/NEWS
index 55dba1b..69d4cbc 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,13 @@ See the end for copying conditions.
 Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
 using `glibc' in the "product" field.
 
+Version 2.16
+
+* The following bugs are resolved with this release:
+
+  13526
+
+
 Version 2.15
 
 * The following bugs are resolved with this release:

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d78099052b6bdc164f8f6a582a9b7b574f700e28

commit d78099052b6bdc164f8f6a582a9b7b574f700e28
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Dec 23 22:45:16 2011 -0500

    Support C11 __STDC_SOURCE__ and _ISOC11_SOURCE

diff --git a/ChangeLog b/ChangeLog
index 737c4ba..ae443ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@
 
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
+	* include/features.h: Handle __STDC_VERSION__ >= 201112 and
+	_ISOC11_SOURCE.
+
 	* version.h (RELEASE): Bump for 2.15 release.
 	* include/features.h (__GLIBC_MINOR__): Bump to 15.
 
diff --git a/include/features.h b/include/features.h
index c7b7972..b02ff75 100644
--- a/include/features.h
+++ b/include/features.h
@@ -25,6 +25,7 @@
 
    __STRICT_ANSI__	ISO Standard C.
    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
+   _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
    _POSIX_SOURCE	IEEE Std 1003.1.
    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
 			if >=199309L, add IEEE Std 1003.1b-1993;
@@ -57,6 +58,7 @@
    These are defined by this file and are used by the
    header files to decide what to declare or define:
 
+   __USE_ISOC11		Define ISO C11 things.
    __USE_ISOC99		Define ISO C99 things.
    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
    __USE_POSIX		Define IEEE Std 1003.1 things.
@@ -95,6 +97,7 @@
 
 
 /* Undefine everything, so we get a clean slate.  */
+#undef	__USE_ISOC11
 #undef	__USE_ISOC99
 #undef	__USE_ISOC95
 #undef	__USE_POSIX
@@ -158,6 +161,8 @@
 # define _ISOC95_SOURCE	1
 # undef  _ISOC99_SOURCE
 # define _ISOC99_SOURCE	1
+# undef  _ISOC11_SOURCE
+# define _ISOC11_SOURCE	1
 # undef  _POSIX_SOURCE
 # define _POSIX_SOURCE	1
 # undef  _POSIX_C_SOURCE
@@ -185,17 +190,18 @@
 # define _SVID_SOURCE	1
 #endif
 
-/* This is to enable the ISO C99 extension.  Also recognize the old macro
-   which was used prior to the standard acceptance.  This macro will
-   eventually go away and the features enabled by default once the ISO C99
-   standard is widely adopted.  */
-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
+/* This is to enable the ISO C11 extension.  */
+#if (defined _ISOC11_SOURCE \
+     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
+
+/* This is to enable the ISO C99 extension.  */
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
      || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
 # define __USE_ISOC99	1
 #endif
 
 /* This is to enable the ISO C90 Amendment 1:1995 extension.  */
-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
      || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
 # define __USE_ISOC95	1
 #endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |   63 +++++++++++++
 NEWS                                          |   21 ++++
 Versions.def                                  |    1 +
 assert/assert.h                               |    9 ++-
 debug/tst-chk1.c                              |    6 +
 iconv/gconv_builtin.h                         |   23 +++++-
 iconv/gconv_int.h                             |    4 +-
 iconv/gconv_simple.c                          |   75 +++++++++++++++-
 iconv/loop.c                                  |    5 +-
 include/features.h                            |   30 +++++-
 libio/stdio.h                                 |    8 ++-
 malloc/Versions                               |    3 +
 malloc/malloc.c                               |    2 +
 posix/regcomp.c                               |   36 +++++++-
 stdio-common/tst-gets.c                       |    7 +-
 stdlib/stdlib.h                               |   14 ++-
 sysdeps/unix/sysv/linux/timespec_get.c        |   57 ++++++++++++
 sysdeps/unix/sysv/linux/x86_64/timespec_get.c |   10 ++
 time/Makefile                                 |    5 +-
 time/Versions                                 |    3 +
 time/time.h                                   |   43 ++++++---
 time/timespec_get.c                           |   40 ++++++++
 version.h                                     |    4 +-
 wcsmbs/Makefile                               |    5 +-
 wcsmbs/Versions                               |    3 +
 wcsmbs/c16rtomb.c                             |  121 ++++++++++++++++++++++++
 wcsmbs/mbrtoc16.c                             |  122 +++++++++++++++++++++++++
 wcsmbs/mbrtowc.c                              |    7 +-
 wcsmbs/uchar.h                                |   84 +++++++++++++++++
 wcsmbs/wchar.h                                |   10 ++-
 wcsmbs/wcrtomb.c                              |    7 +-
 wcsmbs/wcsmbsload.c                           |   90 +++++++++++++++++--
 wcsmbs/wcsmbsload.h                           |    7 +-
 33 files changed, 867 insertions(+), 58 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/timespec_get.c
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/timespec_get.c
 create mode 100644 time/timespec_get.c
 create mode 100644 wcsmbs/c16rtomb.c
 create mode 100644 wcsmbs/mbrtoc16.c
 create mode 100644 wcsmbs/uchar.h


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]