locale_facets.h (messages): Move ctor, dtor definitions to..

2003-01-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (messages): Move ctor, dtor
	definitions to..
	(__timepunct): Same.
	* config/locale/gnu/messages_members.h (messages): Add dtor, ctor
	definitions. Conditionalize for GNU systems.
	* config/locale/generic/messages_members.h (messages): Add dtor, ctor
	definitions.
	* config/locale/gnu/time_members.h (messages): New. Add dtor, ctor
	definitions. Conditionalize for GNU systems.
	* config/locale/generic/time_members.h (messages): New. Add dtor, ctor
	definitions.
	* include/bits/localefwd.h (locale::facet::_S_c_name): Add.
	* src/locale.cc: Define.
	* src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool):
	Use it.
	* config/locale/gnu/time_members.h: Use it.
	* config/locale/gnu/messages_members.h: Use it.
	* config/linker-map.gnu: Add locale::facets details.
	* include/Makefile.am (target_headers_extra): Add time_members.h.
	* include/Makefile.in: Regenerate.
	* acinclude.m4: Export CTIME_H.
	* aclocal.m4: Regenerate.
	* configure: Regnerate.

From-SVN: r60977
This commit is contained in:
Benjamin Kosnik 2003-01-07 03:45:22 +00:00 committed by Benjamin Kosnik
parent 75fd79b51b
commit b51af00191
23 changed files with 1429 additions and 1302 deletions

View File

@ -1,3 +1,29 @@
2003-01-06 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.h (messages): Move ctor, dtor
definitions to..
(__timepunct): Same.
* config/locale/gnu/messages_members.h (messages): Add dtor, ctor
definitions. Conditionalize for GNU systems.
* config/locale/generic/messages_members.h (messages): Add dtor, ctor
definitions.
* config/locale/gnu/time_members.h (messages): New. Add dtor, ctor
definitions. Conditionalize for GNU systems.
* config/locale/generic/time_members.h (messages): New. Add dtor, ctor
definitions.
* include/bits/localefwd.h (locale::facet::_S_c_name): Add.
* src/locale.cc: Define.
* src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool):
Use it.
* config/locale/gnu/time_members.h: Use it.
* config/locale/gnu/messages_members.h: Use it.
* config/linker-map.gnu: Add locale::facets details.
* include/Makefile.am (target_headers_extra): Add time_members.h.
* include/Makefile.in: Regenerate.
* acinclude.m4: Export CTIME_H.
* aclocal.m4: Regenerate.
* configure: Regnerate.
2003-01-06 Paolo Carlini <pcarlini@unitus.it>
* src/codecvt.cc

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@

View File

@ -1231,6 +1231,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/generic/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@ -1265,6 +1266,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/gnu/messages_members.cc
CMONEY_CC=config/locale/gnu/monetary_members.cc
CNUMERIC_CC=config/locale/gnu/numeric_members.cc
CTIME_H=config/locale/gnu/time_members.h
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
@ -1281,6 +1283,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@ -1302,6 +1305,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
AC_SUBST(CTIME_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
AC_LINK_FILES($CCODECVT_CC, src/codecvt_members.cc)
AC_LINK_FILES($CCOLLATE_CC, src/collate_members.cc)

View File

@ -1,4 +1,4 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@ -1243,6 +1243,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/generic/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@ -1277,6 +1278,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/gnu/messages_members.cc
CMONEY_CC=config/locale/gnu/monetary_members.cc
CNUMERIC_CC=config/locale/gnu/numeric_members.cc
CTIME_H=config/locale/gnu/time_members.h
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
@ -1293,6 +1295,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@ -1314,6 +1317,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
AC_SUBST(CTIME_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
AC_LINK_FILES($CCODECVT_CC, src/codecvt_members.cc)
AC_LINK_FILES($CCOLLATE_CC, src/collate_members.cc)
@ -2270,6 +2274,31 @@ AC_MSG_RESULT($enable_symvers)
])
# isc-posix.m4 serial 1 (gettext-0.10.40)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN([AC_ISC_POSIX],
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
@ -2313,8 +2342,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@ -2330,42 +2358,13 @@ AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.4-p6])])
#
# Check to make sure that the build environment is sane.
#

View File

@ -3,9 +3,6 @@
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
// Define if GCC supports weak symbols.
#undef _GLIBCPP_SUPPORTS_WEAK
@ -743,6 +740,9 @@
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

View File

@ -50,7 +50,14 @@ GLIBCPP_3.2 {
std::[A-Zd-k]*;
std::length_error*;
std::logic_error*;
std::locale::[A-Za-z]*;
std::locale::[A-Za-e]*;
std::locale::facet::[A-Za-z]*;
std::locale::facet::_M*;
std::locale::facet::_S_c_locale;
std::locale::facet::_S_clone_c_locale*;
std::locale::facet::_S_create_c_locale*;
std::locale::facet::_S_destroy_c_locale*;
std::locale::[A-Zg-z]*;
std::locale::_[A-Ra-z]*;
std::locale::_S_classic;
std::locale::_S_global;
@ -99,6 +106,9 @@ GLIBCPP_3.2 {
# std::locale destructors
_ZNSt6localeD*;
# std::locale::facet destructors
_ZNSt6locale5facetD*;
# std::codecvt<char> members.
_ZNKSt7codecvtIcc11__mbstate_tE*;

View File

@ -1,6 +1,6 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation, Inc.
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -34,6 +34,16 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
: locale::facet(__refs)
{ _M_c_locale_messages = _S_c_locale; }
template<typename _CharT>
messages<_CharT>::messages(__c_locale __cloc, const char*, size_t __refs)
: locale::facet(__refs)
{ _M_c_locale_messages = _S_c_locale; }
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
@ -41,6 +51,10 @@
{ return this->do_open(__s, __loc); }
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{ _S_destroy_c_locale(_M_c_locale_messages); }
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
@ -56,3 +70,12 @@
void
messages<_CharT>::do_close(catalog) const
{ }
// messages_byname
template<typename _CharT>
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
_S_destroy_c_locale(_M_c_locale_messages);
_S_create_c_locale(_M_c_locale_messages, __s);
}

View File

@ -1,4 +1,4 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
//

View File

@ -1,6 +1,6 @@
// std::messages implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -28,12 +28,34 @@
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
// ISO C++ 14882: 22.2.7.1.2 messages functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
: locale::facet(__refs)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
_M_name_messages = _S_c_name;
#endif
_M_c_locale_messages = _S_c_locale;
}
template<typename _CharT>
messages<_CharT>::messages(__c_locale __cloc,
const char* __s, size_t __refs)
: locale::facet(__refs)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
_M_name_messages = new char[strlen(__s) + 1];
strcpy(_M_name_messages, __s);
#endif
_M_c_locale_messages = _S_clone_c_locale(__cloc);
}
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
@ -43,6 +65,17 @@
return this->do_open(__s, __loc);
}
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
if (_S_c_name != _M_name_messages)
delete [] _M_name_messages;
#endif
_S_destroy_c_locale(_M_c_locale_messages);
}
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __s,
@ -58,3 +91,18 @@
void
messages<_CharT>::do_close(catalog) const
{ }
// messages_byname
template<typename _CharT>
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
if (_S_c_name != _M_name_messages)
delete [] _M_name_messages;
_M_name_messages = new char[strlen(__s) + 1];
strcpy(_M_name_messages, __s);
#endif
_S_destroy_c_locale(_M_c_locale_messages);
_S_create_c_locale(_M_c_locale_messages, __s);
}

View File

@ -46,8 +46,7 @@
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__c_locale __cloc,
const char* __s __attribute__ ((__unused__)),
size_t __refs)
const char* __s, size_t __refs)
: locale::facet(__refs)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))

2433
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -320,6 +320,7 @@ target_headers_extra = \
${target_builddir}/c++io.h \
${target_builddir}/c++locale.h \
${target_builddir}/messages_members.h \
${target_builddir}/time_members.h \
${target_builddir}/codecvt_specializations.h
thread_target_headers = \
@ -409,6 +410,7 @@ ${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
@LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CTIME_H@ time_members.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
echo `date` > stamp-target; \
fi

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
@ -424,6 +425,7 @@ target_headers_extra = \
${target_builddir}/c++io.h \
${target_builddir}/c++locale.h \
${target_builddir}/messages_members.h \
${target_builddir}/time_members.h \
${target_builddir}/codecvt_specializations.h
@ -630,6 +632,7 @@ ${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
@LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CTIME_H@ time_members.h || true ;\
@LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
echo `date` > stamp-target; \
fi

View File

@ -1011,22 +1011,10 @@ namespace std
public:
explicit
__timepunct(size_t __refs = 0)
: locale::facet(__refs)
{
_M_name_timepunct = new char[2];
strcpy(_M_name_timepunct, "C");
_M_initialize_timepunct();
}
__timepunct(size_t __refs = 0);
explicit
__timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
: locale::facet(__refs)
{
_M_name_timepunct = new char[strlen(__s) + 1];
strcpy(_M_name_timepunct, __s);
_M_initialize_timepunct(__cloc);
}
__timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
void
_M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
@ -1123,11 +1111,7 @@ namespace std
protected:
virtual
~__timepunct()
{
delete [] _M_name_timepunct;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
~__timepunct();
// For use at construction time only.
void
@ -1169,6 +1153,8 @@ namespace std
template<typename _CharT>
const _CharT* __timepunct<_CharT>::_S_timezones[14];
// Include host and configuration specific timepunct functions.
#include <bits/time_members.h>
template<typename _CharT, typename _InIter>
class time_get : public locale::facet, public time_base
@ -1628,32 +1614,17 @@ namespace std
// Underlying "C" library locale information saved from
// initialization, needed by messages_byname as well.
__c_locale _M_c_locale_messages;
#if 1
// Only needed if glibc < 2.3
char* _M_name_messages;
#endif
public:
static locale::id id;
explicit
messages(size_t __refs = 0)
: locale::facet(__refs)
{
_M_name_messages = new char[2];
strcpy(_M_name_messages, "C");
_M_c_locale_messages = _S_c_locale;
}
messages(size_t __refs = 0);
// Non-standard.
explicit
messages(__c_locale __cloc, const char* __s, size_t __refs = 0)
: locale::facet(__refs)
{
_M_name_messages = new char[strlen(__s) + 1];
strcpy(_M_name_messages, __s);
_M_c_locale_messages = _S_clone_c_locale(__cloc);
}
messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
catalog
open(const basic_string<char>& __s, const locale& __loc) const
@ -1673,11 +1644,7 @@ namespace std
protected:
virtual
~messages()
{
delete [] _M_name_messages;
_S_destroy_c_locale(_M_c_locale_messages);
}
~messages();
virtual catalog
do_open(const basic_string<char>&, const locale&) const;
@ -1751,9 +1718,6 @@ namespace std
messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
#endif
// Include host and configuration specific messages virtual functions.
#include <bits/messages_members.h>
template<typename _CharT>
class messages_byname : public messages<_CharT>
{
@ -1762,15 +1726,7 @@ namespace std
typedef basic_string<_CharT> string_type;
explicit
messages_byname(const char* __s, size_t __refs = 0)
: messages<_CharT>(__refs)
{
delete [] _M_name_messages;
_M_name_messages = new char[strlen(__s) + 1];
strcpy(_M_name_messages, __s);
_S_destroy_c_locale(_M_c_locale_messages);
_S_create_c_locale(_M_c_locale_messages, __s);
}
messages_byname(const char* __s, size_t __refs = 0);
protected:
virtual
@ -1778,6 +1734,9 @@ namespace std
{ }
};
// Include host and configuration specific messages functions.
#include <bits/messages_members.h>
// Subclause convenience interfaces, inlines.
// NB: These are inline because, when used in a loop, some compilers

View File

@ -264,7 +264,7 @@ namespace std
// The "C" reference locale
static _Impl* _S_classic;
// Current global reference locale
// Current global locale
static _Impl* _S_global;
// Number of standard categories. For C++, these categories are
@ -419,10 +419,13 @@ namespace std
_Atomic_word _M_references;
protected:
// Contains data from the underlying "C" library for default "C"
// or "POSIX" locale.
static __c_locale _S_c_locale;
// Contains data from the underlying "C" library for for the
// classic locale.
static __c_locale _S_c_locale;
// String literal for the name of the classic locale.
static char _S_c_name[2];
explicit
facet(size_t __refs = 0) throw();

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@

View File

@ -75,6 +75,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@

View File

@ -75,6 +75,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@

View File

@ -1,4 +1,4 @@
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -451,6 +451,8 @@ namespace std
__c_locale
locale::facet::_S_c_locale;
char locale::facet::_S_c_name[2];
locale::facet::
~facet() { }

View File

@ -209,7 +209,10 @@ namespace std
: _M_references(__refs), _M_facets_size(_GLIBCPP_NUM_FACETS)
{
// Initialize the underlying locale model.
locale::facet::_S_create_c_locale(locale::facet::_S_c_locale, "C");
locale::facet::_S_c_name[0] = 'C';
locale::facet::_S_c_name[1] = '\0';
locale::facet::_S_create_c_locale(locale::facet::_S_c_locale,
locale::facet::_S_c_name);
_M_facets = new(&facet_vec) facet*[_M_facets_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
@ -220,7 +223,7 @@ namespace std
__i < _S_categories_size + _S_extra_categories_size; ++__i)
{
_M_names[__i] = new (&facet_name[__i]) char[2];
strcpy(_M_names[__i], "C");
strcpy(_M_names[__i], locale::facet::_S_c_name);
}
// This is needed as presently the C++ version of "C" locales

View File

@ -76,6 +76,7 @@ CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_H = @CTIME_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@