From 3e154a6f9373a15924ffe226df044194b633e3ac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 26 Jan 2001 09:22:30 +0000 Subject: Update. * locale/Makefile (headers): Add bits/locale.h. * locale/langinfo.h: Don't include . Include and use __LC_ constants instead of LC_. * locale/locale.h: Include and define LC_ constants using __LC_ constants. * locale/bits/locale.h: New file. * locale/loadlocale.c: Include . * locale/nl_langinfo.h: Likewise. --- ChangeLog | 9 +++++++++ locale/Makefile | 4 ++-- locale/bits/locale.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ locale/langinfo.h | 30 +++++++++++++++--------------- locale/loadlocale.c | 3 ++- locale/locale.h | 29 +++++++++++++++-------------- locale/nl_langinfo.c | 3 ++- 7 files changed, 89 insertions(+), 33 deletions(-) create mode 100644 locale/bits/locale.h diff --git a/ChangeLog b/ChangeLog index 515d2bb5ba..a8bd0d6101 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2001-01-26 Ulrich Drepper + * locale/Makefile (headers): Add bits/locale.h. + * locale/langinfo.h: Don't include . Include + and use __LC_ constants instead of LC_. + * locale/locale.h: Include and define LC_ constants + using __LC_ constants. + * locale/bits/locale.h: New file. + * locale/loadlocale.c: Include . + * locale/nl_langinfo.h: Likewise. + * posix/glob.h: Cleanup namespace for non-_GNU_SOURCE case. * io/sys/stat.h: Define S_IFSOCK for XPG6. diff --git a/locale/Makefile b/locale/Makefile index b7a2849fd7..a62b647ac4 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 92, 1995-1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 1995-1999, 2000, 2001 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 @@ -21,7 +21,7 @@ # subdir := locale -headers = locale.h langinfo.h xlocale.h +headers = locale.h bits/locale.h langinfo.h xlocale.h distribute = localeinfo.h categories.def iso-639.def iso-3166.def \ iso-4217.def weight.h weightwc.h strlen-hash.h elem-hash.h \ indigits.h indigitswc.h outdigits.h outdigitswc.h \ diff --git a/locale/bits/locale.h b/locale/bits/locale.h new file mode 100644 index 0000000000..b15a9b0d78 --- /dev/null +++ b/locale/bits/locale.h @@ -0,0 +1,44 @@ +/* Definition of locale category symbol values. + Copyright (C) 2001 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined _LOCALE_H && !defined _LANGINFO_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_LOCALE_H +#define _BITS_LOCALE_H 1 + +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; + +#endif /* bits/locale.h */ diff --git a/locale/langinfo.h b/locale/langinfo.h index 2e67413e18..8b58fabedd 100644 --- a/locale/langinfo.h +++ b/locale/langinfo.h @@ -1,5 +1,5 @@ /* Access to locale-dependent parameters. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 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 @@ -20,11 +20,11 @@ #ifndef _LANGINFO_H #define _LANGINFO_H 1 -#include /* Define the LC_* category names. */ - /* Get the type definition. */ #include +#include /* Define the __LC_* category names. */ + __BEGIN_DECLS @@ -45,7 +45,7 @@ enum /* LC_TIME category: date and time formatting. */ /* Abbreviated days of the week. */ - ABDAY_1 = _NL_ITEM (LC_TIME, 0), /* Sun */ + ABDAY_1 = _NL_ITEM (__LC_TIME, 0), /* Sun */ #define ABDAY_1 ABDAY_1 ABDAY_2, #define ABDAY_2 ABDAY_2 @@ -236,7 +236,7 @@ enum /* LC_COLLATE category: text sorting. This information is accessed by the strcoll and strxfrm functions. These `nl_langinfo' names are used only internally. */ - _NL_COLLATE_NRULES = _NL_ITEM (LC_COLLATE, 0), + _NL_COLLATE_NRULES = _NL_ITEM (__LC_COLLATE, 0), _NL_COLLATE_RULESETS, _NL_COLLATE_TABLEMB, _NL_COLLATE_WEIGHTMB, @@ -259,7 +259,7 @@ enum /* LC_CTYPE category: character classification. This information is accessed by the functions in . These `nl_langinfo' names are used only internally. */ - _NL_CTYPE_CLASS = _NL_ITEM (LC_CTYPE, 0), + _NL_CTYPE_CLASS = _NL_ITEM (__LC_CTYPE, 0), _NL_CTYPE_TOUPPER, _NL_CTYPE_GAP1, _NL_CTYPE_TOLOWER, @@ -350,7 +350,7 @@ enum /* LC_MONETARY category: formatting of monetary quantities. These items each correspond to a member of `struct lconv', defined in . */ - __INT_CURR_SYMBOL = _NL_ITEM (LC_MONETARY, 0), + __INT_CURR_SYMBOL = _NL_ITEM (__LC_MONETARY, 0), #ifdef __USE_GNU # define INT_CURR_SYMBOL __INT_CURR_SYMBOL #endif @@ -463,7 +463,7 @@ enum /* LC_NUMERIC category: formatting of numbers. These also correspond to members of `struct lconv'; see . */ - __DECIMAL_POINT = _NL_ITEM (LC_NUMERIC, 0), + __DECIMAL_POINT = _NL_ITEM (__LC_NUMERIC, 0), #ifdef __USE_GNU # define DECIMAL_POINT __DECIMAL_POINT #endif @@ -483,7 +483,7 @@ enum _NL_NUMERIC_THOUSANDS_SEP_WC, _NL_NUM_LC_NUMERIC, - __YESEXPR = _NL_ITEM (LC_MESSAGES, 0), /* Regex matching ``yes'' input. */ + __YESEXPR = _NL_ITEM (__LC_MESSAGES, 0), /* Regex matching ``yes'' input. */ #define YESEXPR __YESEXPR __NOEXPR, /* Regex matching ``no'' input. */ #define NOEXPR __NOEXPR @@ -497,11 +497,11 @@ enum #endif _NL_NUM_LC_MESSAGES, - _NL_PAPER_HEIGHT = _NL_ITEM (LC_PAPER, 0), + _NL_PAPER_HEIGHT = _NL_ITEM (__LC_PAPER, 0), _NL_PAPER_WIDTH, _NL_NUM_LC_PAPER, - _NL_NAME_NAME_FMT = _NL_ITEM (LC_NAME, 0), + _NL_NAME_NAME_FMT = _NL_ITEM (__LC_NAME, 0), _NL_NAME_NAME_GEN, _NL_NAME_NAME_MR, _NL_NAME_NAME_MRS, @@ -509,7 +509,7 @@ enum _NL_NAME_NAME_MS, _NL_NUM_LC_NAME, - _NL_ADDRESS_POSTAL_FMT = _NL_ITEM (LC_ADDRESS, 0), + _NL_ADDRESS_POSTAL_FMT = _NL_ITEM (__LC_ADDRESS, 0), _NL_ADDRESS_COUNTRY_NAME, _NL_ADDRESS_COUNTRY_POST, _NL_ADDRESS_COUNTRY_AB2, @@ -523,16 +523,16 @@ enum _NL_ADDRESS_LANG_LIB, _NL_NUM_LC_ADDRESS, - _NL_TELEPHONE_TEL_INT_FMT = _NL_ITEM (LC_TELEPHONE, 0), + _NL_TELEPHONE_TEL_INT_FMT = _NL_ITEM (__LC_TELEPHONE, 0), _NL_TELEPHONE_TEL_DOM_FMT, _NL_TELEPHONE_INT_SELECT, _NL_TELEPHONE_INT_PREFIX, _NL_NUM_LC_TELEPHONE, - _NL_MEASUREMENT_MEASUREMENT = _NL_ITEM (LC_MEASUREMENT, 0), + _NL_MEASUREMENT_MEASUREMENT = _NL_ITEM (__LC_MEASUREMENT, 0), _NL_NUM_LC_MEASUREMENT, - _NL_IDENTIFICATION_TITLE = _NL_ITEM (LC_IDENTIFICATION, 0), + _NL_IDENTIFICATION_TITLE = _NL_ITEM (__LC_IDENTIFICATION, 0), _NL_IDENTIFICATION_SOURCE, _NL_IDENTIFICATION_ADDRESS, _NL_IDENTIFICATION_CONTACT, diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 8c7afda8ea..55c9a587f4 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/locale/locale.h b/locale/locale.h index 5afa10c4dc..c17babc33e 100644 --- a/locale/locale.h +++ b/locale/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,95,96,97,98,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1995-1999,2000,2001 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 @@ -27,24 +27,25 @@ #define __need_NULL #include +#include __BEGIN_DECLS /* These are the possibilities for the first argument to setlocale. The code assumes that the lowest LC_* symbol has the value zero. */ -#define LC_CTYPE 0 -#define LC_NUMERIC 1 -#define LC_TIME 2 -#define LC_COLLATE 3 -#define LC_MONETARY 4 -#define LC_MESSAGES 5 -#define LC_ALL 6 -#define LC_PAPER 7 -#define LC_NAME 8 -#define LC_ADDRESS 9 -#define LC_TELEPHONE 10 -#define LC_MEASUREMENT 11 -#define LC_IDENTIFICATION 12 +#define LC_CTYPE __LC_CTYPE +#define LC_NUMERIC __LC_NUMERIC +#define LC_TIME __LC_TIME +#define LC_COLLATE __LC_COLLATE +#define LC_MONETARY __LC_MONETARY +#define LC_MESSAGES __LC_MESSAGES +#define LC_ALL __LC_ALL +#define LC_PAPER __LC_PAPER +#define LC_NAME __LC_NAME +#define LC_ADDRESS __LC_ADDRESS +#define LC_TELEPHONE __LC_TELEPHONE +#define LC_MEASUREMENT __LC_MEASUREMENT +#define LC_IDENTIFICATION __LC_IDENTIFICATION /* Structure giving information about numeric and monetary notation. */ diff --git a/locale/nl_langinfo.c b/locale/nl_langinfo.c index 7d8c9ab586..48bdfeb7c8 100644 --- a/locale/nl_langinfo.c +++ b/locale/nl_langinfo.c @@ -1,5 +1,5 @@ /* User interface for extracting locale-dependent parameters. - Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1999,2000,2001 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 @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include #include "localeinfo.h" -- cgit v1.2.1