]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use strcasecmp_l instead of strcasecmp
authorUlrich Drepper <drepper@gmail.com>
Tue, 8 Nov 2011 14:26:08 +0000 (09:26 -0500)
committerUlrich Drepper <drepper@gmail.com>
Tue, 8 Nov 2011 14:26:08 +0000 (09:26 -0500)
ChangeLog
intl/localealias.c
locale/findlocale.c

index ba463690247600e1c74f802a73e7566bb1bed0f8..bf091611c0909c451532e9bcff39383984784d01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-11-08  Ulrich Drepper  <drepper@gmail.com>
 
+       * locale/findlocale.c (_nl_find_locale): Use __strcasecmp_l.
+       * intl/localealias.c (strcasecmp): Define using __strcasecmp_l.
+
        * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Remove unnecessary
        instructions.
 
index 735107abd3d7f144af1c944e6982926e14064a5b..6f5fa12495c15ab395deaa51fd898f23817ec668 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle aliases for locale names.
-   Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2005, 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
@@ -64,7 +64,7 @@ char *alloca ();
 /* Rename the non ANSI C functions.  This is required by the standard
    because some ANSI C functions will require linking with this object
    file and the name space must not be polluted.  */
-# define strcasecmp __strcasecmp
+# define strcasecmp(s1, s2) __strcasecmp_l (s1, s2, _nl_C_locobj_ptr)
 
 # ifndef mempcpy
 #  define mempcpy __mempcpy
index 2fec9a70d59c07e0a9fa2f0c168c6ca76726c84d..6c888f00c94caad70a988538b505d4de3bc2b747 100644 (file)
@@ -258,7 +258,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
     }
 
   /* Determine whether the user wants transliteration or not.  */
-  if (modifier != NULL && __strcasecmp (modifier, "TRANSLIT") == 0)
+  if (modifier != NULL
+      && __strcasecmp_l (modifier, "TRANSLIT", _nl_C_locobj_ptr) == 0)
     ((struct __locale_data *) locale_file->data)->use_translit = 1;
 
   /* Increment the usage count.  */