GNU C Library master sources branch, master, updated. glibc-2.12-232-gdbb0472

drepper@sourceware.org drepper@sourceware.org
Fri Dec 10 14:16:00 GMT 2010


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  dbb0472f054a4241feec09af30db850dd4d18a7b (commit)
       via  4f1972374a080e823c4ead7c0496827dfc013837 (commit)
      from  eaea92f137762dd754fdf858a2cd600f15005884 (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=dbb0472f054a4241feec09af30db850dd4d18a7b

commit dbb0472f054a4241feec09af30db850dd4d18a7b
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Dec 10 09:16:12 2010 -0500

    Declare wcpcpy and wcpncpy only under _GNU_SOURCE

diff --git a/ChangeLog b/ChangeLog
index b1cd39a..7cd6d64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-12-10  Andreas Schwab  <schwab@redhat.com>
 
+	* wcsmbs/wchar.h (wcpcpy, wcpncpy): Only declare under
+	_GNU_SOURCE.
+
 	* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
 	* wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
 	Remove __restrict.
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index ca8ba80..5f341f3 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -555,10 +555,8 @@ extern float wcstof_l (__const wchar_t *__restrict __nptr,
 extern long double wcstold_l (__const wchar_t *__restrict __nptr,
 			      wchar_t **__restrict __endptr,
 			      __locale_t __loc) __THROW;
-#endif /* GNU */
 
 
-#ifdef	__USE_XOPEN2K8
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in
    DEST.  */
 extern wchar_t *wcpcpy (wchar_t *__restrict __dest,

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

commit 4f1972374a080e823c4ead7c0496827dfc013837
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Dec 10 09:15:01 2010 -0500

    Fix use of restrict in wchar.h

diff --git a/ChangeLog b/ChangeLog
index 66ed415..b1cd39a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-12-10  Andreas Schwab  <schwab@redhat.com>
+
+	* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
+	* wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
+	Remove __restrict.
+	(wcscpy, __wcpcpy_chk, __wcpcpy_alias, wcpcpy, wcsncpy, wcpncpy)
+	(wcscat, wcsncat, __wcrtomb_chk, wcrtomb): Add __restrict.
+
 2010-12-09  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #11655]
diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h
index 2ec4ce1..c38eaa3 100644
--- a/wcsmbs/bits/wchar2.h
+++ b/wcsmbs/bits/wchar2.h
@@ -1,5 +1,5 @@
 /* Checking macros for wchar functions.
-   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -60,15 +60,13 @@ extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1,
 						   __const wchar_t *__s2,
 						   size_t __n), wmemmove);
 extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
-				(wchar_t *__restrict __s1,
-				 __const wchar_t *__restrict __s2, size_t __n,
-				 size_t __ns1), __wmemmove_chk)
+				(wchar_t *__s1, __const wchar_t *__s2,
+				 size_t __n, size_t __ns1), __wmemmove_chk)
      __warnattr ("wmemmove called with length bigger than size of destination "
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2,
-		 size_t __n))
+__NTH (wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n))
 {
   if (__bos0 (__s1) != (size_t) -1)
     {
@@ -129,7 +127,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n))
+__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
 {
   if (__bos0 (__s) != (size_t) -1)
     {
@@ -152,7 +150,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
 				 __const wchar_t *__restrict __src), wcscpy);
 
 __extern_always_inline wchar_t *
-__NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcscpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -160,14 +158,15 @@ __NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
 }
 
 
-extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src,
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
+			      __const wchar_t *__restrict __src,
 			      size_t __destlen) __THROW;
-extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias, (wchar_t *__dest,
-						 __const wchar_t *__src),
-				wcpcpy);
+extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
+				(wchar_t *__restrict __dest,
+				 __const wchar_t *__restrict __src), wcpcpy);
 
 __extern_always_inline wchar_t *
-__NTH (wcpcpy (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcpcpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -190,7 +189,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     {
@@ -220,7 +220,8 @@ extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     {
@@ -243,7 +244,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
 				 __const wchar_t *__restrict __src), wcscat);
 
 __extern_always_inline wchar_t *
-__NTH (wcscat (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcscat_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -260,7 +261,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
 				 size_t __n), wcsncat);
 
 __extern_always_inline wchar_t *
-__NTH (wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcsncat_chk (__dest, __src, __n,
@@ -428,14 +430,16 @@ fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
 #endif
 
 
-extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p,
-			  size_t __buflen) __THROW __wur;
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
+			     mbstate_t *__restrict __p,
+			     size_t __buflen) __THROW __wur;
 extern size_t __REDIRECT_NTH (__wcrtomb_alias,
 			      (char *__restrict __s, wchar_t __wchar,
 			       mbstate_t *__restrict __ps), wcrtomb) __wur;
 
 __extern_always_inline __wur size_t
-__NTH (wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps))
+__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
+		mbstate_t *__restrict __ps))
 {
   /* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
      But this would only disturb the namespace.  So we define our own
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 061b105..ca8ba80 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -561,11 +561,13 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr,
 #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;
+extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
+			__const wchar_t *__restrict __src) __THROW;
 
 /* Copy no more than N characters of SRC to DEST, returning the address of
    the last character written into DEST.  */
-extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
+extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
+			 __const wchar_t *__restrict __src, size_t __n)
      __THROW;
 #endif	/* use GNU */
 

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

Summary of changes:
 ChangeLog            |   11 +++++++++++
 wcsmbs/bits/wchar2.h |   44 ++++++++++++++++++++++++--------------------
 wcsmbs/wchar.h       |    8 ++++----
 3 files changed, 39 insertions(+), 24 deletions(-)


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



More information about the Glibc-cvs mailing list