This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] libstdc++ - Avoid using missing C library symbols
- From: Bernardo Innocenti <bernie at develer dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 09 Aug 2003 02:08:18 +0200
- Subject: [PATCH] libstdc++ - Avoid using missing C library symbols
- Organization: Develer S.r.l.
Avoid referencing wchar and mbchar related functions when _GLIBCXX_USE_WCHAR_T
and _GLIBCXX_HAVE_MBSTATE_T arn't defined. This patch is required to link with
uClibc (a C library targeted at embedded systems).
uClibc is not a currently supported target for libstdc++, but during the next
days I'm going to submit more patches. The final goal is merging in everything
required to fully support uClibc and uClinux.
2003-08-09 Bernardo Innocenti <bernie@develer.com>
* libstdc++-v3/include/c_std/std_cstdlib.h: Avoid using missing C library symbols.
--- gcc-3.4.orig/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 12:08:05.000000000 +0200
+++ gcc-3.4/libstdc++-v3/include/c_std/std_cstdlib.h 2003-07-26 00:50:26.000000000 +0200
@@ -99,23 +99,27 @@ namespace std
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
+#ifdef _GLIBCXX_HAVE_MBSTATE_T
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
+#endif // _GLIBCXX_HAVE_MBSTATE_T
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
+#ifdef _GLIBCXX_USE_WCHAR_T
using ::wcstombs;
using ::wctomb;
+#endif // _GLIBCXX_USE_WCHAR_T
inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html