From da4cfe381c52e7be8158265d5d79abdc979cd8a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Aug 2002 23:36:31 +0000 Subject: [PATCH] * ctype/ctype.h (isascii_l, toascii_l): Define to __*_l counterparts. * ctype/ctype-extn.c (isblank_l): Add weak alias. * sysdeps/generic/strtol_l.c (strtol_l): Likewise. * sysdeps/generic/strtoll_l.c (strtoll_l): Likewise. * sysdeps/generic/strtoul_l.c (strtoul_l): Likewise. * sysdeps/generic/strtoull_l.c (strtoull_l): Likewise. * wctype/iswctype_l.c (iswctype_l): Likewise. * time/strftime.c [USE_IN_EXTENDED_LOCALE_MODEL]: No libc_hidden_def. * ctype/ctype.h (__exctype_l): Don't declare __ name. * stdlib/stdlib.h: Don't declare __*_l names. * include/stdlib.h: Declare them here instead. * include/string.h: Don't declare __*_l names. * string/string.h: Declare them here instead. * time/time.h: Don't declare __*_l names. * include/time.h: Declare them here instead. * wcsmbs/wchar.h: Don't declare __*_l names. * include/wchar.h: Declare them here instead. * wctype/wctype.h: Declare iswalnum_l, not __iswalnum_l. Don't declare __*_l names. * include/wctype.h: Declare them here instead. * stdlib/monetary.h: Declare strfmon_l, not __strfmon_l. * stdlib/strfmon_l.c (strfmon_l): Define as weak alias. * locale/langinfo.h: Don't declare __nl_langinfo_l. * include/langinfo.h: Declare it here with __typeof. --- ChangeLog | 29 +++++++++++++++++++++++++++++ ctype/ctype-extn.c | 3 ++- ctype/ctype.h | 7 +++---- include/langinfo.h | 2 ++ include/stdlib.h | 8 ++++++++ include/string.h | 5 +++++ include/time.h | 3 +++ include/wchar.h | 14 ++++++++++++++ include/wctype.h | 15 +++++++++++++++ locale/langinfo.h | 1 - stdlib/monetary.h | 8 ++++---- stdlib/stdlib.h | 23 ----------------------- stdlib/strfmon_l.c | 4 +++- string/string.h | 9 --------- sysdeps/generic/strtol_l.c | 4 +++- sysdeps/generic/strtoll_l.c | 4 +++- sysdeps/generic/strtoul_l.c | 4 +++- sysdeps/generic/strtoull_l.c | 4 +++- time/strftime.c | 2 +- time/time.h | 7 ------- wcsmbs/wchar.h | 36 ------------------------------------ wctype/iswctype_l.c | 3 ++- wctype/wctype.h | 23 +---------------------- 23 files changed, 104 insertions(+), 114 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b55618..424af0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,34 @@ +2002-08-28 Jakub Jelinek + + * ctype/ctype.h (isascii_l, toascii_l): Define to __*_l counterparts. + * ctype/ctype-extn.c (isblank_l): Add weak alias. + * sysdeps/generic/strtol_l.c (strtol_l): Likewise. + * sysdeps/generic/strtoll_l.c (strtoll_l): Likewise. + * sysdeps/generic/strtoul_l.c (strtoul_l): Likewise. + * sysdeps/generic/strtoull_l.c (strtoull_l): Likewise. + * wctype/iswctype_l.c (iswctype_l): Likewise. + 2002-08-27 Roland McGrath + * time/strftime.c [USE_IN_EXTENDED_LOCALE_MODEL]: No libc_hidden_def. + + * ctype/ctype.h (__exctype_l): Don't declare __ name. + * stdlib/stdlib.h: Don't declare __*_l names. + * include/stdlib.h: Declare them here instead. + * include/string.h: Don't declare __*_l names. + * string/string.h: Declare them here instead. + * time/time.h: Don't declare __*_l names. + * include/time.h: Declare them here instead. + * wcsmbs/wchar.h: Don't declare __*_l names. + * include/wchar.h: Declare them here instead. + * wctype/wctype.h: Declare iswalnum_l, not __iswalnum_l. + Don't declare __*_l names. + * include/wctype.h: Declare them here instead. + * stdlib/monetary.h: Declare strfmon_l, not __strfmon_l. + * stdlib/strfmon_l.c (strfmon_l): Define as weak alias. + * locale/langinfo.h: Don't declare __nl_langinfo_l. + * include/langinfo.h: Declare it here with __typeof. + * time/strptime.c [USE_IN_EXTENDED_LOCALE_MODEL]: Define __strptime_l instead, taking an extra __locale_t argument. * time/Makefile (routines): Add strptime_l. diff --git a/ctype/ctype-extn.c b/ctype/ctype-extn.c index 764a5d3..4bab5a0 100644 --- a/ctype/ctype-extn.c +++ b/ctype/ctype-extn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1999, 2000, 2002 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 @@ -59,3 +59,4 @@ __isblank_l (int c, __locale_t l) { return __isctype_l (c, _ISblank, l); } +weak_alias (__isblank_l, isblank_l) diff --git a/ctype/ctype.h b/ctype/ctype.h index c17aaf1..4a8ce30 100644 --- a/ctype/ctype.h +++ b/ctype/ctype.h @@ -216,8 +216,7 @@ toupper (int __c) __THROW ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) # define __exctype_l(name) \ - extern int name (int, __locale_t) __THROW; \ - 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); @@ -291,8 +290,8 @@ extern int toupper_l (int __c, __locale_t __l) __THROW; # 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)) +# define isascii_l(c,l) __isascii_l ((c), (l)) +# define toascii_l(c,l) __toascii_l ((c), (l)) # endif # endif /* Not __NO_CTYPE. */ diff --git a/include/langinfo.h b/include/langinfo.h index 82ff070..8f93671 100644 --- a/include/langinfo.h +++ b/include/langinfo.h @@ -4,4 +4,6 @@ libc_hidden_proto (nl_langinfo) +extern __typeof (nl_langinfo_l) __nl_langinfo_l; + #endif diff --git a/include/stdlib.h b/include/stdlib.h index 7a98943..6b17f35 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -10,6 +10,14 @@ /* Now define the internal interfaces. */ #ifndef __Need_M_And_C +extern __typeof (strtol_l) __strtol_l; +extern __typeof (strtoul_l) __strtoul_l; +extern __typeof (strtoll_l) __strtoll_l; +extern __typeof (strtoull_l) __strtoull_l; +extern __typeof (strtod_l) __strtod_l; +extern __typeof (strtof_l) __strtof_l; +extern __typeof (strtold_l) __strtold_l; + libc_hidden_proto (exit) libc_hidden_proto (abort) libc_hidden_proto (getenv) diff --git a/include/string.h b/include/string.h index c1df7ac..6d9e4d3 100644 --- a/include/string.h +++ b/include/string.h @@ -48,6 +48,11 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); above are defined as macros in the headers. */ #include +extern __typeof (strcoll_l) __strcoll_l; +extern __typeof (strxfrm_l) __strxfrm_l; +extern __typeof (strcasecmp_l) __strcasecmp_l; +extern __typeof (strncasecmp_l) __strncasecmp_l; + /* Alternative version which doesn't pollute glibc's namespace. */ #undef strndupa #define strndupa(s, n) \ diff --git a/include/time.h b/include/time.h index 3b63b3d..b57b7be 100644 --- a/include/time.h +++ b/include/time.h @@ -4,6 +4,9 @@ #else # include