diff options
Diffstat (limited to 'include/locale.h')
| -rw-r--r-- | include/locale.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/include/locale.h b/include/locale.h index c708d4435..3cd6f5ef3 100644 --- a/include/locale.h +++ b/include/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,95-99,2000,01,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995-2002,2007,2009 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 @@ -12,9 +12,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.11 Localization <locale.h> @@ -39,6 +38,7 @@ __BEGIN_DECLS #define LC_COLLATE __LC_COLLATE #define LC_MONETARY __LC_MONETARY #define LC_MESSAGES __LC_MESSAGES +#define LC_ALL __LC_ALL #if 0 #define LC_PAPER __LC_PAPER #define LC_NAME __LC_NAME @@ -47,9 +47,10 @@ __BEGIN_DECLS #define LC_MEASUREMENT __LC_MEASUREMENT #define LC_IDENTIFICATION __LC_IDENTIFICATION #endif -#define LC_ALL __LC_ALL +__BEGIN_NAMESPACE_STD + /* Structure giving information about numeric and monetary notation. */ struct lconv { @@ -121,18 +122,17 @@ struct lconv }; -__BEGIN_NAMESPACE_STD - /* Set and/or return the current locale. */ -extern char *setlocale (int __category, __const char *__locale) __THROW; +extern char *setlocale (int __category, const char *__locale) __THROW; /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv (void) __THROW; +libc_hidden_proto(localeconv) __END_NAMESPACE_STD -#if defined(__USE_GNU) && defined(__UCLIBC_HAS_LOCALE__) +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__ /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is @@ -144,19 +144,16 @@ __END_NAMESPACE_STD Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ -#if defined(__UCLIBC_HAS_XLOCALE__) /* Get locale datatype definition. */ # include <xlocale.h> -#endif - -typedef __locale_t locale_t; /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the CATEGORY_MASK parameter here uses a single bit for each category, made by OR'ing together LC_*_MASK bits above. */ -extern __locale_t newlocale (int __category_mask, __const char *__locale, +extern __locale_t newlocale (int __category_mask, const char *__locale, __locale_t __base) __THROW; +libc_hidden_proto(newlocale) /* These are the bits that can be set in the CATEGORY_MASK argument to `newlocale'. In the GNU implementation, LC_FOO_MASK has the value @@ -168,9 +165,6 @@ extern __locale_t newlocale (int __category_mask, __const char *__locale, # define LC_COLLATE_MASK (1 << __LC_COLLATE) # define LC_MONETARY_MASK (1 << __LC_MONETARY) # define LC_MESSAGES_MASK (1 << __LC_MESSAGES) -#ifdef L_newlocale -#warning mask defines for extra locale categories -#endif /* L_newlocale - uClibc note */ #ifdef LC_PAPER # define LC_PAPER_MASK (1 << __LC_PAPER) # define LC_NAME_MASK (1 << __LC_NAME) @@ -215,6 +209,7 @@ extern void freelocale (__locale_t __dataset) __THROW; for all threads and can also be installed any time, meaning the thread uses the global settings controlled by `setlocale'. */ extern __locale_t uselocale (__locale_t __dataset) __THROW; +libc_hidden_proto(uselocale) /* This value can be passed to `uselocale' and may be returned by it. Passing this value to any other function has undefined behavior. */ |
