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.21-425-gbb4acb5


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  bb4acb522c9206b8476a88be44606bf1bc1e96f6 (commit)
      from  6cfae52edfb487ca3b78336a061acb6694338f72 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb4acb522c9206b8476a88be44606bf1bc1e96f6

commit bb4acb522c9206b8476a88be44606bf1bc1e96f6
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 2 20:23:09 2015 +0000

    Fix fnmatch towlower namespace (bug 18469).
    
    fnmatch brings in references to towlower (and thereby towupper), which
    isn't in all the standards that contain fnmatch, resulting in
    linknamespace test failures.  (This is contrary to glibc conventions,
    rather than a standards conformance issue, because of the to*
    reservation.)  This patch fixes this in the usual way, making those
    functions into weak aliases.
    
    Tested for x86_64 and x86 (testsuite, and that disassembly of
    installed shared libraries is unchanged by the patch).  This is on top
    of <https://sourceware.org/ml/libc-alpha/2015-06/msg00019.html>, but
    the two patches should be independent.
    
    (The __attribute_pure__ on the declarations in include/wctype.h comes
    from GCC's built-in attributes for towlower and towupper, and is
    needed to get the same code generation for fnmatch before and after
    the patch.  It seems likely there are cases where the declaration of
    __foo in the internal headers is missing attributes from foo in the
    public headers, built-in to GCC or both, but I don't know a good way
    to detect such missing attributes.)
    
    	[BZ #18469]
    	* wctype/wcfuncs.c (towlower): Rename to __towlower and define as
    	weak alias of __towlower.  Use libc_hidden_weak.
    	(towupper): Rename to __towupper and define as weak alias of
    	__towupper.  Use libc_hidden_weak.
    	* include/wctype.h (__towlower): Declare.  Use libc_hidden_proto.
    	(__towupper): Likewise.
    	* posix/fnmatch.c [HANDLE_MULTIBYTE && _LIBC] (FOLD): Use
    	__towlower instead of towlower.

diff --git a/ChangeLog b/ChangeLog
index 33636ba..9182ed9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-06-02  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #18469]
+	* wctype/wcfuncs.c (towlower): Rename to __towlower and define as
+	weak alias of __towlower.  Use libc_hidden_weak.
+	(towupper): Rename to __towupper and define as weak alias of
+	__towupper.  Use libc_hidden_weak.
+	* include/wctype.h (__towlower): Declare.  Use libc_hidden_proto.
+	(__towupper): Likewise.
+	* posix/fnmatch.c [HANDLE_MULTIBYTE && _LIBC] (FOLD): Use
+	__towlower instead of towlower.
+
 2015-06-02  Roland McGrath  <roland@hack.frob.com>
 
 	* stdlib/setenv.c [__GNUC__,__GNUC_MINOR__ < 4,7]: Use
diff --git a/NEWS b/NEWS
index e1a1a24..ed02de0 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,7 @@ Version 2.22
   18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116,
   18125, 18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217,
   18220, 18221, 18234, 18244, 18247, 18287, 18319, 18333, 18346, 18397,
-  18409, 18410, 18412, 18418, 18422, 18434, 18444.
+  18409, 18410, 18412, 18418, 18422, 18434, 18444, 18469.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
diff --git a/include/wctype.h b/include/wctype.h
index b29e824..88c78e6 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -60,6 +60,8 @@ extern __typeof (iswupper_l) __iswupper_l;
 extern __typeof (iswxdigit_l) __iswxdigit_l;
 extern __typeof (towlower_l) __towlower_l;
 extern __typeof (towupper_l) __towupper_l;
+extern __typeof (towlower) __towlower __THROW __attribute_pure__;
+extern __typeof (towupper) __towupper __THROW __attribute_pure__;
 
 libc_hidden_proto (__towctrans)
 libc_hidden_proto (__iswctype)
@@ -77,6 +79,8 @@ libc_hidden_proto (__iswupper_l)
 libc_hidden_proto (__iswxdigit_l)
 libc_hidden_proto (__towlower_l)
 libc_hidden_proto (__towupper_l)
+libc_hidden_proto (__towlower)
+libc_hidden_proto (__towupper)
 
 /* The spec says that isdigit must only match the decimal digits.  We
    can check this without a memory access.  */
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index a707847..7480ec7 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -229,7 +229,7 @@ __wcschrnul (s, c)
 # if HANDLE_MULTIBYTE
 /* Note that this evaluates C many times.  */
 #  ifdef _LIBC
-#   define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
+#   define FOLD(c) ((flags & FNM_CASEFOLD) ? __towlower (c) : (c))
 #  else
 #   define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? towlower (c) : (c))
 #  endif
diff --git a/wctype/wcfuncs.c b/wctype/wcfuncs.c
index 87bdcc5..788fed9 100644
--- a/wctype/wcfuncs.c
+++ b/wctype/wcfuncs.c
@@ -69,22 +69,26 @@ libc_hidden_weak (iswxdigit)
 
 #undef towlower
 wint_t
-towlower (wc)
+__towlower (wc)
      wint_t wc;
 {
   size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + __TOW_tolower;
   const char *desc = _NL_CURRENT (LC_CTYPE, i);
   return wctrans_table_lookup (desc, wc);
 }
-libc_hidden_def (towlower)
+libc_hidden_def (__towlower)
+weak_alias (__towlower, towlower)
+libc_hidden_weak (towlower)
 
 #undef towupper
 wint_t
-towupper (wc)
+__towupper (wc)
      wint_t wc;
 {
   size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + __TOW_toupper;
   const char *desc = _NL_CURRENT (LC_CTYPE, i);
   return wctrans_table_lookup (desc, wc);
 }
-libc_hidden_def (towupper)
+libc_hidden_def (__towupper)
+weak_alias (__towupper, towupper)
+libc_hidden_weak (towupper)

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

Summary of changes:
 ChangeLog        |   12 ++++++++++++
 NEWS             |    2 +-
 include/wctype.h |    4 ++++
 posix/fnmatch.c  |    2 +-
 wctype/wcfuncs.c |   12 ++++++++----
 5 files changed, 26 insertions(+), 6 deletions(-)


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]