about summary refs log tree commit diff
path: root/ctype
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-06 08:40:20 +0000
committerRoland McGrath <roland@gnu.org>2002-08-06 08:40:20 +0000
commit1ab62b326e22ee3c9ab8b8b4144953698bc82cff (patch)
treeac0625c757638e382f54ca53cb9cf5c9deb171be /ctype
parent9b0b40d35e239d33fbb66ebe88b7249f9a8f006e (diff)
downloadglibc-1ab62b326e22ee3c9ab8b8b4144953698bc82cff.tar.gz
glibc-1ab62b326e22ee3c9ab8b8b4144953698bc82cff.tar.xz
glibc-1ab62b326e22ee3c9ab8b8b4144953698bc82cff.zip
* locale/Versions (libc: GLIBC_2.3): Add all the *_l functions
	with no __ prefix.
	* locale/langinfo.h [__USE_GNU]: Declare nl_langinfo_l.
	* ctype/ctype.h [__USE_GNU]: Add declarations and macros for
	all *_l functions with no __ prefix.
	* wctype/wcfuncs_l.c: Define weak aliases without __ for all fns.
	* ctype/ctype_l.c: Likewise.
	* locale/nl_langinfo.c: Likewise.
	* string/string.h [__USE_GNU]: Add decls for all *_l fns with no __.
	* stdlib/stdlib.h [__USE_GNU]: Likewise.
	* wcsmbs/wchar.h [__USE_GNU]: Likewise.
	* wctype/wctype.h [__USE_GNU]: Likewise.
	* string/strcoll_l.c (strcoll_l): Define as weak alias.
	* string/strxfrm_l.c (strxfrm_l): Define as weak alias.
	* sysdeps/generic/strcasecmp_l.c (strcasecmp_l): Define as weak alias.
	* sysdeps/generic/strncase_l.c (strncasecmp_l): Define as weak alias.
	* stdlib/strtod_l.c (strtod_l): Define as weak alias.
	* stdlib/strtof_l.c (strtof_l): Define as weak alias.
	* stdlib/strtold_l.c (strtold_l): Define as weak alias.
	* wcsmbs/wcscasecmp_l.c (wcscasecmp_l): Define as weak alias.
	(__wcscasecmp_l): Add libc_hidden_def.
	* wcsmbs/wcsncase_l.c (wcsncasecmp_l): Define as weak alias.
	(__wcsncasecmp_l): Add libc_hidden_def.
	* wcsmbs/wcstof_l.c (wcstof_l): Define as weak alias.
	* wcsmbs/wcstod_l.c (wcstod_l): Define as weak alias.
	* wcsmbs/wcstold_l.c (wcstold_l): Define as weak alias.
	* wcsmbs/wcscoll_l.c (wcscoll_l): Define as weak alias.
	* wcsmbs/wcsxfrm_l.c (wcsxfrm_l): Define as weak alias.
	* sysdeps/generic/wcstol_l.c (wcstol_l): Define as weak alias.
	* sysdeps/generic/wcstoll_l.c (wcstoll_l): Define as weak alias.
	* sysdeps/generic/wcstoul_l.c (wcstoul_l): Define as weak alias.
	* sysdeps/generic/wcstoull_l.c (wcstoull_l): Define as weak alias.
	* sysdeps/wordsize-64/wcstol_l.c (wcstoll_l): Define as weak alias.
	* sysdeps/wordsize-64/wcstoul_l.c (wcstoull_l): Define as weak alias.
	* wctype/wctrans_l.c (wctrans_l) Define as weak alias.
	* wctype/towctrans_l.c (towctrans_l) Define as weak alias.
	* wctype/wctype_l.c (wctype_l) Define as weak alias.
Diffstat (limited to 'ctype')
-rw-r--r--ctype/ctype.h58
-rw-r--r--ctype/ctype_l.c31
2 files changed, 59 insertions, 30 deletions
diff --git a/ctype/ctype.h b/ctype/ctype.h
index e73a06d64e..c17aaf171c 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,02
+   	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
@@ -214,38 +215,44 @@ toupper (int __c) __THROW
 #  define __isctype_l(c, type, locale) \
   ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
 
-# define __exctype_l(name)	extern int name (int, __locale_t) __THROW
+# define __exctype_l(name) 						      \
+  extern int name (int, __locale_t) __THROW;				      \
+  extern int __##name (int, __locale_t) __THROW
 
 /* The following names are all functions:
      int isCHARACTERISTIC(int c, locale_t *locale);
    which return nonzero iff C has CHARACTERISTIC.
    For the meaning of the characteristic names, see the `enum' above.  */
-__exctype_l (__isalnum_l);
-__exctype_l (__isalpha_l);
-__exctype_l (__iscntrl_l);
-__exctype_l (__isdigit_l);
-__exctype_l (__islower_l);
-__exctype_l (__isgraph_l);
-__exctype_l (__isprint_l);
-__exctype_l (__ispunct_l);
-__exctype_l (__isspace_l);
-__exctype_l (__isupper_l);
-__exctype_l (__isxdigit_l);
+__exctype_l (isalnum_l);
+__exctype_l (isalpha_l);
+__exctype_l (iscntrl_l);
+__exctype_l (isdigit_l);
+__exctype_l (islower_l);
+__exctype_l (isgraph_l);
+__exctype_l (isprint_l);
+__exctype_l (ispunct_l);
+__exctype_l (isspace_l);
+__exctype_l (isupper_l);
+__exctype_l (isxdigit_l);
 
-__exctype_l (__isblank_l);
+__exctype_l (isblank_l);
 
 
 /* Return the lowercase version of C in locale L.  */
 extern int __tolower_l (int __c, __locale_t __l) __THROW;
+extern int tolower_l (int __c, __locale_t __l) __THROW;
 
 /* Return the uppercase version of C.  */
 extern int __toupper_l (int __c, __locale_t __l) __THROW;
+extern int toupper_l (int __c, __locale_t __l) __THROW;
 
 # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
 #  define __tolower_l(c, locale) \
   __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale))
 #  define __toupper_l(c, locale) \
   __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale))
+#  define tolower_l(c, locale)	__tolower_l ((c), (locale))
+#  define toupper_l(c, locale)	__toupper_l ((c), (locale))
 # endif	/* Optimizing gcc */
 
 
@@ -265,8 +272,27 @@ 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
-#   define __isascii_l(c,l)	__isascii(c)
-#   define __toascii_l(c,l)	__toascii(c)
+#   define __isascii_l(c,l)	((l), __isascii (c))
+#   define __toascii_l(c,l)	((l), __toascii (c))
+#  endif
+
+#  define isalnum_l(c,l)	__isalnum_l ((c), (l))
+#  define isalpha_l(c,l)	__isalpha_l ((c), (l))
+#  define iscntrl_l(c,l)	__iscntrl_l ((c), (l))
+#  define isdigit_l(c,l)	__isdigit_l ((c), (l))
+#  define islower_l(c,l)	__islower_l ((c), (l))
+#  define isgraph_l(c,l)	__isgraph_l ((c), (l))
+#  define isprint_l(c,l)	__isprint_l ((c), (l))
+#  define ispunct_l(c,l)	__ispunct_l ((c), (l))
+#  define isspace_l(c,l)	__isspace_l ((c), (l))
+#  define isupper_l(c,l)	__isupper_l ((c), (l))
+#  define isxdigit_l(c,l)	__isxdigit_l ((c), (l))
+
+#  define isblank_l(c,l)	__isblank_l ((c), (l))
+
+#  if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+#   define isascii_l(c,l)	__isascii ((c), (l))
+#   define toascii_l(c,l)	__toascii ((c), (l))
 #  endif
 
 # endif /* Not __NO_CTYPE.  */
diff --git a/ctype/ctype_l.c b/ctype/ctype_l.c
index f895c48858..f35ce5f519 100644
--- a/ctype/ctype_l.c
+++ b/ctype/ctype_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,97,2001,02 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
@@ -22,28 +22,31 @@
 /* Provide real-function versions of all the ctype macros.  */
 
 #define	func(name, type) \
-  int name (int c, __locale_t l) { return __isctype_l (c, type, l); }
-
-func (__isalnum_l, _ISalnum)
-func (__isalpha_l, _ISalpha)
-func (__iscntrl_l, _IScntrl)
-func (__isdigit_l, _ISdigit)
-func (__islower_l, _ISlower)
-func (__isgraph_l, _ISgraph)
-func (__isprint_l, _ISprint)
-func (__ispunct_l, _ISpunct)
-func (__isspace_l, _ISspace)
-func (__isupper_l, _ISupper)
-func (__isxdigit_l, _ISxdigit)
+  int __##name (int c, __locale_t l) { return __isctype_l (c, type, l); } \
+  weak_alias (__##name, name)
+
+func (isalnum_l, _ISalnum)
+func (isalpha_l, _ISalpha)
+func (iscntrl_l, _IScntrl)
+func (isdigit_l, _ISdigit)
+func (islower_l, _ISlower)
+func (isgraph_l, _ISgraph)
+func (isprint_l, _ISprint)
+func (ispunct_l, _ISpunct)
+func (isspace_l, _ISspace)
+func (isupper_l, _ISupper)
+func (isxdigit_l, _ISxdigit)
 
 int
 (__tolower_l) (int c, __locale_t l)
 {
   return l->__ctype_tolower[c];
 }
+weak_alias (__tolower_l, tolower_l)
 
 int
 (__toupper_l) (int c, __locale_t l)
 {
   return l->__ctype_toupper[c];
 }
+weak_alias (__toupper_l, toupper_l)