Implement std::messages.

2001-08-07  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::messages.
	Make config a fully-nested directory.
	* config/locale: New directory.
	* config/c_locale_generic.cc: Move into locale subdirectory.
	* config/c_locale_generic.h: Same.
	* config/c_locale_gnu.cc: Same.
	* config/c_locale_gnu.h: Same.
	* config/c_locale_ieee_1003.1-200x.cc: Same.
	* config/c_locale_ieee_1003.1-200x_.h: Same.
	* config/codecvt_specializations_generic.h: Same.
	* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
	* config/messages_members_gnu.h: Same.
	* config/messaages_members_gnu.cc: Same.
	* config/messages_members_generic.h: Same.
	* config/messaages_members_generic.cc: Same.
	* config/messages_members_ieee_1003.1-200x.h: Same.
	* config/messaages_members_ieee_1003.1-200x.cc: Same.
	* config/io: New directory.
	* config/basic_file_libio.h: Move into io subdirectory.
	* config/basic_file_libio.cc: Same.
	* config/c_io_libio.h: Same.
	* config/c_io_libio_codecvt.c: Same.
	* config/basic_file_stdio.h: Same.
	* config/basic_file_stdio.cc: Same.
	* config/c_io_stdio.h: Same.

	* po: New directory.
	* po/POTFILES.in: New file.
	* po/Makefile.am: New file.
	* po/Makefile.in: New file.
	* po/libstdc++.pot: Generic translation file.
	* po/fr.po: Preliminary French translation.
	* po/de.po: Preliminary German translation.
	* intl: New directory.
	* intl/Makefile.am: New file.
	* intl/Makefile.in: New file.
	* intl/string_literals.cc: New file.
	* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
	requisite setup for gettext. Re-arrange.
	* aclocal.m4: Regenerate.
	* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
	Output Makefile bits for po and intl.
	* configure: Regenerate.
	* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
	* Makefile.in: Regenerate.
	* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
	* config.h.in: Regenerate.

	* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.

	* include/Makefile.am (install-data-local): Don't install Makefile.
	* include/Makefile.in: Regenerate.

	* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
	Add member.
	* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
	* config/locale/c_locale_generic.cc: Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: Same.

	* include/bits/codecvt.h: Excise non-standard, non-required
	bits. This includes __enc_traits, and partial specializations of
	codecvt for __enc_traits.
	* src/codecvt.cc (__enc_traits::_S_max_size): Guard
	* config/codecvt_partials_ieee_1003.1-200x.h: New file.
	* config/codecvt_partials_generic.h: New file.
	* include/Makefile.am (allstamps): Add stamp-codecvt_model.
	(stamp-codecvt_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
	* testsuite/22_locale/codecvt_unicode_char.cc: Same.
	* testsuite/22_locale/ctor_copy_dtor.cc: And here.

	* include/bits/localefwd.h (class locale::facet): Add __enc_traits
	as a friend for _S_*_c_locale functions.
	* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
	argument to default constructor so that CODESET information can be
	deduced.
	* include/bits/locale_facets.h (messages_byname):
	Re-implement. Remove specializations.
	* src/locale.cc (messages_byname<char>): Remove specialization.
	(messages_byname<wchar_t>): Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
	* config/locale/c_locale_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
	* config/locale/messages_members_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_gnu.cc: New file.
	* config/locale/messages_members_gnu.h: New file.
	* config/locale/messages_members_generic.cc: New file.
	* config/locale/messages_members_generic.h: New file.

	* docs/html/configopts.html: Add documentation for new locale
	model, ieee_1003.1. Adjust other flags for current defaults.
	* docs/html/22_locale/locale.html: Update.
	* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
	* docs/html/22_locale/messages.html: New.

	* src/Makefile.am (sources): Add messages_virtuals.cc.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am (allstamps): Add stamp-messages_model.
	(stamp-messages_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
	* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
	bits for Irix.
	* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
	build directories message catalog base directory, and export.
	Eventually this should probably be made to deal with build and
	install directories. For now, punt on this as the library itself
	doesn't use message catalogs (yet).
	* testsuite/22_locale/messages.cc: New file.
	* testsuite/22_locale/messages_char_members.cc: New file.
	* testsuite/22_locale/messages_byname.cc: New file.

From-SVN: r44702
This commit is contained in:
Benjamin Kosnik 2001-08-08 02:49:01 +00:00 committed by Benjamin Kosnik
parent 7364fdd8e0
commit 33590f13b2
67 changed files with 7175 additions and 2061 deletions

View File

@ -1,3 +1,125 @@
2001-08-07 Benjamin Kosnik <bkoz@redhat.com>
Implement std::messages.
Make config a fully-nested directory.
* config/locale: New directory.
* config/c_locale_generic.cc: Move into locale subdirectory.
* config/c_locale_generic.h: Same.
* config/c_locale_gnu.cc: Same.
* config/c_locale_gnu.h: Same.
* config/c_locale_ieee_1003.1-200x.cc: Same.
* config/c_locale_ieee_1003.1-200x_.h: Same.
* config/codecvt_specializations_generic.h: Same.
* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
* config/messages_members_gnu.h: Same.
* config/messaages_members_gnu.cc: Same.
* config/messages_members_generic.h: Same.
* config/messaages_members_generic.cc: Same.
* config/messages_members_ieee_1003.1-200x.h: Same.
* config/messaages_members_ieee_1003.1-200x.cc: Same.
* config/io: New directory.
* config/basic_file_libio.h: Move into io subdirectory.
* config/basic_file_libio.cc: Same.
* config/c_io_libio.h: Same.
* config/c_io_libio_codecvt.c: Same.
* config/basic_file_stdio.h: Same.
* config/basic_file_stdio.cc: Same.
* config/c_io_stdio.h: Same.
* po: New directory.
* po/POTFILES.in: New file.
* po/Makefile.am: New file.
* po/Makefile.in: New file.
* po/libstdc++.pot: Generic translation file.
* po/fr.po: Preliminary French translation.
* po/de.po: Preliminary German translation.
* intl: New directory.
* intl/Makefile.am: New file.
* intl/Makefile.in: New file.
* intl/string_literals.cc: New file.
* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
requisite setup for gettext. Re-arrange.
* aclocal.m4: Regenerate.
* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
Output Makefile bits for po and intl.
* configure: Regenerate.
* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
* Makefile.in: Regenerate.
* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
* config.h.in: Regenerate.
* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.
* include/Makefile.am (install-data-local): Don't install Makefile.
* include/Makefile.in: Regenerate.
* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
Add member.
* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
* config/locale/c_locale_generic.cc: Same.
* config/locale/c_locale_ieee_1003.1-200x.cc: Same.
* include/bits/codecvt.h: Excise non-standard, non-required
bits. This includes __enc_traits, and partial specializations of
codecvt for __enc_traits.
* src/codecvt.cc (__enc_traits::_S_max_size): Guard
* config/codecvt_partials_ieee_1003.1-200x.h: New file.
* config/codecvt_partials_generic.h: New file.
* include/Makefile.am (allstamps): Add stamp-codecvt_model.
(stamp-codecvt_model): Add.
* include/Makefile.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
* testsuite/22_locale/codecvt_unicode_char.cc: Same.
* testsuite/22_locale/ctor_copy_dtor.cc: And here.
* include/bits/localefwd.h (class locale::facet): Add __enc_traits
as a friend for _S_*_c_locale functions.
* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
argument to default constructor so that CODESET information can be
deduced.
* include/bits/locale_facets.h (messages_byname):
Re-implement. Remove specializations.
* src/locale.cc (messages_byname<char>): Remove specialization.
(messages_byname<wchar_t>): Same.
* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
* config/locale/c_locale_ieee_1003.1-200x.h: New file.
* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
* config/locale/messages_members_ieee_1003.1-200x.h: New file.
* config/locale/messages_members_gnu.cc: New file.
* config/locale/messages_members_gnu.h: New file.
* config/locale/messages_members_generic.cc: New file.
* config/locale/messages_members_generic.h: New file.
* docs/html/configopts.html: Add documentation for new locale
model, ieee_1003.1. Adjust other flags for current defaults.
* docs/html/22_locale/locale.html: Update.
* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
* docs/html/22_locale/messages.html: New.
* src/Makefile.am (sources): Add messages_virtuals.cc.
* src/Makefile.in: Regenerate.
* include/Makefile.am (allstamps): Add stamp-messages_model.
(stamp-messages_model): Add.
* include/Makefile.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
bits for Irix.
* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
build directories message catalog base directory, and export.
Eventually this should probably be made to deal with build and
install directories. For now, punt on this as the library itself
doesn't use message catalogs (yet).
* testsuite/22_locale/messages.cc: New file.
* testsuite/22_locale/messages_char_members.cc: New file.
* testsuite/22_locale/messages_byname.cc: New file.
2001-08-06 Phil Edwards <pme@sources.redhat.com>
* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls...

View File

@ -24,7 +24,7 @@
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
SUBDIRS = include libio libmath libsupc++ src testsuite
SUBDIRS = include libio libmath libsupc++ src testsuite po intl
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
@ -139,5 +139,3 @@ AM_MAKEFLAGS = \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"

View File

@ -67,53 +67,75 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -121,13 +143,14 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
SUBDIRS = include libio libmath libsupc++ src testsuite
SUBDIRS = include libio libmath libsupc++ src testsuite po intl
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
@ -148,11 +171,11 @@ MULTICLEAN = true
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)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
CONFIG_HEADER = config.h
CONFIG_HEADER = config.h config.h ./testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES = mkcheck testsuite_flags
DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
mkcheck.in testsuite_flags.in
DIST_COMMON = README ./stamp-h1.in ./stamp-h2.in ChangeLog Makefile.am \
Makefile.in acconfig.h acinclude.m4 aclocal.m4 config.h.in configure \
configure.in mkcheck.in testsuite_flags.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@ -176,31 +199,50 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
@echo timestamp > stamp-h1 2> /dev/null
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h1.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
rm -f $(srcdir)/stamp-h1.in; \
$(MAKE) $(srcdir)/stamp-h1.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
$(srcdir)/stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
@echo timestamp > $(srcdir)/stamp-h1.in 2> /dev/null
config.h: stamp-h2
@if test ! -f $@; then \
rm -f stamp-h2; \
$(MAKE) stamp-h2; \
else :; fi
stamp-h2: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h2 2> /dev/null
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h2.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h2.in; \
$(MAKE) $(srcdir)/stamp-h2.in; \
else :; fi
$(srcdir)/stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h2.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f config.h
-rm -f config.h config.h
maintainer-clean-hdr:
mkcheck: $(top_builddir)/config.status mkcheck.in
@ -295,7 +337,7 @@ distcheck: dist
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@ -350,7 +392,7 @@ installcheck-am:
installcheck: installcheck-recursive
install-info-am:
install-info: install-info-recursive
all-recursive-am: config.h
all-recursive-am: config.h config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am:
@ -364,7 +406,7 @@ install-am: all-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile config.h
all-am: Makefile config.h config.h
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install

View File

@ -1,5 +1,15 @@
// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
// Defines libstdc++ version.
#undef PACKAGE
#undef VERSION
// Needed for gettext.
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
// Define if GCC supports weak symbols
#undef _GLIBCPP_SUPPORTS_WEAK

View File

@ -12,11 +12,58 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
esac], [multilib=yes])dnl
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
# adjust toplevel_srcdir accordingly, so that configure finds
# install-sh and other auxiliary files that live in the top-level
# source directory.
if test "${srcdir}" = "."; then
if test -z "${with_target_subdir}"; then
toprel=".."
else
if test "${with_target_subdir}" != "."; then
toprel="${with_multisrctop}../.."
else
toprel="${with_multisrctop}.."
fi
fi
else
toprel=".."
fi
AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
toplevel_srcdir=\${top_srcdir}/$toprel
AC_SUBST(toplevel_srcdir)
# Export build and source directories.
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
AC_SUBST(glibcpp_builddir)
AC_SUBST(glibcpp_srcdir)
dnl This is here just to satisfy automake.
ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also
# be 'cp -p' if linking isn't available.
#ac_cv_prog_LN_S='cp -p'
AC_PROG_LN_S
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR
configuring in a subdirectory])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler])
glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
AC_SUBST(glibcpp_basedir)
AM_INIT_AUTOMAKE(libstdc++, 3.0.0)
# Never versions of autoconf add an underscore to these functions.
# Prevent future problems ...
ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
@ -112,6 +159,9 @@ fi
LIB_AC_PROG_CXX
# For some reason, gettext needs this.
AC_ISC_POSIX
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
@ -144,6 +194,8 @@ LIB_AC_PROG_CXX
# This does for the target what configure.host does for the host. In
# addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET
#
])
@ -977,8 +1029,8 @@ dnl
dnl Check for which locale library to use: gnu or generic.
dnl
dnl GLIBCPP_ENABLE_CLOCALE
dnl --enable-clocale=gnu sets config/c_locale_gnu.cc and friends
dnl --enable-clocale=generic sets config/c_locale_generic.cc and friends
dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
dnl
dnl default is generic
dnl
@ -997,15 +1049,52 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl Check if a valid locale package
case x${enable_clocale_flag} in
xgnu)
CLOCALE_H=config/c_locale_gnu.h
CLOCALE_CC=config/c_locale_gnu.cc
AC_MSG_RESULT(gnu)
;;
xgeneric)
CLOCALE_H=config/c_locale_generic.h
CLOCALE_CC=config/c_locale_generic.cc
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_generic.h
CLOCALE_CC=config/locale/c_locale_generic.cc
CCODECVT_H=config/locale/codecvt_specializations_generic.h
CMESSAGES_H=config/locale/messages_members_generic.h
CMESSAGES_CC=config/locale/messages_members_generic.cc
;;
xgnu)
AC_MSG_RESULT(gnu)
# Declare intention to use gettext, and add support for specific
# languages.
# For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
ALL_LINGUAS="de fr"
AM_GNU_GETTEXT
# Export the build objects.
for ling in $ALL_LINGUAS; do \
glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
done
AC_SUBST(glibcpp_MOFILES)
CLOCALE_H=config/locale/c_locale_gnu.h
CLOCALE_CC=config/locale/c_locale_gnu.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
CMESSAGES_H=config/locale/messages_members_gnu.h
CMESSAGES_CC=config/locale/messages_members_gnu.cc
;;
xieee_1003.1)
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_ieee_1003.1-200x.h
CLOCALE_CC=config/locale/c_locale_ieee_1003.1-200x.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
CMESSAGES_H=config/locale/messages_members_ieee_1003.1-200x.h
CMESSAGES_CC=config/locale/messages_members_ieee_1003.1-200x.cc
;;
*)
echo "$enable_clocale is an unknown locale package" 1>&2
@ -1013,8 +1102,16 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
;;
esac
# This is where the testsuite looks for locale catalogs, using the
# -DLOCALEDIR define during testsuite compilation.
glibcpp_localedir=${glibcpp_builddir}/po/share/locale
AC_SUBST(glibcpp_localedir)
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
AC_LINK_FILES($CMESSAGES_CC, src/messages_members.cc)
])
@ -1022,7 +1119,7 @@ dnl
dnl Check for which I/O library to use: libio, or something specific.
dnl
dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
dnl
dnl default is stdio
dnl
@ -1042,9 +1139,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl Check if a valid I/O package
case x${enable_cstdio_flag} in
xlibio)
CSTDIO_H=config/c_io_libio.h
BASIC_FILE_H=config/basic_file_libio.h
BASIC_FILE_CC=config/basic_file_libio.cc
CSTDIO_H=config/io/c_io_libio.h
BASIC_FILE_H=config/io/basic_file_libio.h
BASIC_FILE_CC=config/io/basic_file_libio.cc
AC_MSG_RESULT(libio)
# see if we are on a system with libio native (ie, linux)
@ -1099,9 +1196,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
;;
xstdio | x | xno | xnone | xyes)
# default
CSTDIO_H=config/c_io_stdio.h
BASIC_FILE_H=config/basic_file_stdio.h
BASIC_FILE_CC=config/basic_file_stdio.cc
CSTDIO_H=config/io/c_io_stdio.h
BASIC_FILE_H=config/io/basic_file_stdio.h
BASIC_FILE_CC=config/io/basic_file_stdio.cc
AC_MSG_RESULT(stdio)
# We're not using stdio.
@ -1118,7 +1215,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
AC_LINK_FILES($BASIC_FILE_CC, src/basic_file.cc)
# 2000-08-04 bkoz hack
CCODECVT_C=config/c_io_libio_codecvt.c
CCODECVT_C=config/io/c_io_libio_codecvt.c
AC_SUBST(CCODECVT_C)
# 2000-08-04 bkoz hack
@ -1540,8 +1637,6 @@ dnl GLIBCPP_EXPORT_INSTALL_INFO
dnl calculates gxx_install_dir
dnl exports glibcpp_toolexecdir
dnl exports glibcpp_toolexeclibdir
dnl exports glibcpp_builddir
dnl exports glibcpp_srcdir
dnl exports glibcpp_prefixdir
dnl
dnl Assumes cross_compiling bits already done, and with_cross_host in
@ -1549,19 +1644,10 @@ dnl particular
dnl
dnl GLIBCPP_EXPORT_INSTALL_INFO
AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
# exported correctly in GLIBCPP_CONFIGURE.
glibcpp_toolexecdir=no
glibcpp_toolexeclibdir=no
# Export build and source directories.
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
glibcpp_prefixdir=${prefix}
AC_MSG_CHECKING([for interface version number])
@ -1627,8 +1713,6 @@ fi
AC_MSG_CHECKING([for install location])
AC_MSG_RESULT($gxx_include_dir)
AC_SUBST(glibcpp_builddir)
AC_SUBST(glibcpp_srcdir)
AC_SUBST(glibcpp_prefixdir)
AC_SUBST(gxx_include_dir)
AC_SUBST(glibcpp_toolexecdir)
@ -1636,28 +1720,6 @@ AC_SUBST(glibcpp_toolexeclibdir)
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AC_LC_MESSAGES, [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
if test $ac_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
])
])
# Check for functions in math library.
# Ulrich Drepper <drepper@cygnus.com>, 1998.
#
@ -1675,22 +1737,6 @@ AC_SUBST(LIBMATHOBJS)dnl
])
# Check for string functions.
# Ulrich Drepper <drepper@cygnus.com>, 1998.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AC_REPLACE_STRINGFUNCS(FUNCTION...)
AC_DEFUN(AC_REPLACE_STRINGFUNCS,
[AC_CHECK_FUNCS([$1], , [LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"])
AC_SUBST(LIBSTRINGOBJS)dnl
])
dnl This macro searches for a GNU version of make. If a match is found, the
dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
@ -1810,3 +1856,24 @@ AC_DEFUN([AC_PROG_LD])
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AC_LC_MESSAGES, [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
if test $ac_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
])
])

View File

@ -24,11 +24,58 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
esac], [multilib=yes])dnl
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
# adjust toplevel_srcdir accordingly, so that configure finds
# install-sh and other auxiliary files that live in the top-level
# source directory.
if test "${srcdir}" = "."; then
if test -z "${with_target_subdir}"; then
toprel=".."
else
if test "${with_target_subdir}" != "."; then
toprel="${with_multisrctop}../.."
else
toprel="${with_multisrctop}.."
fi
fi
else
toprel=".."
fi
AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
toplevel_srcdir=\${top_srcdir}/$toprel
AC_SUBST(toplevel_srcdir)
# Export build and source directories.
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
AC_SUBST(glibcpp_builddir)
AC_SUBST(glibcpp_srcdir)
dnl This is here just to satisfy automake.
ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also
# be 'cp -p' if linking isn't available.
#ac_cv_prog_LN_S='cp -p'
AC_PROG_LN_S
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR
configuring in a subdirectory])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler])
glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
AC_SUBST(glibcpp_basedir)
AM_INIT_AUTOMAKE(libstdc++, 3.0.0)
# Never versions of autoconf add an underscore to these functions.
# Prevent future problems ...
ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
@ -124,6 +171,9 @@ fi
LIB_AC_PROG_CXX
# For some reason, gettext needs this.
AC_ISC_POSIX
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
@ -156,6 +206,8 @@ LIB_AC_PROG_CXX
# This does for the target what configure.host does for the host. In
# addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET
#
])
@ -989,8 +1041,8 @@ dnl
dnl Check for which locale library to use: gnu or generic.
dnl
dnl GLIBCPP_ENABLE_CLOCALE
dnl --enable-clocale=gnu sets config/c_locale_gnu.cc and friends
dnl --enable-clocale=generic sets config/c_locale_generic.cc and friends
dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
dnl
dnl default is generic
dnl
@ -1009,15 +1061,52 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl Check if a valid locale package
case x${enable_clocale_flag} in
xgnu)
CLOCALE_H=config/c_locale_gnu.h
CLOCALE_CC=config/c_locale_gnu.cc
AC_MSG_RESULT(gnu)
;;
xgeneric)
CLOCALE_H=config/c_locale_generic.h
CLOCALE_CC=config/c_locale_generic.cc
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_generic.h
CLOCALE_CC=config/locale/c_locale_generic.cc
CCODECVT_H=config/locale/codecvt_specializations_generic.h
CMESSAGES_H=config/locale/messages_members_generic.h
CMESSAGES_CC=config/locale/messages_members_generic.cc
;;
xgnu)
AC_MSG_RESULT(gnu)
# Declare intention to use gettext, and add support for specific
# languages.
# For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
ALL_LINGUAS="de fr"
AM_GNU_GETTEXT
# Export the build objects.
for ling in $ALL_LINGUAS; do \
glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
done
AC_SUBST(glibcpp_MOFILES)
CLOCALE_H=config/locale/c_locale_gnu.h
CLOCALE_CC=config/locale/c_locale_gnu.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
CMESSAGES_H=config/locale/messages_members_gnu.h
CMESSAGES_CC=config/locale/messages_members_gnu.cc
;;
xieee_1003.1)
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_ieee_1003.1-200x.h
CLOCALE_CC=config/locale/c_locale_ieee_1003.1-200x.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
CMESSAGES_H=config/locale/messages_members_ieee_1003.1-200x.h
CMESSAGES_CC=config/locale/messages_members_ieee_1003.1-200x.cc
;;
*)
echo "$enable_clocale is an unknown locale package" 1>&2
@ -1025,8 +1114,16 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
;;
esac
# This is where the testsuite looks for locale catalogs, using the
# -DLOCALEDIR define during testsuite compilation.
glibcpp_localedir=${glibcpp_builddir}/po/share/locale
AC_SUBST(glibcpp_localedir)
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
AC_LINK_FILES($CMESSAGES_CC, src/messages_members.cc)
])
@ -1034,7 +1131,7 @@ dnl
dnl Check for which I/O library to use: libio, or something specific.
dnl
dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
dnl
dnl default is stdio
dnl
@ -1054,9 +1151,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl Check if a valid I/O package
case x${enable_cstdio_flag} in
xlibio)
CSTDIO_H=config/c_io_libio.h
BASIC_FILE_H=config/basic_file_libio.h
BASIC_FILE_CC=config/basic_file_libio.cc
CSTDIO_H=config/io/c_io_libio.h
BASIC_FILE_H=config/io/basic_file_libio.h
BASIC_FILE_CC=config/io/basic_file_libio.cc
AC_MSG_RESULT(libio)
# see if we are on a system with libio native (ie, linux)
@ -1111,9 +1208,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
;;
xstdio | x | xno | xnone | xyes)
# default
CSTDIO_H=config/c_io_stdio.h
BASIC_FILE_H=config/basic_file_stdio.h
BASIC_FILE_CC=config/basic_file_stdio.cc
CSTDIO_H=config/io/c_io_stdio.h
BASIC_FILE_H=config/io/basic_file_stdio.h
BASIC_FILE_CC=config/io/basic_file_stdio.cc
AC_MSG_RESULT(stdio)
# We're not using stdio.
@ -1130,7 +1227,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
AC_LINK_FILES($BASIC_FILE_CC, src/basic_file.cc)
# 2000-08-04 bkoz hack
CCODECVT_C=config/c_io_libio_codecvt.c
CCODECVT_C=config/io/c_io_libio_codecvt.c
AC_SUBST(CCODECVT_C)
# 2000-08-04 bkoz hack
@ -1552,8 +1649,6 @@ dnl GLIBCPP_EXPORT_INSTALL_INFO
dnl calculates gxx_install_dir
dnl exports glibcpp_toolexecdir
dnl exports glibcpp_toolexeclibdir
dnl exports glibcpp_builddir
dnl exports glibcpp_srcdir
dnl exports glibcpp_prefixdir
dnl
dnl Assumes cross_compiling bits already done, and with_cross_host in
@ -1561,19 +1656,10 @@ dnl particular
dnl
dnl GLIBCPP_EXPORT_INSTALL_INFO
AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
# exported correctly in GLIBCPP_CONFIGURE.
glibcpp_toolexecdir=no
glibcpp_toolexeclibdir=no
# Export build and source directories.
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
glibcpp_prefixdir=${prefix}
AC_MSG_CHECKING([for interface version number])
@ -1639,8 +1725,6 @@ fi
AC_MSG_CHECKING([for install location])
AC_MSG_RESULT($gxx_include_dir)
AC_SUBST(glibcpp_builddir)
AC_SUBST(glibcpp_srcdir)
AC_SUBST(glibcpp_prefixdir)
AC_SUBST(gxx_include_dir)
AC_SUBST(glibcpp_toolexecdir)
@ -1648,28 +1732,6 @@ AC_SUBST(glibcpp_toolexeclibdir)
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AC_LC_MESSAGES, [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
if test $ac_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
])
])
# Check for functions in math library.
# Ulrich Drepper <drepper@cygnus.com>, 1998.
#
@ -1687,22 +1749,6 @@ AC_SUBST(LIBMATHOBJS)dnl
])
# Check for string functions.
# Ulrich Drepper <drepper@cygnus.com>, 1998.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AC_REPLACE_STRINGFUNCS(FUNCTION...)
AC_DEFUN(AC_REPLACE_STRINGFUNCS,
[AC_CHECK_FUNCS([$1], , [LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"])
AC_SUBST(LIBSTRINGOBJS)dnl
])
dnl This macro searches for a GNU version of make. If a match is found, the
dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
@ -1822,6 +1868,444 @@ AC_DEFUN([AC_PROG_LD])
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AC_LC_MESSAGES, [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
if test $ac_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
])
])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# serial 1
AC_DEFUN(AM_MAINTAINER_MODE,
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
# Define a conditional.
AC_DEFUN(AM_CONDITIONAL,
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi])
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 5
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_CHECK_LIB(intl, gettext,
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)],
gt_cv_func_gettext_libintl=no)])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$CATOBJEXT" = "NONE"; then
AC_MSG_CHECKING([whether catgets can be used])
AC_ARG_WITH(catgets,
[ --with-catgets use catgets functions if available],
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
AC_MSG_RESULT($nls_cv_use_catgets)
if test "$nls_cv_use_catgets" = "yes"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
strdup __argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
AM_LC_MESSAGES
AM_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
fi])
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
@ -1915,39 +2399,6 @@ else
fi
AC_SUBST($1)])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# serial 1
AC_DEFUN(AM_MAINTAINER_MODE,
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
# Define a conditional.
AC_DEFUN(AM_CONDITIONAL,
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,

View File

@ -1,8 +1,54 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
// Needed for gettext.
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
// Define if GCC supports weak symbols
#undef _GLIBCPP_SUPPORTS_WEAK
@ -75,6 +121,15 @@
// Define if LC_MESSAGES is available in <locale.h>.
#undef HAVE_LC_MESSAGES
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the _acosf function. */
#undef HAVE__ACOSF
@ -315,6 +370,9 @@
/* Define if you have the cosl function. */
#undef HAVE_COSL
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the drand48 function. */
#undef HAVE_DRAND48
@ -378,6 +436,9 @@
/* Define if you have the fwscanf function. */
#undef HAVE_FWSCANF
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
@ -459,6 +520,9 @@
/* Define if you have the modfl function. */
#undef HAVE_MODFL
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the nan function. */
#undef HAVE_NAN
@ -471,6 +535,9 @@
/* Define if you have the powl function. */
#undef HAVE_POWL
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the putwc function. */
#undef HAVE_PUTWC
@ -480,6 +547,12 @@
/* Define if you have the qfpclass function. */
#undef HAVE_QFPCLASS
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the signbitl function. */
#undef HAVE_SIGNBITL
@ -510,6 +583,18 @@
/* Define if you have the sqrtl function. */
#undef HAVE_SQRTL
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strtold function. */
#undef HAVE_STRTOLD
@ -645,6 +730,9 @@
/* Define if you have the wscanf function. */
#undef HAVE_WSCANF
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H
@ -663,6 +751,9 @@
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
@ -672,15 +763,27 @@
/* Define if you have the <machine/param.h> header file. */
#undef HAVE_MACHINE_PARAM_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <nan.h> header file. */
#undef HAVE_NAN_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/isa_defs.h> header file. */
#undef HAVE_SYS_ISA_DEFS_H
/* Define if you have the <sys/machine.h> header file. */
#undef HAVE_SYS_MACHINE_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
@ -690,6 +793,9 @@
/* Define if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM

View File

@ -38,16 +38,20 @@
namespace std
{
void
locale::facet::_S_create_c_locale(__c_locale& /*__cloc*/, const char*)
locale::facet::_S_create_c_locale(__c_locale&, const char*)
{ }
void
locale::facet::_S_destroy_c_locale(__c_locale& /*__cloc*/)
locale::facet::_S_destroy_c_locale(__c_locale&)
{ }
__c_locale
locale::facet::_S_clone_c_locale(__c_locale&)
{ return __c_locale(); }
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale /*__cloc*/)
numpunct<char>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
@ -60,7 +64,7 @@ namespace std
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale /*__cloc*/)
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
@ -73,7 +77,7 @@ namespace std
template<>
void
moneypunct<char>::_M_initialize_moneypunct(__c_locale /*__cloc*/)
moneypunct<char>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
@ -90,7 +94,7 @@ namespace std
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
void
moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale /*__cloc*/)
moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
@ -105,3 +109,4 @@ namespace std
}
#endif
} // namespace std

View File

@ -61,6 +61,10 @@ namespace std
__freelocale(__cloc);
}
__c_locale
locale::facet::_S_clone_c_locale(__c_locale& __cloc)
{ return __duplocale(__cloc); }
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)

View File

@ -34,8 +34,16 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
#include <libintl.h> // For messages
namespace std
{
typedef __locale_t __c_locale;
}

View File

@ -0,0 +1,112 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
void
locale::facet::_S_create_c_locale(__c_locale&, const char*)
{ }
void
locale::facet::_S_destroy_c_locale(__c_locale&)
{ }
__c_locale
locale::facet::_S_clone_c_locale(__c_locale&)
{ return __c_locale(); }
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
_M_thousands_sep = ',';
_M_grouping = "";
_M_truename = "true";
_M_falsename = "false";
}
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = L',';
_M_grouping = "";
_M_truename = L"true";
_M_falsename = L"false";
}
#endif
template<>
void
moneypunct<char>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
_M_thousands_sep = ',';
_M_grouping = "";
_M_curr_symbol = string_type();
_M_positive_sign = string_type();
_M_negative_sign = string_type();
_M_frac_digits = 0;
_M_pos_format = money_base::_S_default_pattern;
_M_neg_format = money_base::_S_default_pattern;
}
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
void
moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = L',';
_M_grouping = "";
_M_curr_symbol = string_type();
_M_positive_sign = string_type();
_M_negative_sign = string_type();
_M_frac_digits = 0;
_M_pos_format = money_base::_S_default_pattern;
_M_neg_format = money_base::_S_default_pattern;
}
#endif
} // namespace std

View File

@ -0,0 +1,49 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
#include <nl_types.h> // For messages
namespace std
{
typedef __locale_t __c_locale;
}

View File

@ -0,0 +1,38 @@
// Locale support (codecvt) -*- C++ -*-
// Copyright (C) 2000, 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.5 Template class codecvt
//
// Warning: this file is not meant for user inclusion. Use <locale>.
// Written by Benjamin Kosnik <bkoz@cygnus.com>
// XXX dummy file

View File

@ -0,0 +1,453 @@
// Locale support (codecvt) -*- C++ -*-
// Copyright (C) 2000, 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.5 Template class codecvt
//
// Warning: this file is not meant for user inclusion. Use <locale>.
// Written by Benjamin Kosnik <bkoz@cygnus.com>
// XXX
// __enc_traits may need to move up the locale header hierarchy,
// depending on if ctype ends up using it.
// Extensions to use icov for dealing with character encodings,
// including conversions and comparisons between various character
// sets. This object encapsulates data that may need to be shared between
// char_traits, codecvt and ctype.
#if _GLIBCPP_USE_SHADOW_HEADERS
using _C_legacy::CODESET;
#endif
// XXX
// Define this here to codecvt.cc can have _S_max_size definition.
#define _GLIBCPP_USE___ENC_TRAITS 1
class __enc_traits
{
public:
// Types:
// NB: A conversion descriptor subsumes and enhances the
// functionality of a simple state type such as mbstate_t.
typedef iconv_t __desc_type;
protected:
// Data Members:
// Max size of charset encoding name
static const int _S_max_size = 32;
// Name of internal character set encoding.
char _M_int_enc[_S_max_size];
// Name of external character set encoding.
char _M_ext_enc[_S_max_size];
// Conversion descriptor between external encoding to internal encoding.
__desc_type _M_in_desc;
// Conversion descriptor between internal encoding to external encoding.
__desc_type _M_out_desc;
// Details the byte-order marker for the external encoding, if necessary.
int _M_ext_bom;
// Details the byte-order marker for the internal encoding, if necessary.
int _M_int_bom;
public:
__enc_traits(const locale& __loc = locale())
: _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
{
// __intc_end = whatever we are using internally, which is
// UCS4 (linux)
// UCS2 == UNICODE (microsoft, java, aix, whatever...)
// XXX Currently don't know how to get this data from target system...
strcpy(_M_int_enc, "UCS4");
// __extc_end = external codeset in current locale
// XXX There has got to be a better way to do this.
__c_locale __cloc;
locale::facet::_S_create_c_locale(__cloc, __loc.name().c_str());
strcpy(_M_ext_enc, __nl_langinfo_l(CODESET, __cloc));
locale::facet::_S_destroy_c_locale(__cloc);
}
__enc_traits(const char* __int, const char* __ext, int __ibom = 0,
int __ebom = 0)
: _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
{
strncpy(_M_int_enc, __int, _S_max_size);
strncpy(_M_ext_enc, __ext, _S_max_size);
}
// 21.1.2 traits typedefs
// p4
// typedef STATE_T state_type
// requires: state_type shall meet the requirements of
// CopyConstructible types (20.1.3)
__enc_traits(const __enc_traits& __obj)
{
strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
}
~__enc_traits()
{
iconv_close(_M_in_desc);
iconv_close(_M_out_desc);
}
// Initializes
void
_M_init()
{
_M_in_desc = iconv_open(_M_int_enc, _M_ext_enc);
_M_out_desc = iconv_open(_M_ext_enc, _M_int_enc);
if (_M_out_desc == iconv_t(-1) || _M_in_desc == iconv_t(-1))
{
// XXX Extended error checking.
}
}
bool
_M_good()
{
return _M_out_desc && _M_in_desc
&& _M_out_desc != iconv_t(-1) && _M_in_desc != iconv_t(-1);
}
const __desc_type*
_M_get_in_descriptor()
{ return &_M_in_desc; }
const __desc_type*
_M_get_out_descriptor()
{ return &_M_out_desc; }
const char*
_M_get_internal_enc()
{ return _M_int_enc; }
const char*
_M_get_external_enc()
{ return _M_ext_enc; }
int
_M_get_external_bom()
{ return _M_ext_bom; }
int
_M_get_internal_bom()
{ return _M_int_bom; }
};
// Partial specialization
// This specialization takes advantage of iconv to provide code
// conversions between a large number of character encodings.
template<typename _InternT, typename _ExternT>
class codecvt<_InternT, _ExternT, __enc_traits>
: public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits>
{
public:
// Types:
typedef codecvt_base::result result;
typedef _InternT intern_type;
typedef _ExternT extern_type;
typedef __enc_traits state_type;
typedef __enc_traits::__desc_type __desc_type;
typedef __enc_traits __enc_type;
// Data Members:
static locale::id id;
explicit
codecvt(size_t __refs = 0)
: __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
{ }
explicit
codecvt(__enc_type* __enc, size_t __refs = 0)
: __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
{ }
protected:
virtual
~codecvt() { }
virtual result
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const;
virtual result
do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const;
virtual result
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const;
virtual int
do_encoding() const throw();
virtual bool
do_always_noconv() const throw();
virtual int
do_length(const state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
virtual int
do_max_length() const throw();
};
template<typename _InternT, typename _ExternT>
locale::id
codecvt<_InternT, _ExternT, __enc_traits>::id;
// This adaptor works around the signature problems of the second
// argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
// uses 'char**', which is what the standard is (apparently) due to use
// in the future. Using this adaptor, g++ will do the work for us.
template<typename _T>
inline size_t
__iconv_adaptor(size_t(*iconv_func)(iconv_t, _T, size_t*, char**, size_t*),
iconv_t cd, char** inbuf, size_t* inbytesleft,
char** outbuf, size_t* outbytesleft)
{
return iconv_func(cd, (_T)inbuf, inbytesleft, outbuf, outbytesleft);
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_out_descriptor();
const size_t __fmultiple = sizeof(intern_type) / sizeof(char);
size_t __flen = __fmultiple * (__from_end - __from);
const size_t __tmultiple = sizeof(extern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
char* __cfrom;
size_t __conv;
// Some encodings need a byte order marker as the first item
// in the byte stream, to designate endian-ness. The default
// value for the byte order marker is NULL, so if this is
// the case, it's not necessary and we can just go on our
// merry way.
int __int_bom = __state._M_get_internal_bom();
if (__int_bom)
{
size_t __size = __from_end - __from;
intern_type* __cfixed = static_cast<intern_type*>(__builtin_alloca(sizeof(intern_type) * (__size + 1)));
__cfixed[0] = static_cast<intern_type>(__int_bom);
char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
else
{
intern_type* __cfixed = const_cast<intern_type*>(__from);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
if (__conv != size_t(-1))
{
__from_next = reinterpret_cast<const intern_type*>(__cfrom);
__to_next = reinterpret_cast<extern_type*>(__cto);
__ret = ok;
}
else
{
if (__flen < static_cast<size_t>(__from_end - __from))
{
__from_next = reinterpret_cast<const intern_type*>(__cfrom);
__to_next = reinterpret_cast<extern_type*>(__cto);
__ret = partial;
}
else
__ret = error;
}
}
return __ret;
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_in_descriptor();
const size_t __tmultiple = sizeof(intern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL,
&__cto, &__tlen);
if (__conv != size_t(-1))
{
__to_next = reinterpret_cast<extern_type*>(__cto);
if (__tlen == __tmultiple * (__to_end - __to))
__ret = noconv;
else if (__tlen == 0)
__ret = ok;
else
__ret = partial;
}
else
__ret = error;
}
return __ret;
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_in_descriptor();
const size_t __fmultiple = sizeof(extern_type) / sizeof(char);
size_t __flen = __fmultiple * (__from_end - __from);
const size_t __tmultiple = sizeof(intern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
char* __cfrom;
size_t __conv;
// Some encodings need a byte order marker as the first item
// in the byte stream, to designate endian-ness. The default
// value for the byte order marker is NULL, so if this is
// the case, it's not necessary and we can just go on our
// merry way.
int __ext_bom = __state._M_get_external_bom();
if (__ext_bom)
{
size_t __size = __from_end - __from;
extern_type* __cfixed = static_cast<extern_type*>(__builtin_alloca(sizeof(extern_type) * (__size + 1)));
__cfixed[0] = static_cast<extern_type>(__ext_bom);
char_traits<extern_type>::copy(__cfixed + 1, __from, __size);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
else
{
extern_type* __cfixed = const_cast<extern_type*>(__from);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
if (__conv != size_t(-1))
{
__from_next = reinterpret_cast<const extern_type*>(__cfrom);
__to_next = reinterpret_cast<intern_type*>(__cto);
__ret = ok;
}
else
{
if (__flen < static_cast<size_t>(__from_end - __from))
{
__from_next = reinterpret_cast<const extern_type*>(__cfrom);
__to_next = reinterpret_cast<intern_type*>(__cto);
__ret = partial;
}
else
__ret = error;
}
}
return __ret;
}
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_encoding() const throw()
{ return 0; }
template<typename _InternT, typename _ExternT>
bool
codecvt<_InternT, _ExternT, __enc_traits>::
do_always_noconv() const throw()
{ return false; }
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_length(const state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const
{ return min(__max, static_cast<size_t>(__end - __from)); }
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 74. Garbled text for codecvt::do_max_length
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_max_length() const throw()
{ return 1; }
#endif

View File

@ -0,0 +1,45 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
// Specializations
template<>
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{ return __dfault; }
}

View File

@ -0,0 +1,62 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char*) const
{ return this->do_open(__s, __loc); }
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{ }
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
{ return 0; }
template<typename _CharT>
messages<_CharT>::string_type
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{ return __dfault; }
template<typename _CharT>
void
messages<_CharT>::do_close(catalog) const
{ }

View File

@ -0,0 +1,57 @@
// std::messages implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
// Specializations
template<>
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{
#if 0
// Requires glibc 2.3
__c_locale __old = uselocale(_M_c_locale_messages);
const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
uselocale(__old);
return string(__msg);
#else
setlocale(LC_ALL, _M_name_messages);
const char* __msg = gettext(__dfault.c_str());
return string(__msg);
#endif
}
}

View File

@ -0,0 +1,93 @@
// std::messages implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char* __dir) const
{
bindtextdomain(__s.c_str(), __dir);
return this->do_open(__s, __loc);
}
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{
if (_M_c_locale_messages)
_S_destroy_c_locale(_M_c_locale_messages);
}
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __s,
const locale&) const
{
// No error checking is done, assume the catalog exists and can
// be used.
textdomain(__s.c_str());
return 0;
}
template<typename _CharT>
messages<_CharT>::string_type
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{
#if 0
// Requires glibc 2.3
__c_locale __old = uselocale(_M_c_locale_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
uselocale(__old);
return _M_convert_from_char(__msg);
#else
setlocale(LC_ALL, _M_name_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
return _M_convert_from_char(__msg);
#endif
}
template<typename _CharT>
void
messages<_CharT>::do_close(catalog) const
{ }

View File

@ -0,0 +1,49 @@
// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
// Specializations
template<>
string
messages<char>::do_get(catalog __c, int __setid, int __msgid,
const string& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
return string(catgets(__nlc, __setid, __msgid, __dfault.c_str()));
}
}

View File

@ -0,0 +1,70 @@
// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char*) const
{ return this->do_open(__s, __loc); }
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{ }
template<typename _CharT>
messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __s,
const locale&) const
{ return reinterpret_cast<catalog>(catopen(__s.c_str(), NL_CAT_LOCALE)); }
template<typename _CharT>
messages<_CharT>::string_type
messages<_CharT>::do_get(catalog __c, int __setid, int __msgid,
const string_type& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
char* __msg = catgets(__nlc, __setid, __msgid,
_M_convert_to_char(__dfault));
return _M_convert_from_char(__msg);
}
template<typename _CharT>
void
messages<_CharT>::do_close(catalog __c) const
{ catclose(reinterpret_cast<nl_catd>(__c)); }

4344
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,30 +4,13 @@
AC_PREREQ(2.13)
AC_INIT(src/ios.cc)
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
# adjust toplevel_srcdir accordingly, so that configure finds
# install-sh and other auxiliary files that live in the top-level
# source directory.
if test "${srcdir}" = "."; then
if test -z "${with_target_subdir}"; then
toprel=".."
else
if test "${with_target_subdir}" != "."; then
toprel="${with_multisrctop}../.."
else
toprel="${with_multisrctop}.."
fi
fi
else
toprel=".."
fi
AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
toplevel_srcdir=\${top_srcdir}/$toprel
AC_SUBST(toplevel_srcdir)
dnl This is here just to satisfy automake.
ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
PACKAGE=libstdc++
MAJOR_VERSION=3
MINOR_VERSION=1
MICRO_VERSION=0
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
# AC 2.50 sets target_alias iff the user specified --target, but we use it
@ -36,34 +19,26 @@ AC_CANONICAL_SYSTEM
target_alias=${target_alias-$target}
AC_SUBST(target_alias)
# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also
# be 'cp -p' if linking isn't available.
#ac_cv_prog_LN_S='cp -p'
AC_PROG_LN_S
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR
configuring in a subdirectory])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler])
# Runs configure.host and configure.target. Have to run this before
# the GLIBCPP_ENABLE_* macros below.
# Runs configure.host and configure.target, as well as finds CC, CXX
# and assorted other critical bits. Have to run this before the
# GLIBCPP_ENABLE_* macros below.
GLIBCPP_CONFIGURE(.)
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
GLIBCPP_CHECK_GNU_MAKE
AM_CONFIG_HEADER(config.h testsuite/testsuite_hooks.h)
# Check for c++ or library specific bits that don't require linking.
GLIBCPP_CHECK_COMPILER_VERSION
#GLIBCPP_CHECK_COMPILER_VERSION
GLIBCPP_CHECK_GNU_MAKE
# Enable all the crazy c++ stuff. C_MBCHAR must come early.
# Enable all the variable C++ stuff. C_MBCHAR must come early.
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_CLOCALE
@ -75,13 +50,14 @@ GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_CXX_FLAGS([none])
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
if test -n "$with_cross_host" || test x"$build" != x"$host"; then
# We are being configured with some form of cross compiler.
# mknumeric_limits may not work correctly, either because the
# compiler may not run on this machine, may not be able to link
# executables, or may produce executables we can't run on this
# machine.
# machine. Thus, just use the pre-generated include/bits/limits_generic.h
GLIBCPP_IS_CROSS_COMPILING=1
# If Canadian cross, then don't pick up tools from the build
@ -220,6 +196,7 @@ else
[AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])])
AC_FUNC_MMAP
fi
# Enable/configure some pieces which may require knowledge about the
@ -272,7 +249,7 @@ AC_SUBST(LIBSUPCXX_PICFLAGS)
AC_OUTPUT(Makefile \
include/Makefile src/Makefile \
libmath/Makefile libio/Makefile libsupc++/Makefile \
testsuite/Makefile mkcheck testsuite_flags,
po/Makefile intl/Makefile testsuite/Makefile mkcheck testsuite_flags,
[if test -n "$CONFIG_FILES"; then
ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
grep '^MULTISUBDIR =' Makefile >> src/Makefile

View File

@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 22</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $ -->
<!-- $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ -->
</HEAD>
<BODY>
@ -22,19 +22,60 @@
<HR>
<H1>Contents</H1>
<UL>
<LI><A HREF="#1">Bjarne Stroustrup on Locales</A>
<LI><A HREF="#2">Nathan Myers on Locales</A>
<LI><A HREF="#3">class locale</A>
<LI><A HREF="#4">class codecvt</A>
<LI><A HREF="#5">class ctype</A>
<LI><A HREF="#6">Correct Transformations</A>
<LI><A HREF="#1">class locale</A>
<LI><A HREF="#2">class codecvt</A>
<LI><A HREF="#3">class ctype</A>
<LI><A HREF="#4">class messages</A>
<LI><A HREF="#5">Bjarne Stroustrup on Locales</A>
<LI><A HREF="#6">Nathan Myers on Locales</A>
<LI><A HREF="#7">Correct Transformations</A>
</UL>
<HR>
<!-- ####################################################### -->
<H2><A NAME="1">Stroustrup on Locales</A></H2>
<HR>
<H2><A NAME="1">class locale</A></H2>
<P> Notes made during the implementation of locales can be found
<A HREF="locale.html">here</A>.
</P>
<HR>
<H2><A NAME="2">class codecvt</A></H2>
<P> Notes made during the implementation of codecvt can be found
<A HREF="codecvt.html">here</A>.
</P>
<P> The following is the abstract from the implementation notes:
<BLOCKQUOTE>
The standard class codecvt attempts to address conversions between
different character encoding schemes. In particular, the standard
attempts to detail conversions between the implementation-defined
wide characters (hereafter referred to as wchar_t) and the standard
type char that is so beloved in classic &quot;C&quot; (which can
now be referred to as narrow characters.) This document attempts
to describe how the GNU libstdc++-v3 implementation deals with the
conversion between wide and narrow characters, and also presents a
framework for dealing with the huge number of other encodings that
iconv can convert, including Unicode and UTF8. Design issues and
requirements are addressed, and examples of correct usage for both
the required specializations for wide and narrow characters and the
implementation-provided extended functionality are given.
</BLOCKQUOTE>
<HR>
<H2><A NAME="3">class ctype</A></H2>
<P> Notes made during the implementation of ctype can be found
<A HREF="ctype.html">here</A>.
</P>
<HR>
<H2><A NAME="4">class messages</A></H2>
<P> Notes made during the implementation of messages can be found
<A HREF="messages.html">here</A>.
</P>
<HR>
<H2><A NAME="5">Stroustrup on Locales</A></H2>
<P>Dr. Bjarne Stroustrup has released a
<A HREF="http://www.research.att.com/~bs/3rd_loc0.html">pointer</A>
to Appendix D of his book,
@ -50,68 +91,16 @@
avoid it.
</EM></BLOCKQUOTE>
</P>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<HR>
<H2><A NAME="2">Nathan Myers on Locales</A></H2>
<H2><A NAME="6">Nathan Myers on Locales</A></H2>
<P> An article entitled &quot;The Standard C++ Locale&quot; was
published in Dr. Dobb's Journal and can be found
<A HREF="http://www.cantrip.org/locale.html">here</A>.
</P>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<HR>
<H2><A NAME="5">class locale</A></H2>
<P> Notes made during the implementation of locales can be found
<A HREF="locale.html">here</A>.
</P>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<HR>
<H2><A NAME="4">class codecvt</A></H2>
<P> Notes made during the implementation of codecvt can be found
<A HREF="codecvt.html">here</A>.
</P>
<P> The following is the abstract from the implementation notes:
<BLOCKQUOTE>
The standard class codecvt attempts to address conversions
between different character encoding schemes. In particular, the
standard attempts to detail conversions between the
implementation-defined wide characters (hereafter referred to as
wchar_t) and the standard type char that is so beloved in classic
&quot;C&quot; (which can now be referred to as narrow characters.)
This document attempts to describe how the GNU libstdc++-v3
implementation deals with the conversion between wide and narrow
characters, and also presents a framework for dealing with the huge
number of other encodings that iconv can convert, including Unicode
and UTF8. Design issues and requirements are addressed, and examples
of correct usage for both the required specializations for wide and
narrow characters and the implementation-provided extended
functionality are given.
</BLOCKQUOTE>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<HR>
<H2><A NAME="5">class ctype</A></H2>
<P> Notes made during the implementation of ctype can be found
<A HREF="ctype.html">here</A>.
</P>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<HR>
<H2><A NAME="6">Correct Transformations</A></H2>
<H2><A NAME="7">Correct Transformations</A></H2>
<!-- Jumping directly here from chapter 21. -->
<P>A very common question on newsgroups and mailing lists is, &quot;How
do I do &lt;foo&gt; to a character string?&quot; where &lt;foo&gt; is
@ -213,11 +202,6 @@ functionality are given.
shown it here because no compilers currently available to me will
handle it.
</P>
<P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>.
</P>
<!-- ####################################################### -->
@ -226,7 +210,7 @@ functionality are given.
<P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<BR> $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $
<BR> $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $
</EM></P>

View File

@ -5,7 +5,7 @@
</H1>
</HEAD>
<I>
prepared by Benjamin Kosnik (bkoz@redhat.com) on January 24, 2001
prepared by Benjamin Kosnik (bkoz@redhat.com) on August 8, 2001
</I>
<P>
@ -95,6 +95,16 @@ More information can be found in the following testcases:
<LI> locale initialization: at what point does _S_classic,
_S_global get initialized? Can named locales assume this
initialization has already taken place?
<LI> document how named locales error check when filling data
members. Ie, a fr_FR locale that doesn't have
numpunct::truename(): does it use "true"? Or is it a blank
string? What's the convention?
<li> explain how locale aliasing happens. When does "de_DE"
use "de" information? What is the rule for locales composed of
just an ISO language code (say, "de") and locales with both an
ISO language code and ISO country code (say, "de_DE").
</UL>

View File

@ -0,0 +1,404 @@
<HTML>
<HEAD>
<H1>
Notes on the messages implementation.
</H1>
</HEAD>
<I>
prepared by Benjamin Kosnik (bkoz@redhat.com) on August 8, 2001
</I>
<P>
<H2>
1. Abstract
</H2>
<P>
The std::messages facet implements message retrieval functionality
equivalent to Java's java.text.MessageFormat .using either GNU gettext
or IEEE 1003.1-200 functions.
</P>
<P>
<H2>
2. What the standard says
</H2>
The std::messages facet is probably the most vaguely defined facet in
the standard library. It's assumed that this facility was built into
the standard library in order to convert string literals from one
locale to the other. For instance, converting the "C" locale's
<TT>const char* c = "please"</TT> to a German-localized <TT>"bitte"</TT>
during program execution.
<BLOCKQUOTE>
22.2.7.1 - Template class messages [lib.locale.messages]
</BLOCKQUOTE>
This class has three public member functions, which directly
correspond to three protected virtual member functions.
The public member functions are:
<P>
<TT>catalog open(const basic_string<char>&, const locale&) const</TT>
<P>
<TT>string_type get(catalog, int, int, const string_type&) const</TT>
<P>
<TT>void close(catalog) const</TT>
<P>
While the virtual functions are:
<P>
<TT>catalog do_open(const basic_string<char>&, const locale&) const</TT>
<BLOCKQUOTE>
<I>
-1- Returns: A value that may be passed to get() to retrieve a
message, from the message catalog identified by the string name
according to an implementation-defined mapping. The result can be used
until it is passed to close(). Returns a value less than 0 if no such
catalog can be opened.
</I>
</BLOCKQUOTE>
<P>
<TT>string_type do_get(catalog, int, int, const string_type&) const</TT>
<BLOCKQUOTE>
<I>
-3- Requires: A catalog cat obtained from open() and not yet closed.
-4- Returns: A message identified by arguments set, msgid, and dfault,
according to an implementation-defined mapping. If no such message can
be found, returns dfault.
</I>
</BLOCKQUOTE>
<P>
<TT>void do_close(catalog) const</TT>
<BLOCKQUOTE>
<I>
-5- Requires: A catalog cat obtained from open() and not yet closed.
-6- Effects: Releases unspecified resources associated with cat.
-7- Notes: The limit on such resources, if any, is implementation-defined.
</I>
</BLOCKQUOTE>
<P>
<H2>
3. Problems with &quot;C&quot; messages: thread safety,
over-specification, and assumptions.
</H2>
A couple of notes on the standard.
<p>
First, why is <TT>messages_base::catalog</TT> specified as a typedef
to int? This makes sense for implementations that use
<TT>catopen</TT>, but not for others. Fortunately, it's not heavily
used and so only a minor irritant.
<p>
Second, by making the member functions <TT>const</TT>, it is
impossible to save state in them. Thus, storing away information used
in the 'open' member function for use in 'get' is impossible. This is
unfortunate.
<p>
The 'open' member function in particular seems to be oddly
designed. The signature seems quite peculiar. Why specify a <TT>const
string& </TT> argument, for instance, instead of just <TT>const
char*</TT>? Or, why specify a <TT>const locale&</TT> argument that is
to be used in the 'get' member function? How, exactly, is this locale
argument useful? What was the intent? It might make sense if a locale
argument was associated with a given default message string in the
'open' member function, for instance. Quite murky and unclear, on
reflection.
<p>
Lastly, it seems odd that messages, which explicitly require code
conversion, don't use the codecvt facet. Because the messages facet
has only one template parameter, it is assumed that ctype, and not
codecvt, is to be used to convert between character sets.
<p>
It is implicitly assumed that the locale for the default message
string in 'get' is in the "C" locale. Thus, all source code is assumed
to be written in English, so translations are always from "en_US" to
other, explicitly named locales.
<P>
<H2>
4. Design and Implementation Details
</H2>
This is a relatively simple class, on the face of it. The standard
specifies very little in concrete terms, so generic implementations
that are conforming yet do very little are the norm. Adding
functionality that would be useful to programmers and comparable to
Java's java.text.MessageFormat takes a bit of work, and is highly
dependent on the capabilities of the underlying operating system.
<P>
Three different mechanisms have been provided, selectable via
configure flags:
<UL>
<LI> generic
<P>
This model does very little, and is what is used by default.
</P>
<LI> gnu
<P>
The gnu model is complete and fully tested. It's based on the
GNU gettext package, which is part of glibc. It uses the functions
<TT>textdomain, bindtextdomain, gettext</TT>
to implement full functionality. Creating message
catalogs is a relatively straight-forward process and is
lightly documented below, and fully documented in gettext's
distributed documentation.
</P>
<LI> ieee_1003.1-200x
<P>
This is a complete, though untested, implementation based on
the IEEE standard. The functions
<TT>catopen, catgets, catclose</TT>
are used to retrieve locale-specific messages given the
appropriate message catalogs that have been constructed for
their use. Note, the script <TT> po2msg.sed</TT> that is part
of the gettext distribution can convert gettext catalogs into
catalogs that <TT>catopen</TT> can use.
</P>
</UL>
<P>
A new, standards-conformant non-virtual member function signature was
added for 'open' so that a directory could be specified with a given
message catalog. This simplifies calling conventions for the gnu
model.
<P>
The rest of this document discusses details of the GNU model.
<P>
The messages facet, because it is retrieving and converting between
characters sets, depends on the ctype and perhaps the codecvt facet in
a given locale. In addition, underlying "C" library locale support is
necessary for more than just the <TT>LC_MESSAGES</TT> mask:
<TT>LC_CTYPE</TT> is also necessary. To avoid any unpleasantness, all
bits of the "C" mask (ie <TT>LC_ALL</TT>) are set before retrieving
messages.
<p>
Making the message catalogs can be initially tricky, but become quite
simple with practice. For complete info, see the gettext
documentation. Here's an idea of what is required:
<UL>
<LI > Make a source file with the required string literals
that need to be translated. See
<TT>intl/string_literals.cc</TT> for an example.
<p>
<LI> Make initial catalog (see "4 Making the PO Template File"
from the gettext docs).
<p>
<TT> xgettext --c++ --debug string_literals.cc -o libstdc++.pot </TT>
<p>
<LI> Make language and country-specific locale catalogs.
<p>
<TT>cp libstdc++.pot fr_FR.po</TT>
<p>
<TT>cp libstdc++.pot de_DE.po</TT>
<p>
<LI> Edit localized catalogs in emacs so that strings are
translated.
<p>
<TT>emacs fr_FR.po</TT>
<P>
<LI> Make the binary mo files.
<p>
<TT>msgfmt fr_FR.po -o fr_FR.mo</TT>
<p>
<TT>msgfmt de_DE.po -o de_DE.mo</TT>
<P>
<LI> Copy the binary files into the correct directory structure.
<p>
<TT>cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++-v3.mo</TT>
<p>
<TT>cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++-v3.mo</TT>
<P>
<LI> Use the new message catalogs.
<p>
<TT>locale loc_de("de_DE");</TT>
<p>
<TT>
use_facet<messages<char> >(loc_de).open("libstdc++", locale(), dir);
</TT>
</UL>
<P>
<H2>
5. Examples
</H2>
<UL>
<LI> message converting, simple example using the GNU model.
<pre>
#include <locale>
void test01()
{
using namespace std;
typedef std::messages<char>::catalog catalog;
// Set to the root directory of the libstdc++.mo catalogs.
const char* dir = LOCALEDIR;
locale loc_de("de_DE");
// Cache the messages facet.
const messages<char>& mssg_de = use_facet<messages<char> >(loc_de);
// Check German (de_DE) locale.
catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
string s01 = mssg_de.get(cat_de, 0, 0, "please");
string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
// s01 == "bitte"
// s02 == "danke"
mssg_de.close(cat_de);
}
</pre>
</UL>
More information can be found in the following testcases:
<UL>
<LI> testsuite/22_locale/messages.cc
<LI> testsuite/22_locale/messages_byname.cc
<LI> testsuite/22_locale/messages_char_members.cc
</UL>
<P>
<H2>
6. Unresolved Issues
</H2>
<UL>
<LI> Things that are sketchy, or remain unimplemented:
<UL>
<LI>_M_convert_from_char, _M_convert_to_char are in
flux, depending on how the library ends up doing
character set conversions. It might not be possible to
do a real character set based conversion, due to the
fact that the template parameter for messages is not
enough to instantiate the codecvt facet (1 supplied,
need at least 2 but would prefer 3).
<LI> There are issues with gettext needing the global
locale set to extract a message. This dependence on
the global locale makes the current "gnu" model non
MT-safe. Future versions of glibc, ie glibc 2.3.x will
fix this, and the C++ library bits are already in
place.
</UL>
<p>
<LI> Development versions of the GNU "C" library, glibc 2.3 will allow
a more efficient, MT implementation of std::messages, and will
allow the removal of the _M_name_messages data member. If this
is done, it will change the library ABI. The C++ parts to
support glibc 2.3 have already been coded, but are not in use:
once this version of the "C" library is released, the marked
parts of the messages implementation can be switched over to
the new "C" library functionality.
<p>
<LI> At some point in the near future, std::numpunct will probably use
std::messages facilities to implement truename/falename
correctly. This is currently not done, but entries in
libstdc++.pot have already been made for "true" and "false"
string literals, so all that remains is the std::numpunct
coding and the configure/make hassles to make the installed
library search its own catalog. Currently the libstdc++.mo
catalog is only searched for the testsuite cases involving
messages members.
<p>
<LI> The following member functions:
<p>
<TT>
catalog
open(const basic_string<char>& __s, const locale& __loc) const
</TT>
<p>
<TT>
catalog
open(const basic_string<char>&, const locale&, const char*) const;
</TT>
<p>
Don't actually return a "value less than 0 if no such catalog
can be opened" as required by the standard in the "gnu"
model. As of this writing, it is unknown how to query to see
if a specified message catalog exists using the gettext
package.
</UL>
<P>
<H2>
7. Acknowledgments
</H2>
Ulrich Drepper for the character set explanations, gettext details,
and patient answering of late-night questions, Tom Tromey for the java details.
<P>
<H2>
8. Bibliography / Referenced Documents
</H2>
Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters
&quot;7 Locales and Internationalization&quot;
<P>
Drepper, Ulrich, Thread-Aware Locale Model, A proposal. This is a
draft document describing the design of glibc 2.3 MT locale
functionality.
<P>
Drepper, Ulrich, Numerous, late-night email correspondence
<P>
ISO/IEC 9899:1999 Programming languages - C
<P>
ISO/IEC 14882:1998 Programming languages - C++
<P>
Java 2 Platform, Standard Edition, v 1.3.1 API Specification. In
particular, java.util.Properties, java.text.MessageFormat,
java.util.Locale, java.util.ResourceBundle.
http://java.sun.com/j2se/1.3/docs/api
<P>
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-200x)
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.
In particular see lines 5268-5427.
http://www.opennc.org/austin/docreg.html
<P> GNU gettext tools, version 0.10.38, Native Language Support
Library and Tools.
http://sources.redhat.com/gettext
<P>
Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales,
Advanced Programmer's Guide and Reference, Addison Wesley Longman,
Inc. 2000. See page 725, Internationalized Messages.
<P>
Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000

View File

@ -7,7 +7,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 configure options</TITLE>
<LINK REL=StyleSheet HREF="lib3styles.css">
<!-- $Id: configopts.html,v 1.11 2001/07/09 19:37:01 pme Exp $ -->
<!-- $Id: configopts.html,v 1.12 2001/07/09 21:47:35 pme Exp $ -->
</HEAD>
<BODY>
@ -46,13 +46,15 @@ options</A></H1>
</P>
<DT><TT>--enable-debug </TT>
<DD><P>The configure script will automatically detect the highest level
of optimization that the compiler in use can use (certain
versions of g++ will ICE if given the <TT>-O2</TT> option, but
this is fixed in later versions of the compiler). This --enable
flag will disable all optimizations and instruct the compiler to
emit as much extra debugging information as it can, for use
inside GDB.
<DD><P>The configure script will automatically detect the highest
level of optimization that the compiler in use can use
(certain versions of g++ will ICE if given the <TT>-O2</TT>
option, but this is fixed in later versions of the compiler).
This --enable flag will disable all optimizations and instruct
the compiler to emit as much extra debugging information as it
can, for use inside GDB. Note this make command, executed in
the build directory, will do much the same thing, without the
configuration difference:<TT>make CXXFLAGS='-g -O0' all</TT>
</P>
<DT><TT>--enable-cstdio </TT>
@ -83,25 +85,29 @@ options</A></H1>
</P>
<DT><TT>--enable-clocale=MODEL </TT>
<DD><P>Select a target-specific underlying locale package. The choices
are 'gnu' to specify an X/Open (IEEE Std. 1003.1-200x) model based
on langinfo/iconv (from
<A HREF="http://sources.redhat.com/glibc/">glibc</A>, the GNU C
library), or 'generic' to use a generic &quot;C&quot; abstraction
which consists of &quot;C&quot; locale info. The default is 'generic'.
<DD><P>Select a target-specific underlying locale package. The
choices are 'ieee_1003.1' to specify an X/Open, Standard Unix
(IEEE Std. 1003.1-200x) model based on langinfo/iconv/catgets,
'gnu' to specify a model based on functionality from the GNU C
library (langinfo/iconv/gettext) (from <A
HREF="http://sources.redhat.com/glibc/">glibc</A>, the GNU C
library), or 'generic' to use a generic &quot;C&quot;
abstraction which consists of &quot;C&quot; locale info. The
default is 'generic'.
</P>
<DT><TT>--enable-c99 </TT>
<DD><P>The &quot;long long&quot; type was introduced in C99, along
with bunches of other functions for wide characters, and math
with many other functions for wide characters, and math
classification macros, etc. If enabled, all C99 functions not
specified by the C++ standard will be put into <TT>namespace
c99</TT>, and then all names in the c99 namespace will be injected
into namespace std, so that C99 functions can be used &quot;as
if&quot; they were in the C++ standard (as they will eventually
be in some future revision of the standard, without a doubt).
By default, C99 support is on, assuming the configure probes find
all the necessary functions and bits necessary.
__gnu_cxx</TT>, and then all these names will
be injected into namespace std, so that C99 functions can be
used &quot;as if&quot; they were in the C++ standard (as they
will eventually be in some future revision of the standard,
without a doubt). By default, C99 support is on, assuming the
configure probes find all the necessary functions and bits
necessary.
</P>
<DT><TT>--enable-long-long </TT>
@ -197,8 +203,7 @@ options</A></H1>
changing rapidly, and can cause problems on new platforms.
Disabling wide character specializations is useful for initial
porting steps, but builds only a subset of what is required by
ISO. Default is on, but the <TT>--enable-cstdio=stdio </TT>
option currently turns it off.
ISO. By default, this option is on.
</P>
</DL>
</P>
@ -211,7 +216,7 @@ options</A></H1>
<HR>
<P CLASS="fineprint"><EM>
$Id: configopts.html,v 1.11 2001/07/09 19:37:01 pme Exp $
$Id: configopts.html,v 1.12 2001/07/09 21:47:35 pme Exp $
</EM></P>

View File

@ -21,7 +21,7 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
## $Id$
## $Id: Makefile.am,v 1.1 2001/07/13 16:47:55 pme Exp $
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@ -294,9 +294,10 @@ thread_headers = \
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
# XXX stamp-c_compatibility
# XXX stamp-c_compatibility not implemented yet.
allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
stamp-target stamp-thread stamp-file_model stamp-io stamp-locale
stamp-target stamp-thread stamp-file_model stamp-io \
stamp-locale stamp-messages_model stamp-codecvt_model
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = ${allstamps}
@ -370,6 +371,14 @@ stamp-locale: ${glibcpp_srcdir}/@CLOCALE_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h) ;\
echo `date` > stamp-locale
stamp-messages_model: ${glibcpp_srcdir}/@CMESSAGES_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h) ;\
echo `date` > stamp-messages_model
stamp-codecvt_model: ${glibcpp_srcdir}/@CCODECVT_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h) ;\
echo `date` > stamp-codecvt_model
# This target is kinda special. The timestamp on a directory gets modified
# whenever a file it contains gets modified, and that'll throw off all the
# build dependencies that need this target. On the other hand, someone
@ -426,7 +435,7 @@ ${thread_builddir}/gthr-default.h:
gxx_include_dir = @gxx_include_dir@
install-data-local:
for file in `find . ! -name stamp-\* -print`; do \
for file in `find . ! -name stamp-\* ! -name Makefile -print`; do \
installFile=${gxx_include_dir}/$${file} ;\
if [ -d $${file} ]; then \
$(INSTALL) -d $${installFile} ;\

View File

@ -67,55 +67,78 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -166,8 +189,8 @@ thread_headers = ${thread_builddir}/gthr.h ${thread_builddir}/gthr-single.h
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
# XXX stamp-c_compatibility
allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext stamp-target stamp-thread stamp-file_model stamp-io stamp-locale
# XXX stamp-c_compatibility not implemented yet.
allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext stamp-target stamp-thread stamp-file_model stamp-io stamp-locale stamp-messages_model stamp-codecvt_model
# By adding these files here, automake will remove them for 'make clean'
@ -179,7 +202,7 @@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
# One big happy istallation: just copy everything from the build to the
# install tree (except for the build stamps).
gxx_include_dir = @gxx_include_dir@
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
@ -351,6 +374,14 @@ stamp-locale: ${glibcpp_srcdir}/@CLOCALE_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h) ;\
echo `date` > stamp-locale
stamp-messages_model: ${glibcpp_srcdir}/@CMESSAGES_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h) ;\
echo `date` > stamp-messages_model
stamp-codecvt_model: ${glibcpp_srcdir}/@CCODECVT_H@ ${target_builddir}
@(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h) ;\
echo `date` > stamp-codecvt_model
# This target is kinda special. The timestamp on a directory gets modified
# whenever a file it contains gets modified, and that'll throw off all the
# build dependencies that need this target. On the other hand, someone
@ -400,7 +431,7 @@ ${thread_builddir}/gthr-default.h:
< ${glibcpp_srcdir}/../gcc/${glibcpp_thread_h} > $@
install-data-local:
for file in `find . ! -name stamp-\* -print`; do \
for file in `find . ! -name stamp-\* ! -name Makefile -print`; do \
installFile=${gxx_include_dir}/$${file} ;\
if [ -d $${file} ]; then \
$(INSTALL) -d $${installFile} ;\

View File

@ -40,135 +40,6 @@
#pragma GCC system_header
// XXX
// __enc_traits may need to move up the locale header hierarchy,
// depending on if ctype ends up using it.
#ifdef _GLIBCPP_USE_WCHAR_T
// Extensions to use icov for dealing with character encodings,
// including conversions and comparisons between various character
// sets. This object encapsulates data that may need to be shared between
// char_traits, codecvt and ctype.
#if _GLIBCPP_USE_SHADOW_HEADERS
using _C_legacy::CODESET;
#endif
class __enc_traits
{
public:
// Types:
// NB: A conversion descriptor subsumes and enhances the
// functionality of a simple state type such as mbstate_t.
typedef iconv_t __desc_type;
protected:
// Data Members:
// Max size of charset encoding name
static const int _S_max_size = 32;
// Name of internal character set encoding.
char _M_int_enc[_S_max_size];
// Name of external character set encoding.
char _M_ext_enc[_S_max_size];
// Conversion descriptor between external encoding to internal encoding.
__desc_type _M_in_desc;
// Conversion descriptor between internal encoding to external encoding.
__desc_type _M_out_desc;
// Details the byte-order marker for the external encoding, if necessary.
int _M_ext_bom;
// Details the byte-order marker for the internal encoding, if necessary.
int _M_int_bom;
public:
__enc_traits()
: _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
{
// __intc_end = whatever we are using internally, which is
// UCS4 (linux)
// UCS2 == UNICODE (microsoft, java, aix, whatever...)
// XXX Currently don't know how to get this data from target system...
strcpy(_M_int_enc, "UCS4");
// __extc_end = external codeset in current locale
strcpy(_M_ext_enc, nl_langinfo(CODESET));
}
__enc_traits(const char* __int, const char* __ext, int __ibom = 0,
int __ebom = 0)
: _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
{
strncpy(_M_int_enc, __int, _S_max_size);
strncpy(_M_ext_enc, __ext, _S_max_size);
}
// 21.1.2 traits typedefs
// p4
// typedef STATE_T state_type
// requires: state_type shall meet the requirements of
// CopyConstructible types (20.1.3)
__enc_traits(const __enc_traits& __obj)
{
strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
}
~__enc_traits()
{
iconv_close(_M_in_desc);
iconv_close(_M_out_desc);
}
// Initializes
void
_M_init()
{
_M_in_desc = iconv_open(_M_int_enc, _M_ext_enc);
_M_out_desc = iconv_open(_M_ext_enc, _M_int_enc);
if (_M_out_desc == iconv_t(-1) || _M_in_desc == iconv_t(-1))
{
// XXX Extended error checking.
}
}
bool
_M_good()
{
return _M_out_desc && _M_in_desc
&& _M_out_desc != iconv_t(-1) && _M_in_desc != iconv_t(-1);
}
const __desc_type*
_M_get_in_descriptor()
{ return &_M_in_desc; }
const __desc_type*
_M_get_out_descriptor()
{ return &_M_out_desc; }
const char*
_M_get_internal_enc()
{ return _M_int_enc; }
const char*
_M_get_external_enc()
{ return _M_ext_enc; }
int
_M_get_external_bom()
{ return _M_ext_bom; }
int
_M_get_internal_bom()
{ return _M_int_bom; }
};
#endif //_GLIBCPP_USE_WCHAR_T
// 22.2.1.5 Template class codecvt
class codecvt_base
{
@ -305,291 +176,6 @@
template<typename _InternT, typename _ExternT, typename _StateT>
locale::id codecvt<_InternT, _ExternT, _StateT>::id;
#ifdef _GLIBCPP_USE_WCHAR_T
// partial specialization
// This specialization takes advantage of iconv to provide code
// conversions between a large number of character encodings.
template<typename _InternT, typename _ExternT>
class codecvt<_InternT, _ExternT, __enc_traits>
: public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits>
{
public:
// Types:
typedef codecvt_base::result result;
typedef _InternT intern_type;
typedef _ExternT extern_type;
typedef __enc_traits state_type;
typedef __enc_traits::__desc_type __desc_type;
typedef __enc_traits __enc_type;
// Data Members:
static locale::id id;
explicit
codecvt(size_t __refs = 0)
: __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
{ }
explicit
codecvt(__enc_type* __enc, size_t __refs = 0)
: __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
{ }
protected:
virtual
~codecvt() { }
virtual result
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const;
virtual result
do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const;
virtual result
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const;
virtual int
do_encoding() const throw();
virtual bool
do_always_noconv() const throw();
virtual int
do_length(const state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
virtual int
do_max_length() const throw();
};
template<typename _InternT, typename _ExternT>
locale::id
codecvt<_InternT, _ExternT, __enc_traits>::id;
// This adaptor works around the signature problems of the second
// argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
// uses 'char**', which is what the standard is (apparently) due to use
// in the future. Using this adaptor, g++ will do the work for us.
template<typename _T>
inline size_t
__iconv_adaptor(size_t(*iconv_func)(iconv_t, _T, size_t*, char**, size_t*),
iconv_t cd, char** inbuf, size_t* inbytesleft,
char** outbuf, size_t* outbytesleft)
{
return iconv_func(cd, (_T)inbuf, inbytesleft, outbuf, outbytesleft);
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_out_descriptor();
const size_t __fmultiple = sizeof(intern_type) / sizeof(char);
size_t __flen = __fmultiple * (__from_end - __from);
const size_t __tmultiple = sizeof(extern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
char* __cfrom;
size_t __conv;
// Some encodings need a byte order marker as the first item
// in the byte stream, to designate endian-ness. The default
// value for the byte order marker is NULL, so if this is
// the case, it's not necessary and we can just go on our
// merry way.
int __int_bom = __state._M_get_internal_bom();
if (__int_bom)
{
size_t __size = __from_end - __from;
intern_type* __cfixed = static_cast<intern_type*>(__builtin_alloca(sizeof(intern_type) * (__size + 1)));
__cfixed[0] = static_cast<intern_type>(__int_bom);
char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
else
{
intern_type* __cfixed = const_cast<intern_type*>(__from);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
if (__conv != size_t(-1))
{
__from_next = reinterpret_cast<const intern_type*>(__cfrom);
__to_next = reinterpret_cast<extern_type*>(__cto);
__ret = ok;
}
else
{
if (__flen < static_cast<size_t>(__from_end - __from))
{
__from_next = reinterpret_cast<const intern_type*>(__cfrom);
__to_next = reinterpret_cast<extern_type*>(__cto);
__ret = partial;
}
else
__ret = error;
}
}
return __ret;
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_in_descriptor();
const size_t __tmultiple = sizeof(intern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL,
&__cto, &__tlen);
if (__conv != size_t(-1))
{
__to_next = reinterpret_cast<extern_type*>(__cto);
if (__tlen == __tmultiple * (__to_end - __to))
__ret = noconv;
else if (__tlen == 0)
__ret = ok;
else
__ret = partial;
}
else
__ret = error;
}
return __ret;
}
template<typename _InternT, typename _ExternT>
codecvt_base::result
codecvt<_InternT, _ExternT, __enc_traits>::
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
result __ret = error;
if (__state._M_good())
{
typedef state_type::__desc_type __desc_type;
const __desc_type* __desc = __state._M_get_in_descriptor();
const size_t __fmultiple = sizeof(extern_type) / sizeof(char);
size_t __flen = __fmultiple * (__from_end - __from);
const size_t __tmultiple = sizeof(intern_type) / sizeof(char);
size_t __tlen = __tmultiple * (__to_end - __to);
// Argument list for iconv specifies a byte sequence. Thus,
// all to/from arrays must be brutally casted to char*.
char* __cto = reinterpret_cast<char*>(__to);
char* __cfrom;
size_t __conv;
// Some encodings need a byte order marker as the first item
// in the byte stream, to designate endian-ness. The default
// value for the byte order marker is NULL, so if this is
// the case, it's not necessary and we can just go on our
// merry way.
int __ext_bom = __state._M_get_external_bom();
if (__ext_bom)
{
size_t __size = __from_end - __from;
extern_type* __cfixed = static_cast<extern_type*>(__builtin_alloca(sizeof(extern_type) * (__size + 1)));
__cfixed[0] = static_cast<extern_type>(__ext_bom);
char_traits<extern_type>::copy(__cfixed + 1, __from, __size);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
else
{
extern_type* __cfixed = const_cast<extern_type*>(__from);
__cfrom = reinterpret_cast<char*>(__cfixed);
__conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
&__flen, &__cto, &__tlen);
}
if (__conv != size_t(-1))
{
__from_next = reinterpret_cast<const extern_type*>(__cfrom);
__to_next = reinterpret_cast<intern_type*>(__cto);
__ret = ok;
}
else
{
if (__flen < static_cast<size_t>(__from_end - __from))
{
__from_next = reinterpret_cast<const extern_type*>(__cfrom);
__to_next = reinterpret_cast<intern_type*>(__cto);
__ret = partial;
}
else
__ret = error;
}
}
return __ret;
}
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_encoding() const throw()
{ return 0; }
template<typename _InternT, typename _ExternT>
bool
codecvt<_InternT, _ExternT, __enc_traits>::
do_always_noconv() const throw()
{ return false; }
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_length(const state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const
{ return min(__max, static_cast<size_t>(__end - __from)); }
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 74. Garbled text for codecvt::do_max_length
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_max_length() const throw()
{ return 1; }
#endif
#endif /* _GLIBCPP_USE_WCHAR_T */
// codecvt<char, char, mbstate_t> required specialization
template<>
class codecvt<char, char, mbstate_t>
@ -709,9 +295,14 @@
~codecvt_byname() { }
};
// Include host and configuration specific partial specializations
// with additional functionality, if possible.
#ifdef _GLIBCPP_USE_WCHAR_T
#include <bits/codecvt_specializations.h>
#endif
#endif // _CPP_BITS_CODECVT_H
// Local Variables:
// mode:c++
// End:

View File

@ -41,15 +41,13 @@
#include <bits/std_ctime.h> // For struct tm
#include <bits/std_ios.h> // For ios_base
#ifdef _GLIBCPP_USE_WCHAR_T
# include <langinfo.h> // For codecvt
# include <bits/std_cwctype.h> // For wctype_t
# include <iconv.h> // For codecvt using iconv, iconv_t
#endif
namespace std
{
// 22.2.1.1 Template class ctype
// Include host-specific ctype enums for ctype_base.
// Include host and configuration specific ctype enums for ctype_base.
#include <bits/ctype_base.h>
// __ctype_abstract_base is the common base for ctype<_CharT>.
@ -388,7 +386,7 @@ namespace std
use_facet<ctype<wchar_t> >(const locale& __loc);
#endif //_GLIBCPP_USE_WCHAR_T
// Include host-specific ctype inlines.
// Include host and configuration specific ctype inlines.
#include <bits/ctype_inline.h>
// 22.2.1.2 Template class ctype_byname
@ -820,6 +818,7 @@ namespace std
template <typename _CharT, typename _OutIter>
locale::id num_put<_CharT, _OutIter>::id;
template<typename _CharT>
class numpunct : public locale::facet
{
@ -848,23 +847,23 @@ namespace std
char_type
decimal_point() const
{ return do_decimal_point(); }
{ return this->do_decimal_point(); }
char_type
thousands_sep() const
{ return do_thousands_sep(); }
{ return this->do_thousands_sep(); }
string
grouping() const
{ return do_grouping(); }
{ return this->do_grouping(); }
string_type
truename() const
{ return do_truename(); }
{ return this->do_truename(); }
string_type
falsename() const
{ return do_falsename(); }
{ return this->do_falsename(); }
protected:
virtual
@ -918,7 +917,9 @@ namespace std
template<typename _CharT>
class numpunct_byname : public numpunct<_CharT>
{
// Data Member.
__c_locale _M_c_locale_numpunct;
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
@ -1462,68 +1463,147 @@ namespace std
class messages : public locale::facet, public messages_base
{
public:
// Types:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
protected:
// 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
const char* _M_name_messages;
#endif
public:
static locale::id id;
explicit
messages(size_t __refs = 0) : locale::facet(__refs) { }
messages(size_t __refs = 0)
: locale::facet(__refs), _M_c_locale_messages(NULL),
_M_name_messages("C")
{ }
explicit
messages(__c_locale __cloc, const char* __name, size_t __refs = 0)
: locale::facet(__refs)
{
_M_name_messages = __name;
if (__cloc)
_M_c_locale_messages = _S_clone_c_locale(__cloc);
}
catalog
open(const basic_string<char>& __s, const locale& __loc) const
{ return do_open(__s, __loc); }
{ return this->do_open(__s, __loc); }
// Non-standard and unorthodox, yet effective.
catalog
open(const basic_string<char>&, const locale&, const char*) const;
string_type
get(catalog __c, int __set, int __msgid, const string_type& __s) const
{ return do_get(__c,__set,__msgid,__s); }
{ return this->do_get(__c, __set, __msgid, __s); }
void
close(catalog __c) const
{ return do_close(__c); }
{ return this->do_close(__c); }
protected:
virtual
~messages() { }
~messages();
// NB: Probably these should be pure, and implemented only in
// specializations of messages<>. But for now...
virtual catalog
do_open(const basic_string<char>&, const locale&) const
{ return 0; }
do_open(const basic_string<char>&, const locale&) const;
virtual string_type
do_get(catalog, int, int /*__msgid*/, const string_type& __dfault) const
{ return __dfault; }
do_get(catalog, int, int, const string_type& __dfault) const;
virtual void
do_close(catalog) const { }
};
do_close(catalog) const;
// Returns a locale and codeset-converted string, given a char* message.
char*
_M_convert_to_char(const string_type& __msg) const
{
// XXX
return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
}
// Returns a locale and codeset-converted string, given a char* message.
string_type
_M_convert_from_char(char* __msg) const
{
// Length of message string without terminating null.
size_t __len = char_traits<char>::length(__msg) - 1;
// "everybody can easily convert the string using
// mbsrtowcs/wcsrtombs or with iconv()"
#if 0
// Convert char* to _CharT in locale used to open catalog.
// XXX need additional template parameter on messages class for this..
// typedef typename codecvt<char, _CharT, _StateT> __codecvt_type;
typedef typename codecvt<char, _CharT, mbstate_t> __codecvt_type;
__codecvt_type::state_type __state;
// XXX may need to initialize state.
//initialize_state(__state._M_init());
char* __from_next;
// XXX what size for this string?
_CharT* __to = static_cast<_CharT*>(__builtin_alloca(__len + 1));
const __codecvt_type& __cvt = use_facet<__codecvt_type>(_M_locale_conv);
__cvt.out(__state, __msg, __msg + __len, __from_next,
__to, __to + __len + 1, __to_next);
return string_type(__to);
#endif
#if 0
typedef ctype<_CharT> __ctype_type;
// const __ctype_type& __cvt = use_facet<__ctype_type>(_M_locale_msg);
const __ctype_type& __cvt = use_facet<__ctype_type>(locale());
// XXX Again, proper length of converted string an issue here.
// For now, assume the converted length is not larger.
_CharT* __dest = static_cast<_CharT*>(__builtin_alloca(__len + 1));
__cvt.widen(__msg, __msg + __len, __dest);
return basic_string<_CharT>(__dest);
#endif
return string_type();
}
};
template<typename _CharT>
locale::id messages<_CharT>::id;
// Specializations for required instantiations.
template<>
string
messages<char>::do_get(catalog, int, int, const string&) const;
// Include host and configuration specific messages virtual functions.
#include <bits/messages_members.h>
template<typename _CharT>
class messages_byname : public messages<_CharT>
{
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
explicit
messages_byname(const char*, size_t __refs = 0);
messages_byname(const char* __s, size_t __refs = 0)
: messages<_CharT>(__refs)
{
_S_create_c_locale(_M_c_locale_messages, __s);
_M_name_messages = __s;
}
protected:
virtual
~messages_byname() { }
~messages_byname()
{ }
};
template<>
messages_byname<char>::messages_byname(const char*, size_t __refs);
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
messages_byname<wchar_t>::messages_byname(const char*, size_t __refs);
#endif
// Subclause convenience interfaces, inlines
// NB: these are inline

View File

@ -37,7 +37,7 @@
#pragma GCC system_header
#include <bits/c++config.h>
#include <bits/c++locale.h> // Defines __c_locale.
#include <bits/c++locale.h> // Defines __c_locale, config-specific includes
#include <bits/std_climits.h> // For CHAR_BIT
#include <bits/std_string.h> // For string
#include <bits/std_cctype.h> // For isspace, etc.
@ -124,6 +124,7 @@ namespace std
// NB: Specialized for char and wchar_t in locale_facets.h.
class codecvt_base;
class __enc_traits;
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt;
template<> class codecvt<char, char, mbstate_t>;
@ -310,7 +311,6 @@ namespace std
size_t _M_references;
__vec_facet* _M_facets;
string _M_names[_S_num_categories];
__c_locale _M_c_locale;
static const locale::id* const _S_id_ctype[];
static const locale::id* const _S_id_numeric[];
static const locale::id* const _S_id_collate[];
@ -379,6 +379,7 @@ namespace std
{
friend class locale;
friend class locale::_Impl;
friend class __enc_traits;
protected:
explicit
@ -390,6 +391,9 @@ namespace std
static void
_S_create_c_locale(__c_locale& __cloc, const char* __s);
static __c_locale
_S_clone_c_locale(__c_locale& __cloc);
static void
_S_destroy_c_locale(__c_locale& __cloc);

View File

@ -0,0 +1,34 @@
## Makefile for the intl subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 2001 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
## 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
## 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 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 General Public License for more details.
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
PACKAGE = @PACKAGE@
DISTFILES = \
string_literals.cc
# Dummy rule.
all-local:

View File

@ -0,0 +1,258 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
PACKAGE = @PACKAGE@
DISTFILES = string_literals.cc
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus intl/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = intl
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am:
check: check-am
installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile all-local
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-info-am install-info \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-local all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Dummy rule.
all-local:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,29 @@
// Copyright (C) 2001 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
#include <libintl.h>
#define gettext_noop(Str) Str
// For messages testsuite files.
const char* msgstr1 = gettext_noop("please");
const char* msgstr2 = gettext_noop("thank you");
// For numpunct implementation.
const char* msgstr3 = gettext_noop("true");
const char* msgstr4 = gettext_noop("false");

View File

@ -67,50 +67,72 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -118,6 +140,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -147,12 +170,12 @@ EXTRA_DIST = iostreamP.h
libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS)
AM_CFLAGS = -D_GNU_SOURCE @DEBUG_FLAGS@
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I.. -I../testsuite
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

View File

@ -67,52 +67,74 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -120,6 +142,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -147,12 +170,12 @@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = $(TOPLEVEL_INCLUDES)
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I.. -I../testsuite
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
@ -276,7 +299,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \

View File

@ -67,49 +67,71 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -117,6 +139,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -212,12 +235,12 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=c
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared --mode=link $(CXX) @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I.. -I../testsuite
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

View File

@ -0,0 +1,69 @@
## Makefile for the po subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 2001 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
## 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
## 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 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 General Public License for more details.
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
PACKAGE = @PACKAGE@
# Necessary files.
DISTFILES = \
Makefile.am Makefile.in POTFILES.in $(PACKAGE).pot \
$(LOCALE_IN)
# Location of installation directories.
locale_installdir = $(DESTDIR)$(datadir)/locale
locale_builddir = @glibcpp_localedir@
# Tell automake that foo.po makes foo.mo
SUFFIXES = .po .mo
LOCALE_IN = @POFILES@
LOCALE_OUT = @glibcpp_MOFILES@
.po.mo:
cat=`basename $<`; \
lang=`echo $$cat | sed 's/\.po$$//'`; \
dir=$(locale_builddir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $$dir; \
$(MSGFMT) $< -o $$dir/$(PACKAGE).mo
all-local: all-local-@USE_NLS@
all-local-no:
all-local-yes: $(LOCALE_OUT)
# Install rules here.
# Wish install could just `cp -R ./share $(locale_installdir)` ...
install-data-local: install-data-local-@USE_NLS@
install-data-local-no:
install-data-local-yes: all-local-yes
$(mkinstalldirs) $(locale_installdir)
@catalogs='$(LOCALE_OUT)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.mo$$//'`; \
install_dir=$(locale_installdir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $$install_dir; \
build_cat=$(locale_builddir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
$(INSTALL_DATA) $$build_cat $$install_dir/$(PACKAGE).mo; \
done
# Specify what gets cleaned up on a 'make clean'
CLEANFILES = $(LOCALE_OUT)

304
libstdc++-v3/po/Makefile.in Normal file
View File

@ -0,0 +1,304 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
PACKAGE = @PACKAGE@
# Necessary files.
DISTFILES = Makefile.am Makefile.in POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
# Location of installation directories.
locale_installdir = $(DESTDIR)$(datadir)/locale
locale_builddir = @glibcpp_localedir@
# Tell automake that foo.po makes foo.mo
SUFFIXES = .po .mo
LOCALE_IN = @POFILES@
LOCALE_OUT = @glibcpp_MOFILES@
# Specify what gets cleaned up on a 'make clean'
CLEANFILES = $(LOCALE_OUT)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
.SUFFIXES: .mo .po
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus po/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = po
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am:
check: check-am
installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-data-local
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile all-local
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-info-am install-info \
install-exec-am install-exec install-data-local install-data-am \
install-data install-am install uninstall-am uninstall all-local \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.po.mo:
cat=`basename $<`; \
lang=`echo $$cat | sed 's/\.po$$//'`; \
dir=$(locale_builddir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $$dir; \
$(MSGFMT) $< -o $$dir/$(PACKAGE).mo
all-local: all-local-@USE_NLS@
all-local-no:
all-local-yes: $(LOCALE_OUT)
# Install rules here.
# Wish install could just `cp -R ./share $(locale_installdir)` ...
install-data-local: install-data-local-@USE_NLS@
install-data-local-no:
install-data-local-yes: all-local-yes
$(mkinstalldirs) $(locale_installdir)
@catalogs='$(LOCALE_OUT)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.mo$$//'`; \
install_dir=$(locale_installdir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $$install_dir; \
build_cat=$(locale_builddir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
$(INSTALL_DATA) $$build_cat $$install_dir/$(PACKAGE).mo; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,25 @@
## Make/configure bits for translation of the GNU C++ Standard library.
##
## Copyright (C) 2001 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
## 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
## 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 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 General Public License for more details.
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
# include/backward/backward_warning.h
intl/string_literals.cc

31
libstdc++-v3/po/de.po Normal file
View File

@ -0,0 +1,31 @@
# Translations needed for GNU C++ library locale implementation.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Benjamin Kosnik <bkoz@redhat.com>, 2001.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: libstdc++ 3.1.0\n"
"POT-Creation-Date: 2001-07-31 08:49-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#: string_literals.cc:23
msgid "please"
msgstr "bitte"
#: string_literals.cc:24
msgid "thank you"
msgstr "danke"
#: string_literals.cc:27
msgid "true"
msgstr "zutreffend"
#: string_literals.cc:28
msgid "false"
msgstr "falsch"

31
libstdc++-v3/po/fr.po Normal file
View File

@ -0,0 +1,31 @@
# Translations needed for GNU C++ library locale implementation.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Benjamin Kosnik <bkoz@redhat.com>, 2001.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: libstdc++ 3.1.0\n"
"POT-Creation-Date: 2001-07-31 08:49-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#: string_literals.cc:23
msgid "please"
msgstr "s'il vous plaît"
#: string_literals.cc:24
msgid "thank you"
msgstr "merci"
#: string_literals.cc:27
msgid "true"
msgstr "vrai"
#: string_literals.cc:28
msgid "false"
msgstr "faux"

View File

@ -0,0 +1,31 @@
# Translations needed for GNU C++ library locale implementation.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Benjamin Kosnik <bkoz@redhat.com>, 2001.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: libstdc++ 3.1.0\n"
"POT-Creation-Date: 2001-07-31 08:49-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#: string_literals.cc:23
msgid "please"
msgstr ""
#: string_literals.cc:24
msgid "thank you"
msgstr ""
#: string_literals.cc:27
msgid "true"
msgstr ""
#: string_literals.cc:28
msgid "false"
msgstr ""

View File

@ -21,7 +21,7 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
## $Id: Makefile.am,v 1.89 2001/06/26 21:22:57 bkoz Exp $
## $Id: Makefile.am,v 1.90 2001/07/13 16:47:55 pme Exp $
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@ -64,10 +64,9 @@ INCLUDES = \
sources = \
basic_file.cc bitset.cc c++locale.cc cmath.cc codecvt.cc \
complex_io.cc functexcept.cc globals.cc ios.cc limitsMEMBERS.cc \
locale.cc locale-inst.cc localename.cc misc-inst.cc stdexcept.cc \
stl-inst.cc string-inst.cc strstream.cc valarray-inst.cc \
wstring-inst.cc
locale.cc locale-inst.cc localename.cc messages_members.cc \
misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc \
valarray-inst.cc wstring-inst.cc
VPATH = $(top_srcdir):$(top_srcdir)/src

View File

@ -66,46 +66,68 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBMATHOBJS = @LIBMATHOBJS@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -113,6 +135,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -151,7 +174,7 @@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = -nostdinc++ $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) $(TOPLEVEL_INCLUDES)
sources = basic_file.cc bitset.cc c++locale.cc cmath.cc codecvt.cc complex_io.cc functexcept.cc globals.cc ios.cc limitsMEMBERS.cc locale.cc locale-inst.cc localename.cc misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc valarray-inst.cc wstring-inst.cc
sources = basic_file.cc bitset.cc c++locale.cc cmath.cc codecvt.cc complex_io.cc functexcept.cc globals.cc ios.cc limitsMEMBERS.cc locale.cc locale-inst.cc localename.cc messages_members.cc misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc valarray-inst.cc wstring-inst.cc
VPATH = $(top_srcdir):$(top_srcdir)/src
@ -210,20 +233,20 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) $(
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h ../testsuite/testsuite_hooks.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I.. -I../testsuite
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libstdc___la_OBJECTS = basic_file.lo bitset.lo c++locale.lo cmath.lo \
codecvt.lo complex_io.lo functexcept.lo globals.lo ios.lo \
limitsMEMBERS.lo locale.lo locale-inst.lo localename.lo misc-inst.lo \
stdexcept.lo stl-inst.lo string-inst.lo strstream.lo valarray-inst.lo \
wstring-inst.lo
limitsMEMBERS.lo locale.lo locale-inst.lo localename.lo \
messages_members.lo misc-inst.lo stdexcept.lo stl-inst.lo \
string-inst.lo strstream.lo valarray-inst.lo wstring-inst.lo
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)

View File

@ -29,12 +29,12 @@
#include <bits/std_locale.h>
namespace std {
#ifdef _GLIBCPP_USE_WCHAR_T
namespace std
{
#ifdef _GLIBCPP_USE___ENC_TRAITS
// Definitions for static const data members of __enc_traits.
const int __enc_traits::_S_max_size;
#endif /* _GLIBCPP_USE_WCHAR_T */
#endif
codecvt<char, char, mbstate_t>::
codecvt(size_t __refs)
@ -199,7 +199,6 @@ namespace std {
do_max_length() const throw()
{ return 1; }
#endif // _GLIBCPP_USE_WCHAR_T
} // namespace std

View File

@ -1058,11 +1058,6 @@ namespace std
size_t __refs)
: moneypunct<char, true>(__refs) { }
template<>
messages_byname<char>::
messages_byname(const char* /*__s*/, size_t __refs)
: messages<char>(__refs) { }
#ifdef _GLIBCPP_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
@ -1255,11 +1250,5 @@ namespace std
collate_byname<wchar_t>::
collate_byname(const char* /*__s*/, size_t __refs)
: collate<wchar_t> (__refs) { }
template<>
messages_byname<wchar_t>::
messages_byname(const char* /*__s*/, size_t __refs)
: messages<wchar_t> (__refs) { }
#endif // _GLIBCPP_USE_WCHAR_T
} // namespace std

View File

@ -41,13 +41,12 @@ namespace std
if (*it)
(*it)->_M_remove_reference();
delete _M_facets;
locale::facet::_S_destroy_c_locale(_M_c_locale);
}
// Clone existing _Impl object.
locale::_Impl::
_Impl(const _Impl& __imp, size_t __refs)
: _M_references(__refs), _M_facets(0), _M_c_locale(0) // XXX
: _M_references(__refs), _M_facets(0) // XXX
{
try
{ _M_facets = new __vec_facet(*(__imp._M_facets)); }
@ -73,10 +72,9 @@ namespace std
{
// Initialize the underlying locale model, which also checks to
// see if the given name is valid.
__c_locale __cloc = NULL;
if (__str != "C" && __str != "POSIX")
locale::facet::_S_create_c_locale(_M_c_locale, __str.c_str());
else
_M_c_locale = NULL;
locale::facet::_S_create_c_locale(__cloc, __str.c_str());
// Allocate facet container.
try
@ -92,36 +90,37 @@ namespace std
_M_names[i] = __str;
// Construct all standard facets and add them to _M_facets.
// XXX Eventually, all should use __c_locale ctor like numpunct
// XXX Eventually, all should use __clocale ctor like numpunct
_M_init_facet(new std::collate<char>);
_M_init_facet(new std::ctype<char>);
_M_init_facet(new codecvt<char, char, mbstate_t>);
_M_init_facet(new moneypunct<char, false>(_M_c_locale));
_M_init_facet(new moneypunct<char, false>(__cloc));
_M_init_facet(new moneypunct<char,true >);
_M_init_facet(new money_get<char>);
_M_init_facet(new money_put<char>);
_M_init_facet(new numpunct<char>(_M_c_locale));
_M_init_facet(new numpunct<char>(__cloc));
_M_init_facet(new num_get<char>);
_M_init_facet(new num_put<char>);
_M_init_facet(new time_get<char>);
_M_init_facet(new time_put<char>);
_M_init_facet(new std::messages<char>);
_M_init_facet(new std::messages<char>(__cloc, __str.c_str()));
#ifdef _GLIBCPP_USE_WCHAR_T
_M_init_facet(new std::collate<wchar_t>);
_M_init_facet(new std::ctype<wchar_t>);
_M_init_facet(new codecvt<wchar_t, char, mbstate_t>);
_M_init_facet(new moneypunct<wchar_t, false>(_M_c_locale));
_M_init_facet(new moneypunct<wchar_t, false>(__cloc));
_M_init_facet(new moneypunct<wchar_t,true >);
_M_init_facet(new money_get<wchar_t>);
_M_init_facet(new money_put<wchar_t>);
_M_init_facet(new numpunct<wchar_t>(_M_c_locale));
_M_init_facet(new numpunct<wchar_t>(__cloc));
_M_init_facet(new num_get<wchar_t>);
_M_init_facet(new num_put<wchar_t>);
_M_init_facet(new time_get<wchar_t>);
_M_init_facet(new time_put<wchar_t>);
_M_init_facet(new std::messages<wchar_t>);
_M_init_facet(new std::messages<wchar_t>(__cloc, __str.c_str()));
#endif
locale::facet::_S_destroy_c_locale(__cloc);
}
void

View File

@ -1,6 +1,6 @@
// 2000-08-22 Benjamin Kosnik <bkoz@cygnus.com>
// Copyright (C) 2000 Free Software Foundation
// Copyright (C) 2000, 2001 Free Software Foundation
//
// 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
@ -25,7 +25,7 @@
using namespace std;
#ifdef _GLIBCPP_USE_WCHAR_T
#ifdef _GLIBCPP_USE___ENC_TRAITS
/*
> how do I check that these conversions are correct?
@ -226,14 +226,14 @@ void test02()
delete [] i_arr;
}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
#endif // _GLIBCPP_USE___ENC_TRAITS
int main ()
{
#if _GLIBCPP_USE_WCHAR_T
#if _GLIBCPP_USE___ENC_TRAITS
test01();
test02();
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
#endif
return 0;
}

View File

@ -1,6 +1,6 @@
// 2000-08-23 Benjamin Kosnik <bkoz@cygnus.com>
// Copyright (C) 2000 Free Software Foundation
// Copyright (C) 2000, 2001 Free Software Foundation
//
// 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
@ -25,7 +25,7 @@
using namespace std;
#ifdef _GLIBCPP_USE_WCHAR_T
#ifdef _GLIBCPP_USE___ENC_TRAITS
void
initialize_state(__enc_traits& state)
@ -120,13 +120,14 @@ void test01()
delete [] e_arr;
delete [] i_arr;
}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
#endif // _GLIBCPP_USE___ENC_TRAITS
int main ()
{
#if _GLIBCPP_USE_WCHAR_T
#if _GLIBCPP_USE___ENC_TRAITS
test01();
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
#endif
return 0;
}

View File

@ -33,7 +33,7 @@ void test00()
std::locale loc("C");
}
#if _GLIBCPP_USE_WCHAR_T
#if _GLIBCPP_USE___ENC_TRAITS
typedef std::codecvt<char, char, std::mbstate_t> c_codecvt;
typedef std::codecvt_byname<char, char, std::mbstate_t> c_codecvt_byname;
typedef std::codecvt<wchar_t, char, std::mbstate_t> w_codecvt;
@ -237,13 +237,13 @@ void test01()
VERIFY (loc15 != loc09);
}
}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
#endif // _GLIBCPP_USE___ENC_TRAITS
int main ()
{
test00();
#if _GLIBCPP_USE_WCHAR_T
#if _GLIBCPP_USE___ENC_TRAITS
test01();
#endif

View File

@ -0,0 +1,54 @@
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001 Free Software Foundation
//
// 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 22.2.7 The message retrieval category
#include <locale>
void test01()
{
// Check for required base class.
typedef std::messages<char> test_type;
typedef std::locale::facet base_type1;
typedef std::messages_base base_type2;
const test_type& obj = std::use_facet<test_type>(std::locale());
const base_type1* base1 = &obj;
const base_type2* base2 = &obj;
// Check for required typedefs
typedef test_type::char_type char_type;
typedef test_type::string_type string_type;
}
// Should be able to instantiate this for other types besides char, wchar_t
class gnu_messages: public std::messages<unsigned char>
{ };
void test02()
{
gnu_messages facet01;
}
int main()
{
test01();
test02();
return 0;
}

View File

@ -0,0 +1,82 @@
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001 Free Software Foundation
//
// 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 22.2.7.2 Template class messages_byname
#include <locale>
#include <testsuite_hooks.h>
// XXX This test is not working for non-glibc locale models.
// { dg-do run { xfail *-*-* } }
void test01()
{
using namespace std;
typedef std::messages<char>::catalog catalog;
typedef std::messages<char>::string_type string_type;
bool test = true;
string str;
// This is exported through RUNTESTFLAGS in testsuite/Makefile.am.
const char* dir = LOCALEDIR;
locale loc_c = locale::classic();
locale loc_byname(locale::classic(), new messages_byname<char>("de_DE"));
str = loc_byname.name();
locale loc_de("de_DE");
str = loc_de.name();
VERIFY( loc_de != loc_byname );
// cache the messages facets
const messages<char>& mssg_byname = use_facet<messages<char> >(loc_byname);
const messages<char>& mssg_de = use_facet<messages<char> >(loc_de);
// catalog open(const string&, const locale&) const;
// string_type get(catalog, int, int, const string_type& ) const;
// void close(catalog) const;
// Check German (de_DE) locale.
catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
string s01 = mssg_de.get(cat_de, 0, 0, "please");
string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
VERIFY ( s01 == "bitte" );
VERIFY ( s02 == "danke" );
mssg_de.close(cat_de);
// Check byname locale.
catalog cat_byname = mssg_byname.open("libstdc++", loc_c, dir);
string s03 = mssg_byname.get(cat_de, 0, 0, "please");
string s04 = mssg_byname.get(cat_de, 0, 0, "thank you");
VERIFY ( s03 == "bitte" );
VERIFY ( s04 == "danke" );
mssg_byname.close(cat_byname);
VERIFY ( s01 == s03 );
VERIFY ( s02 == s04 );
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,90 @@
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001 Free Software Foundation
//
// 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
// 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 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 22.2.7.1.1 messages members
#include <locale>
#include <testsuite_hooks.h>
// XXX This test is not working for non-glibc locale models.
// { dg-do run { xfail *-*-* } }
void test01()
{
using namespace std;
typedef std::messages<char>::catalog catalog;
typedef std::messages<char>::string_type string_type;
bool test = true;
// This is exported through RUNTESTFLAGS in testsuite/Makefile.am.
const char* dir = LOCALEDIR;
// basic construction
locale loc_c = locale::classic();
locale loc_us("en_US");
locale loc_fr("fr_FR");
locale loc_de("de_DE");
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
VERIFY( loc_de != loc_fr );
// cache the messages facets
const messages<char>& mssg_c = use_facet<messages<char> >(loc_c);
const messages<char>& mssg_us = use_facet<messages<char> >(loc_us);
const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr);
const messages<char>& mssg_de = use_facet<messages<char> >(loc_de);
// catalog open(const string&, const locale&) const;
// string_type get(catalog, int, int, const string_type& ) const;
// void close(catalog) const;
// Check German (de_DE) locale.
catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
string s01 = mssg_de.get(cat_de, 0, 0, "please");
string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
VERIFY ( s01 == "bitte" );
VERIFY ( s02 == "danke" );
mssg_de.close(cat_de);
// Check French (fr_FR) locale.
catalog cat_fr = mssg_fr.open("libstdc++", loc_c, dir);
s01 = mssg_fr.get(cat_fr, 0, 0, "please");
s02 = mssg_fr.get(cat_fr, 0, 0, "thank you");
VERIFY ( s01 == "s'il vous plaît" );
VERIFY ( s02 == "merci" );
mssg_fr.close(cat_fr);
// Check US (en_US) locale.
catalog cat_us = mssg_fr.open("libstdc++", loc_c, dir);
s01 = mssg_us.get(cat_us, 0, 0, "please");
s02 = mssg_us.get(cat_us, 0, 0, "thank you");
VERIFY ( s01 == "please" );
VERIFY ( s02 == "thank you" );
mssg_us.close(cat_us);
}
int main()
{
test01();
return 0;
}

View File

@ -18,7 +18,7 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 22.2.3 the numeric punctuation facet
// 22.2.3 The numeric punctuation facet
#include <locale>

View File

@ -1,4 +1,4 @@
// 2001-01-17 bkoz
// 2001-01-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001 Free Software Foundation
//

View File

@ -67,53 +67,75 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSTRINGOBJS = @LIBSTRINGOBJS@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
enable_shared = @enable_shared@
enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@
glibcpp_localedir = @glibcpp_localedir@
glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_srcdir = @glibcpp_srcdir@
glibcpp_thread_h = @glibcpp_thread_h@
@ -121,6 +143,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
toplevel_srcdir = @toplevel_srcdir@
@ -136,9 +159,10 @@ RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then echo @gl
RUNTESTFLAGS =
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_HEADER = ../config.h ../config.h testsuite_hooks.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README Makefile.am Makefile.in
DIST_COMMON = README ./stamp-h3.in Makefile.am Makefile.in \
testsuite_hooks.h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@ -154,6 +178,34 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
testsuite_hooks.h: stamp-h3
@if test ! -f $@; then \
rm -f stamp-h3; \
$(MAKE) stamp-h3; \
else :; fi
stamp-h3: $(srcdir)/testsuite_hooks.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=testsuite/testsuite_hooks.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h3 2> /dev/null
$(srcdir)/testsuite_hooks.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h3.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h3.in; \
$(MAKE) $(srcdir)/stamp-h3.in; \
else :; fi
$(srcdir)/stamp-h3.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h3.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f testsuite_hooks.h
maintainer-clean-hdr:
tags: TAGS
TAGS:
@ -218,6 +270,9 @@ installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
all-recursive-am: testsuite_hooks.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am:
install-exec: install-exec-am
@ -229,7 +284,7 @@ install-am: all-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
all-am: Makefile testsuite_hooks.h
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
@ -245,31 +300,34 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean-am: mostlyclean-hdr mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean-am: clean-hdr clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean-am: distclean-hdr distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-info-am install-info \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
tags distdir check-DEJAGNU info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-info-am install-info \
all-recursive-am install-exec-am install-exec install-data-am \
install-data install-am install uninstall-am uninstall all-redirect \
all-am all installdirs mostlyclean-generic distclean-generic \
clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@ -156,15 +156,3 @@ proc libstdc++-v3_target_compile { source dest type options } {
return [target_compile $source $dest $type $options]
}
# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
# (for the 64-bit ABI). The right way to do this would be to modify
# unix.exp -- but that's not an option since it's part of DejaGNU
# proper, so we do it here, by trickery. We really only need to do
# this on IRIX, but it shouldn't hurt to do it anywhere else.
proc libstdc++-v3_set_ld_library_path { name element op } {
setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH]
setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH]
}
trace variable env(LD_LIBRARY_PATH) w libstdc++-v3_set_ld_library_path

View File

@ -47,7 +47,8 @@ case ${query} in
echo ${CXX}
;;
--cxxflags)
CXXFLAGS=" -ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
CXXFLAGS=' -ggdb3 @SECTION_FLAGS@ @SECTION_LDFLAGS@
-DDEBUG_ASSERT -DLOCALEDIR="@glibcpp_localedir@" '
echo ${CXXFLAGS}
;;
*)
@ -56,5 +57,3 @@ case ${query} in
esac
exit 0