[APPLIED]

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>

	* 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
