aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-09-12 23:27:30 +0000
committerBenjamin Kosnik <bkoz@redhat.com>2002-09-12 23:27:30 +0000
commitc9449bfb5f785c0cc8d9e61f52c01eccf779d435 (patch)
treec7a7732451ea9c685b439359138659e24578bf6b
parent0bf5ff165eca07fd77b41cc0bd861718f3a7161e (diff)
2002-09-12 Benjamin Kosnik <bkoz@redhat.com>
* libmath/Makefile.am (LIBTOOL): Use --tag CC always for this directory. * libmath/Makefile.in: Regenerate. * src/Makefile.am: Tweak comment. * src/Makefile.in: Regenerate. * config/locale/gnu/c_locale.h: Remove warnings. Inject __uselocale into __gnu_cxx. * config/locale/generic/c_locale.h: Match. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@57082 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog12
-rw-r--r--libstdc++-v3/config/locale/generic/c_locale.h3
-rw-r--r--libstdc++-v3/config/locale/gnu/c_locale.h17
-rw-r--r--libstdc++-v3/libmath/Makefile.am7
-rw-r--r--libstdc++-v3/libmath/Makefile.in10
-rw-r--r--libstdc++-v3/src/Makefile.am2
-rw-r--r--libstdc++-v3/src/Makefile.in2
7 files changed, 36 insertions, 17 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ba8ed4b5f65..cd6f8db4dc7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,15 @@
+2002-09-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libmath/Makefile.am (LIBTOOL): Use --tag CC always for this
+ directory.
+ * libmath/Makefile.in: Regenerate.
+ * src/Makefile.am: Tweak comment.
+ * src/Makefile.in: Regenerate.
+
+ * config/locale/gnu/c_locale.h: Remove warnings.
+ Inject __uselocale into __gnu_cxx.
+ * config/locale/generic/c_locale.h: Match.
+
2002-09-11 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.tcc (__convert_from_v): Remove.
diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
index cb2bae8b5c5..bfd9bf0a0bf 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.h
+++ b/libstdc++-v3/config/locale/generic/c_locale.h
@@ -44,12 +44,13 @@ namespace std
__convert_from_v(char* __out, const int __size, const char* __fmt,
_Tv __v, const __c_locale&, int __prec = -1)
{
- int __ret;
char* __old = setlocale(LC_ALL, NULL);
char* __sav = static_cast<char*>(malloc(strlen(__old) + 1));
if (__sav)
strcpy(__sav, __old);
setlocale(LC_ALL, "C");
+
+ int __ret;
#ifdef _GLIBCPP_USE_C99
if (__prec >= 0)
__ret = snprintf(__out, __size, __fmt, __prec, __v);
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h
index 91a92e9aaed..aabbe6af425 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
@@ -40,6 +40,13 @@
#define _GLIBCPP_C_LOCALE_GNU 1
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+namespace __gnu_cxx
+{
+ extern "C" __typeof(uselocale) __uselocale;
+}
+#endif
+
namespace std
{
typedef __locale_t __c_locale;
@@ -47,12 +54,13 @@ namespace std
template<typename _Tv>
int
__convert_from_v(char* __out, const int __size, const char* __fmt,
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
_Tv __v, const __c_locale& __cloc, int __prec = -1)
{
- int __ret;
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __c_locale __old = __uselocale(__cloc);
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
#else
+ _Tv __v, const __c_locale&, int __prec = -1)
+ {
char* __old = setlocale(LC_ALL, NULL);
char* __sav = static_cast<char*>(malloc(strlen(__old) + 1));
if (__sav)
@@ -60,6 +68,7 @@ namespace std
setlocale(LC_ALL, "C");
#endif
+ int __ret;
#ifdef _GLIBCPP_USE_C99
if (__prec >= 0)
__ret = snprintf(__out, __size, __fmt, __prec, __v);
@@ -73,7 +82,7 @@ namespace std
#endif
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __uselocale(__old);
+ __gnu_cxx::__uselocale(__old);
#else
setlocale(LC_ALL, __sav);
free(__sav);
diff --git a/libstdc++-v3/libmath/Makefile.am b/libstdc++-v3/libmath/Makefile.am
index 27d76e93f20..30d3dce0d16 100644
--- a/libstdc++-v3/libmath/Makefile.am
+++ b/libstdc++-v3/libmath/Makefile.am
@@ -34,12 +34,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = stubs.c
-LINK = \
- $(LIBTOOL) --tag CC --mode=link "$(CCLD)" \
- $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = \
$(TOPLEVEL_INCLUDES)
+
+# Only compiling "C" sources in this directory.
+LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in
index 375b9ad31d4..7640e684662 100644
--- a/libstdc++-v3/libmath/Makefile.in
+++ b/libstdc++-v3/libmath/Makefile.in
@@ -92,7 +92,6 @@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
-LIBTOOL = @LIBTOOL@
LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
MAINT = @MAINT@
@@ -144,17 +143,15 @@ libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = stubs.c
-LINK = \
- $(LIBTOOL) --tag CC --mode=link "$(CCLD)" \
- $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
-
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = \
$(TOPLEVEL_INCLUDES)
+
+# Only compiling "C" sources in this directory.
+LIBTOOL = @LIBTOOL@ --tag CC
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
@@ -170,6 +167,7 @@ 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
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 9678b766b2c..4592168f48d 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -27,7 +27,7 @@ MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-# Cross compiler and multilib support.
+# Cross compiler support.
CXX = @glibcpp_CXX@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 6e5b364f2ae..0e55017baf0 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -130,7 +130,7 @@ MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-# Cross compiler and multilib support.
+# Cross compiler support.
CXX = @glibcpp_CXX@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@