Commit 45c7cbd9 by Benjamin Kosnik Committed by Benjamin Kosnik

acconfig.h (_GLIBCPP_SYMVER): Add.


2002-10-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_SYMVER): Add.
	(_GLIBCPP_ASM_SYMVER): Add.
	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Define _GLIBCPP_SYMVER.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/bits/c++config (_GLIBCPP_AT_AT): Define, as an expedient
	hack around m4 issues with quoting '@'.
	* src/locale.cc: Use _GLIBCPP_ASM_SYMVER.
	* src/globals.cc: Same.

	* testsuite/22_locale/ctor_copy_dtor.cc (test04): Fix for
	non-glibc systems.

From-SVN: r58065
parent a0bed689
2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
* acconfig.h (_GLIBCPP_SYMVER): Add.
(_GLIBCPP_ASM_SYMVER): Add.
* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Define _GLIBCPP_SYMVER.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/bits/c++config (_GLIBCPP_AT_AT): Define, as an expedient
hack around m4 issues with quoting '@'.
* src/locale.cc: Use _GLIBCPP_ASM_SYMVER.
* src/globals.cc: Same.
* testsuite/22_locale/ctor_copy_dtor.cc (test04): Fix for
non-glibc systems.
2002-10-10 Benjamin Kosnik <bkoz@redhat.com>
* config/linker-map.gnu (GLIBCPP_3.2.1): Add.
......
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
......@@ -158,7 +158,44 @@ MULTICLEAN = true
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" "NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)"
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS)
......@@ -173,7 +210,7 @@ mkcheck.in testsuite_flags.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
......
......@@ -46,6 +46,20 @@
// Define if you have the copysignf function.
#undef _GLIBCPP_HAVE_COPYSIGNF
// Define to use symbol versioning in the shared library.
#undef _GLIBCPP_SYMVER
// Define symbol versioning in assember directives. If symbol
// versioning is beigng used, and the assembler supports this kind of
// thing, then use it.
// NB: _GLIBCPP_AT_AT is a hack to work around quoting issues in m4.
#if _GLIBCPP_SYMVER
#define _GLIBCPP_ASM_SYMVER(cur, old, version) \
asm (".symver " #cur "," #old _GLIBCPP_AT_AT #version);
#else
#define _GLIBCPP_ASM_SYMVER(cur, old, version)
#endif
// Define if mbstate_t exists in wchar.h.
#undef HAVE_MBSTATE_T
......
......@@ -2194,6 +2194,7 @@ case $enable_symvers in
;;
gnu)
LINKER_MAP=config/linker-map.gnu
AC_DEFINE(_GLIBCPP_SYMVER)
;;
esac
......
......@@ -2206,6 +2206,7 @@ case $enable_symvers in
;;
gnu)
LINKER_MAP=config/linker-map.gnu
AC_DEFINE(_GLIBCPP_SYMVER)
;;
esac
......
......@@ -24,6 +24,20 @@
// Define to use concept checking code from the boost libraries.
#undef _GLIBCPP_CONCEPT_CHECKS
// Define to use symbol versioning in the shared library.
#undef _GLIBCPP_SYMVER
// Define symbol versioning in assember directives. If symbol
// versioning is beigng used, and the assembler supports this kind of
// thing, then use it.
// NB: _GLIBCPP_AT_AT is a hack to work around quoting issues in m4.
#if _GLIBCPP_SYMVER
#define _GLIBCPP_ASM_SYMVER(cur, old, version) \
asm (".symver " #cur "," #old _GLIBCPP_AT_AT #version);
#else
#define _GLIBCPP_ASM_SYMVER(cur, old, version)
#endif
// Define if mbstate_t exists in wchar.h.
#undef HAVE_MBSTATE_T
......
......@@ -22214,6 +22214,10 @@ case $enable_symvers in
;;
gnu)
LINKER_MAP=config/linker-map.gnu
cat >> confdefs.h <<\EOF
#define _GLIBCPP_SYMVER 1
EOF
;;
esac
......@@ -22228,7 +22232,7 @@ else
GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE=
fi
echo $ac_n "checking versioning on shared library symbols""... $ac_c" 1>&6
echo "configure:22232: checking versioning on shared library symbols" >&5
echo "configure:22236: checking versioning on shared library symbols" >&5
echo "$ac_t""$enable_symvers" 1>&6
......@@ -22315,7 +22319,7 @@ glibcpp_prefixdir=${prefix}
# Process the option --with-gxx-include-dir=<path to include-files directory>
echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
echo "configure:22319: checking for --with-gxx-include-dir" >&5
echo "configure:22323: checking for --with-gxx-include-dir" >&5
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
......@@ -22339,7 +22343,7 @@ echo "$ac_t""$gxx_include_dir" 1>&6
# Process the option "--enable-version-specific-runtime-libs"
echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
echo "configure:22343: checking for --enable-version-specific-runtime-libs" >&5
echo "configure:22347: checking for --enable-version-specific-runtime-libs" >&5
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"
......@@ -22385,7 +22389,7 @@ if test x"$glibcpp_toolexecdir" = x"no"; then
fi
echo $ac_n "checking for install location""... $ac_c" 1>&6
echo "configure:22389: checking for install location" >&5
echo "configure:22393: checking for install location" >&5
echo "$ac_t""$gxx_include_dir" 1>&6
......
......@@ -55,6 +55,9 @@
// Use corrected code from the committee library group's issues list.
#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1
// Hopefully temporary workaround to autoconf/m4 issue with quoting '@'.
#define _GLIBCPP_AT_AT "@@"
// In those parts of the standard C++ library that use a mutex instead
// of a spin-lock, we now unconditionally use GCC's gthr.h mutex
// abstraction layer. All support to directly map to various
......
......@@ -55,15 +55,13 @@ namespace std
const locale::category locale::messages;
const locale::category locale::all;
// In the future, GLIBCXX_ABI > 5 should remove all asm directives
// in this file, and remove exports of any static data members of locale.
// In the future, GLIBCXX_ABI > 5 should remove all uses of
// _GLIBCPP_ASM_SYMVER in this file, and remove exports of any
// static data members of locale.
locale::_Impl* locale::_S_classic;
locale::_Impl* locale::_S_global;
const size_t locale::_S_categories_size;
asm (".symver _ZNSt6locale18_S_categories_sizeE,_ZNSt6locale17_S_num_categoriesE@@GLIBCPP_3.2");
_GLIBCPP_ASM_SYMVER(_ZNSt6locale18_S_categories_sizeE, _ZNSt6locale17_S_num_categoriesE, GLIBCPP_3.2)
const size_t locale::_S_extra_categories_size;
// Definitions for static const data members of locale::id
......
......@@ -362,26 +362,39 @@ void test04()
if (!setenv("LC_COLLATE", "de_DE", 1))
{
std::locale loc("");
#if _GLIBCPP_NUM_CATEGORIES
VERIFY( loc.name() == "LC_CTYPE=C;LC_NUMERIC=C;LC_COLLATE=de_DE;"
"LC_TIME=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;"
"LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;"
"LC_IDENTIFICATION=C" );
#else
VERIFY( loc.name() == "LC_CTYPE=C;LC_NUMERIC=C;LC_COLLATE=de_DE;"
"LC_TIME=C;LC_MONETARY=C;LC_MESSAGES=C" );
#endif
}
// Changing the LANG default while LC_COLLATE is set.
if (!setenv("LANG", "fr_FR", 1))
{
std::locale loc("");
#if _GLIBCPP_NUM_CATEGORIES
VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;"
"LC_COLLATE=de_DE;LC_TIME=fr_FR;LC_MONETARY=fr_FR;"
"LC_MESSAGES=fr_FR;LC_PAPER=fr_FR;LC_NAME=fr_FR;"
"LC_ADDRESS=fr_FR;LC_TELEPHONE=fr_FR;LC_MEASUREMENT=fr_FR;"
"LC_IDENTIFICATION=fr_FR" );
#else
VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;"
"LC_COLLATE=de_DE;LC_TIME=fr_FR;LC_MONETARY=fr_FR;"
"LC_MESSAGES=fr_FR" );
#endif
}
// Changing another (C only) category.
const char* oldLC_IDENTIFICATION =
getenv("LC_IDENTIFICATION") ? strdup(getenv("LC_IDENTIFICATION")) : "";
#if _GLIBCPP_NUM_CATEGORIES
if (!setenv("LC_IDENTIFICATION", "it_IT", 1))
{
std::locale loc("");
......@@ -391,6 +404,7 @@ void test04()
"LC_ADDRESS=fr_FR;LC_TELEPHONE=fr_FR;LC_MEASUREMENT=fr_FR;"
"LC_IDENTIFICATION=it_IT" );
}
#endif
// Restore the environment.
setenv("LC_ALL", oldLC_ALL ? oldLC_ALL : "", 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment