r965 - in trunk: gcc hlfs

archaic at linuxfromscratch.org archaic at linuxfromscratch.org
Wed Jun 8 09:28:01 PDT 2005


Author: archaic
Date: 2005-06-08 10:28:00 -0600 (Wed, 08 Jun 2005)
New Revision: 965

Added:
   trunk/gcc/gcc-3.4.3-hardened_cflags-1.patch
   trunk/gcc/gcc-3.4.3-specs_x86-1.patch
   trunk/gcc/gcc-3.4.3-ssp-3.patch
   trunk/gcc/gcc-3.4.3-uClibc_conf-1.patch
   trunk/gcc/gcc-3.4.3-uClibc_libstdc++-1.patch
   trunk/gcc/gcc-3.4.3-uClibc_locale-1.patch
Removed:
   trunk/hlfs/gcc-3.4.3-hardened_cflags-1.patch
   trunk/hlfs/gcc-3.4.3-linkonce-1.patch
   trunk/hlfs/gcc-3.4.3-no_fixincludes-1.patch
   trunk/hlfs/gcc-3.4.3-specs_x86-1.patch
   trunk/hlfs/gcc-3.4.3-ssp-3.patch
   trunk/hlfs/gcc-3.4.3-uClibc_conf-1.patch
   trunk/hlfs/gcc-3.4.3-uClibc_libstdc++-1.patch
   trunk/hlfs/gcc-3.4.3-uClibc_locale-1.patch
Log:
Moved old gcc patches to gcc dir. (hlfs)

Copied: trunk/gcc/gcc-3.4.3-hardened_cflags-1.patch (from rev 963, trunk/hlfs/gcc-3.4.3-hardened_cflags-1.patch)

Copied: trunk/gcc/gcc-3.4.3-specs_x86-1.patch (from rev 963, trunk/hlfs/gcc-3.4.3-specs_x86-1.patch)

Copied: trunk/gcc/gcc-3.4.3-ssp-3.patch (from rev 963, trunk/hlfs/gcc-3.4.3-ssp-3.patch)

Copied: trunk/gcc/gcc-3.4.3-uClibc_conf-1.patch (from rev 963, trunk/hlfs/gcc-3.4.3-uClibc_conf-1.patch)

Copied: trunk/gcc/gcc-3.4.3-uClibc_libstdc++-1.patch (from rev 963, trunk/hlfs/gcc-3.4.3-uClibc_libstdc++-1.patch)

Copied: trunk/gcc/gcc-3.4.3-uClibc_locale-1.patch (from rev 963, trunk/hlfs/gcc-3.4.3-uClibc_locale-1.patch)

Deleted: trunk/hlfs/gcc-3.4.3-hardened_cflags-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-hardened_cflags-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-hardened_cflags-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,137 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2005-02-01
-Initial Package Version: 3.4.3
-Upstream Status: Not submitted
-Origin: None
-Description: Use gcc -fpie, -fpic, and ld -pie, -z relro, -z now.
-This patch also fixes it so 'make BOOT_CFLAGS' and 'BOOT_LDFLAGS' are not
-needed. It does 'BOOT_CFLAGS=$(CFLAGS)'.
-
-See:
-http://www.linuxfromscratch.org/~robert/Homogenic/
-
-diff -Naur gcc-3.4.3.orig/Makefile.in gcc-3.4.3/Makefile.in
---- gcc-3.4.3.orig/Makefile.in	2004-11-05 04:14:05.000000000 +0000
-+++ gcc-3.4.3/Makefile.in	2005-02-01 04:10:20.185976544 +0000
-@@ -229,7 +229,7 @@
- NM = @NM@
- 
- LD = @LD@
--LDFLAGS = 
-+LDFLAGS = -z relro -z now -pie
- 
- RANLIB = @RANLIB@
- 
-@@ -428,17 +428,11 @@
- 	"SHELL=$(SHELL)" \
- 	"YACC=$(YACC)" \
- 	"AR_FLAGS=$(AR_FLAGS)" \
--	"CFLAGS=$(CFLAGS)" \
--	"CXXFLAGS=$(CXXFLAGS)" \
- 	"LDFLAGS=$(LDFLAGS)" \
--	"LIBCFLAGS=$(LIBCFLAGS)" \
--	"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
- 	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
- 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
- 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
--	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
- 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
--	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
- 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
- 	"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
- 	"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
-@@ -493,13 +487,9 @@
- 	'AR=$$(AR_FOR_TARGET)' \
- 	'AS=$$(AS_FOR_TARGET)' \
- 	'CC=$$(CC_FOR_TARGET)' \
--	'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
- 	'CXX=$$(CXX_FOR_TARGET)' \
--	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
- 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 	'LD=$$(LD_FOR_TARGET)' \
--	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
--	'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
- 	'NM=$$(NM_FOR_TARGET)' \
- 	'RANLIB=$$(RANLIB_FOR_TARGET)' \
- 	'WINDRES=$$(WINDRES_FOR_TARGET)'
-@@ -516,11 +506,9 @@
- 	'BUILD_PREFIX=$(BUILD_PREFIX)' \
- 	'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
- 	"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
--	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- 	"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
- 	"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
- 	"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
--	"`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- 	"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- 	"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
- 	"`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
-diff -Naur gcc-3.4.3.orig/gcc/Makefile.in gcc-3.4.3/gcc/Makefile.in
---- gcc-3.4.3.orig/gcc/Makefile.in	2004-10-18 16:00:39.000000000 +0000
-+++ gcc-3.4.3/gcc/Makefile.in	2005-02-01 04:15:30.038448392 +0000
-@@ -138,9 +138,11 @@
- # TCFLAGS is used for compilations with the GCC just built.
- XCFLAGS =
- TCFLAGS =
--CFLAGS = -g
-+CFLAGS = @CFLAGS@ -pie -fpie -fstack-protector-all
-+LIBCFLAGS = @CFLAGS@ -fpic -fstack-protector-all
- STAGE1_CFLAGS = -g @stage1_cflags@
--BOOT_CFLAGS = -g -O2
-+BOOT_CFLAGS = $(CFLAGS)
-+BOOT_LDFLAGS = $(LDFLAGS)
- 
- # Flags to determine code coverage. When coverage is disabled, this will
- # contain the optimization flags, as you normally want code coverage
-@@ -291,7 +293,8 @@
- # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
- # It omits XCFLAGS, and specifies -B./.
- # It also specifies -isystem ./include to find, e.g., stddef.h.
--GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
-+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
-+GCC_LIBCFLAGS=$(INTERNAL_CFLAGS) $(LIBCFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
- 
- # ---------------------------------------------------
- # Programs which produce files for the target machine
-@@ -488,7 +491,7 @@
- # Options to use when compiling libgcc2.a.
- #
- LIBGCC2_DEBUG_CFLAGS = -g
--LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
-+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_LIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
- 
- # Additional options to use when compiling libgcc2.a.
- # Some targets override this to -isystem include
-diff -Naur gcc-3.4.3.orig/libiberty/Makefile.in gcc-3.4.3/libiberty/Makefile.in
---- gcc-3.4.3.orig/libiberty/Makefile.in	2004-01-14 21:27:28.000000000 +0000
-+++ gcc-3.4.3/libiberty/Makefile.in	2005-02-01 04:16:00.843765272 +0000
-@@ -60,7 +60,7 @@
- AR_FLAGS = rc
- 
- CC = @CC@
--CFLAGS = @CFLAGS@
-+CFLAGS = @CFLAGS@ -fpic -fstack-protector-all
- LIBCFLAGS = $(CFLAGS)
- RANLIB = @RANLIB@
- MAKEINFO = @MAKEINFO@
-diff -Naur gcc-3.4.3.orig/libstdc++-v3/Makefile.in gcc-3.4.3/libstdc++-v3/Makefile.in
---- gcc-3.4.3.orig/libstdc++-v3/Makefile.in	2004-03-18 17:35:12.000000000 +0000
-+++ gcc-3.4.3/libstdc++-v3/Makefile.in	2005-02-01 04:16:27.335737880 +0000
-@@ -57,7 +57,7 @@
- CCODECVT_H = @CCODECVT_H@
- CCOLLATE_CC = @CCOLLATE_CC@
- CCTYPE_CC = @CCTYPE_CC@
--CFLAGS = @CFLAGS@
-+CFLAGS = @CFLAGS@ -fpic -fstack-protector-all
- CLOCALE_CC = @CLOCALE_CC@
- CLOCALE_H = @CLOCALE_H@
- CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
-@@ -72,7 +72,7 @@
- CTIME_H = @CTIME_H@
- CXX = @CXX@
- CXXCPP = @CXXCPP@
--CXXFLAGS = @CXXFLAGS@
-+CXXFLAGS = @CXXFLAGS@ -fpic -fstack-protector-all
- CYGPATH_W = @CYGPATH_W@
- C_INCLUDE_DIR = @C_INCLUDE_DIR@
- DEBUG_FLAGS = @DEBUG_FLAGS@

Deleted: trunk/hlfs/gcc-3.4.3-linkonce-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-linkonce-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-linkonce-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1 +0,0 @@
-link ../gcc/gcc-3.4.3-linkonce-1.patch
\ No newline at end of file

Deleted: trunk/hlfs/gcc-3.4.3-no_fixincludes-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-no_fixincludes-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-no_fixincludes-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1 +0,0 @@
-link ../gcc/gcc-3.4.3-no_fixincludes-1.patch
\ No newline at end of file

Deleted: trunk/hlfs/gcc-3.4.3-specs_x86-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-specs_x86-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-specs_x86-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,131 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2004-11-14
-Initial Package Version: 3.4.3
-Upstream Status: Not submitted - LFS specific
-Origin: None
-Description: This patch is a replacement for the LFS gcc-specs patch.
-This patch adds --with-dynamic-linker and --with-nostdinc to gcc/configure.
-The point is so the gcc source can be reused in every stage, aswell uclibc's
-dynamic linker (or others) can be specified.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-
-diff -Naur gcc-3.4.3.orig/gcc/Makefile.in gcc-3.4.3.specs/gcc/Makefile.in
---- gcc-3.4.3.orig/gcc/Makefile.in	2004-10-18 16:00:39.000000000 +0000
-+++ gcc-3.4.3.specs/gcc/Makefile.in	2004-11-14 17:41:43.329209760 +0000
-@@ -702,7 +702,7 @@
- 
- # This is the variable actually used when we compile. If you change this,
- # you probably want to update BUILD_CFLAGS in configure.ac
--ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \
-+ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) @NOSTDINC@ \
-   $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
- 
- # Likewise.
-@@ -1424,7 +1424,8 @@
- 	(SHLIB_LINK='$(SHLIB_LINK)' \
- 	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
- 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
--  $(DRIVER_DEFINES) \
-+  $(DRIVER_DEFINES) `if test -n "@DYNAMICLINKER@" ; then \
-+	echo -D__DYNAMIC_LINKER__=\"@DYNAMICLINKER@\" ; fi` \
-   -c $(srcdir)/gcc.c $(OUTPUT_OPTION))
- 
- gccspec.o: gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H)
-diff -Naur gcc-3.4.3.orig/gcc/config/i386/linux.h gcc-3.4.3.specs/gcc/config/i386/linux.h
---- gcc-3.4.3.orig/gcc/config/i386/linux.h	2003-11-29 03:08:10.000000000 +0000
-+++ gcc-3.4.3.specs/gcc/config/i386/linux.h	2004-11-14 17:40:58.112083808 +0000
-@@ -109,6 +109,15 @@
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
- #undef	LINK_SPEC
-+#ifdef __DYNAMIC_LINKER__
-+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
-+  %{!shared: \
-+    %{!ibcs: \
-+      %{!static: \
-+        %{rdynamic:-export-dynamic} \
-+        %{!dynamic-linker:-dynamic-linker "__DYNAMIC_LINKER__"}} \
-+        %{static:-static}}}"
-+#else
- #ifdef USE_GNULIBC_1
- #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
-   %{!shared: \
-@@ -126,6 +135,7 @@
- 	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- 	%{static:-static}}}"
- #endif
-+#endif
- 
- /* A C statement (sans semicolon) to output to the stdio stream
-    FILE the assembler definition of uninitialized global DECL named
-diff -Naur gcc-3.4.3.orig/gcc/config/linux.h gcc-3.4.3.specs/gcc/config/linux.h
---- gcc-3.4.3.orig/gcc/config/linux.h	2003-11-29 03:08:10.000000000 +0000
-+++ gcc-3.4.3.specs/gcc/config/linux.h	2004-11-14 17:40:58.114083504 +0000
-@@ -124,3 +124,7 @@
- #endif
- 
- #define TARGET_HAS_F_SETLKW
-+#ifdef NOSTDINC
-+#undef STANDARD_INCLUDE_DIR
-+#define STANDARD_INCLUDE_DIR 0
-+#endif
-diff -Naur gcc-3.4.3.orig/gcc/configure gcc-3.4.3.specs/gcc/configure
---- gcc-3.4.3.orig/gcc/configure	2004-11-05 04:14:05.000000000 +0000
-+++ gcc-3.4.3.specs/gcc/configure	2004-11-14 17:42:16.961096936 +0000
-@@ -914,6 +914,10 @@
-                           with the compiler
-   --with-system-zlib      use installed libz
-   --with-slibdir=DIR      shared libraries in DIR LIBDIR
-+  --with-dynamic-linker=PATH
-+                          specifies path to dynamic linker.
-+                          example: "/lib/ld-linux.so.2"
-+  --with-nostdinc         build gcc to ignore standard include directories
- 
- Some influential environment variables:
-   CC          C compiler command
-@@ -4808,6 +4812,34 @@
-   onestep=""
- fi;
- 
-+# Check whether --with-dynamic-linker= was given.
-+
-+if test "${with_dynamic_linker+set}" = set; then
-+  withval="$with_dynamic_linker"
-+  case "${withval}" in
-+yes)    { { echo "$as_me:$LINENO: error: bad value ${withval} given for dynamic linker" >&5
-+echo "$as_me: error: bad value ${withval} given for dynamic linker" >&2;}
-+   { (exit 1); exit 1; }; } ;;
-+no)     ;;
-+*)	if test -e $withval ; then
-+	DYNAMICLINKER=$withval
-+	else
-+	echo "$as_me: error: bad value $withval given for dynamic linker. No such file." >&2
-+	exit 1
-+	fi ;;
-+esac
-+fi;
-+
-+# Check whether --with-nostdinc was given.
-+
-+if test "${with_nostdinc+set}" = set; then
-+  withval="$with_nostdinc"
-+  case "${withval}" in
-+yes)	NOSTDINC="-DNOSTDINC" ;;
-+no)	;;
-+*)	NOSTDINC="-DNOSTDINC" ;;
-+esac
-+fi;
- 
- # -------------------------
- # Checks for other programs
-@@ -13036,6 +13068,8 @@
- s, at TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
- s, at CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
- s, at onestep@,$onestep,;t t
-+s, at DYNAMICLINKER@,$DYNAMICLINKER,;t t
-+s, at NOSTDINC@,$NOSTDINC,;t t
- s, at SET_MAKE@,$SET_MAKE,;t t
- s, at AWK@,$AWK,;t t
- s, at LN@,$LN,;t t

Deleted: trunk/hlfs/gcc-3.4.3-ssp-3.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-ssp-3.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-ssp-3.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,4033 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2004-11-07
-Initial Package Version: 3.4
-Upstream Status: Rejected Upstream
-Origin: http://www.research.ibm.com/trl/projects/security/ssp/
-Description: Smashing Stack Protector - protector-3.4.1-1.tar.gz
-This patch is made specifically to work with the Glibc SSP patch. All guard
-functions have been removed. Developers are encouraged to check the
-differences between this patch, the original from ibm, and the Glibc patch.
-The gcc/libgcc2.c, gcc/libgcc-std.ver, gcc/config/t-linux, gcc/configure,
-and the "ENABLESSP" hunk of gcc/Makefile.in hunks were not used.
-Equivilent to using -D_LIBC_PROVIDES_SSP_ (-DHAVE_SYSLOG is related).
-The gcc/configure and gcc/Makefile.in hunks were removed because they
-conflict with other patches and we don't use the configure option anyway.
-
-To set the version string do something like this:
-
-sed -e 's/3.4.3/3.4.3 ssp/' -i gcc/version.c &&
-sed -e 's at http://gcc.gnu.org/bugs.html at http://bugs.linuxfromscratch.org/@' \
-  -i gcc/version.c
-
-This patch, and Glibc's patch, depends on erandom sysctl from:
-http://frandom.sourceforge.net/
-Thanks to Eli Billauer.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
-http://www.linuxfromscratch.org/hints/downloads/files/entropy.txt
-
-diff -Naur gcc-3.4.0.orig/gcc/Makefile.in gcc-3.4.0.ssp/gcc/Makefile.in
---- gcc-3.4.0.orig/gcc/Makefile.in	2004-04-01 16:47:54.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/Makefile.in	2004-11-08 02:15:45.742545000 +0000
-@@ -859,7 +859,7 @@
-  sibcall.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o 	   \
-  targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o	   \
-  varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o	   \
-- et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o
-+ et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o protector.o
- 
- OBJS-md = $(out_object_file)
- OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o	   \
-@@ -1834,6 +1834,10 @@
- params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
- hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
- pretty-print.o: $(CONFIG_H) $(SYSTEM_H) pretty-print.c $(PRETTY_PRINT_H)
-+protector.o : protector.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
-+   flags.h function.h $(EXPR_H) $(OPTABS_H) $(REGS_H) toplev.h hard-reg-set.h \
-+   insn-config.h insn-flags.h $(RECOG_H) output.h toplev.h except.h reload.h \
-+   $(TM_P_H) conditions.h $(INSN_ATTR_H) real.h protector.h
- 
- $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
-    $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
-diff -Naur gcc-3.4.0.orig/gcc/c-cppbuiltin.c gcc-3.4.0.ssp/gcc/c-cppbuiltin.c
---- gcc-3.4.0.orig/gcc/c-cppbuiltin.c	2004-03-04 10:24:54.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/c-cppbuiltin.c	2004-11-08 01:51:36.000000000 +0000
-@@ -408,6 +408,12 @@
-   if (c_dialect_objc () && flag_next_runtime)
-     cpp_define (pfile, "__NEXT_RUNTIME__");
- 
-+  /* Make the choice of the stack protector runtime visible to source code.  */
-+  if (flag_propolice_protection)
-+    cpp_define (pfile, "__SSP__=1");
-+  if (flag_stack_protection)
-+    cpp_define (pfile, "__SSP_ALL__=2");
-+
-   /* A straightforward target hook doesn't work, because of problems
-      linking that hook's body when part of non-C front ends.  */
- # define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
-diff -Naur gcc-3.4.0.orig/gcc/calls.c gcc-3.4.0.ssp/gcc/calls.c
---- gcc-3.4.0.orig/gcc/calls.c	2004-03-15 23:22:42.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/calls.c	2004-11-08 01:51:36.000000000 +0000
-@@ -2321,8 +2321,12 @@
- 	  {
- 	    /* For variable-sized objects, we must be called with a target
- 	       specified.  If we were to allocate space on the stack here,
--	       we would have no way of knowing when to free it.  */
--	    rtx d = assign_temp (TREE_TYPE (exp), 1, 1, 1);
-+	       we would have no way of knowing when to free it.
-+
-+	       This is the structure of a function return object and it isn't
-+	       a character array for the stack protection, so it is
-+	       marked using the assignment of the KEEP argument to 5.  */
-+	    rtx d = assign_temp (TREE_TYPE (exp), 5, 1, 1);
- 
- 	    mark_temp_addr_taken (d);
- 	    structure_value_addr = XEXP (d, 0);
-diff -Naur gcc-3.4.0.orig/gcc/combine.c gcc-3.4.0.ssp/gcc/combine.c
---- gcc-3.4.0.orig/gcc/combine.c	2004-02-21 13:24:43.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/combine.c	2004-11-08 01:51:37.000000000 +0000
-@@ -1401,6 +1401,10 @@
- 	      && ! fixed_regs[REGNO (dest)]
- 	      && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (REGNO (dest))))))
-     return 1;
-+  /* Never combine loads and stores protecting argument that use set insn
-+     with used flag on.  */
-+  if (SET_VOLATILE_P (set))
-+    return 1;
- 
-   return 0;
- }
-@@ -3780,7 +3784,20 @@
- 	  rtx inner_op0 = XEXP (XEXP (x, 0), 1);
- 	  rtx inner_op1 = XEXP (x, 1);
- 	  rtx inner;
--
-+	  
-+#ifndef FRAME_GROWS_DOWNWARD
-+	  /* For the case where the frame grows upward,
-+	     the stack protector keeps the offset of the frame pointer
-+	     positive integer.  */
-+	  if (flag_propolice_protection
-+	      && code == PLUS
-+	      && other == frame_pointer_rtx
-+	      && GET_CODE (inner_op0) == CONST_INT
-+	      && GET_CODE (inner_op1) == CONST_INT
-+	      && INTVAL (inner_op0) > 0
-+	      && INTVAL (inner_op0) + INTVAL (inner_op1) <= 0)
-+	    return x;
-+#endif
- 	  /* Make sure we pass the constant operand if any as the second
- 	     one if this is a commutative operation.  */
- 	  if (CONSTANT_P (inner_op0) && GET_RTX_CLASS (code) == 'c')
-@@ -4145,6 +4162,13 @@
- 	 they are now checked elsewhere.  */
-       if (GET_CODE (XEXP (x, 0)) == PLUS
- 	  && CONSTANT_ADDRESS_P (XEXP (XEXP (x, 0), 1)))
-+#ifndef FRAME_GROWS_DOWNWARD
-+	/* The stack protector keeps the addressing style of a local variable
-+	   to be able to change its stack position.  */
-+	if (! (flag_propolice_protection
-+	       && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx
-+	       && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT))
-+#endif
- 	return gen_binary (PLUS, mode,
- 			   gen_binary (PLUS, mode, XEXP (XEXP (x, 0), 0),
- 				       XEXP (x, 1)),
-@@ -4272,8 +4296,14 @@
- 	}
- 
-       /* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for
--	 integers.  */
--      if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode))
-+	 integers.
-+	 
-+	 The stack protector keeps the addressing style of
-+	 a local variable.  */
-+      if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)
-+	  && (! (flag_propolice_protection
-+		 && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
-+		 && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)))
- 	return gen_binary (MINUS, mode,
- 			   gen_binary (MINUS, mode, XEXP (x, 0),
- 				       XEXP (XEXP (x, 1), 0)),
-diff -Naur gcc-3.4.0.orig/gcc/common.opt gcc-3.4.0.ssp/gcc/common.opt
---- gcc-3.4.0.orig/gcc/common.opt	2004-02-18 00:09:04.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/common.opt	2004-11-08 01:51:37.000000000 +0000
-@@ -152,6 +152,10 @@
- Common
- Warn when a variable is unused
- 
-+Wstack-protector
-+Common
-+Warn when not issuing stack smashing protection for some reason
-+
- aux-info
- Common Separate
- -aux-info <file>	Emit declaration information into <file>
-@@ -738,6 +742,14 @@
- Common
- Put zero initialized data in the bss section
- 
-+fstack-protector
-+Common
-+Enables stack protection
-+
-+fstack-protector-all
-+Common
-+Enables stack protection of every function
-+
- g
- Common JoinedOrMissing
- Generate debug information in default format
-diff -Naur gcc-3.4.0.orig/gcc/config/arm/arm.md gcc-3.4.0.ssp/gcc/config/arm/arm.md
---- gcc-3.4.0.orig/gcc/config/arm/arm.md	2004-01-13 13:24:37.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/config/arm/arm.md	2004-11-08 01:51:37.000000000 +0000
-@@ -3840,7 +3840,13 @@
- 	(match_operand:DI 1 "general_operand" ""))]
-   "TARGET_EITHER"
-   "
--  if (TARGET_THUMB)
-+  if (TARGET_ARM)
-+    {
-+      /* Everything except mem = const or mem = mem can be done easily */
-+      if (GET_CODE (operands[0]) == MEM)
-+        operands[1] = force_reg (DImode, operands[1]);
-+    }
-+  else /* TARGET_THUMB.... */
-     {
-       if (!no_new_pseudos)
-         {
-diff -Naur gcc-3.4.0.orig/gcc/cse.c gcc-3.4.0.ssp/gcc/cse.c
---- gcc-3.4.0.orig/gcc/cse.c	2004-03-21 23:01:49.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/cse.c	2004-11-08 01:51:37.000000000 +0000
-@@ -4203,7 +4203,14 @@
- 
- 	      if (new_const == 0)
- 		break;
--
-+#ifndef FRAME_GROWS_DOWNWARD
-+	      if (flag_propolice_protection
-+		  && GET_CODE (y) == PLUS
-+		  && XEXP (y, 0) == frame_pointer_rtx
-+		  && INTVAL (inner_const) > 0
-+		  && INTVAL (new_const) <= 0)
-+		break;
-+#endif
- 	      /* If we are associating shift operations, don't let this
- 		 produce a shift of the size of the object or larger.
- 		 This could occur when we follow a sign-extend by a right
-@@ -4735,6 +4742,14 @@
-       if (SET_DEST (x) == pc_rtx
- 	  && GET_CODE (SET_SRC (x)) == LABEL_REF)
- 	;
-+      /* cut the reg propagation of stack-protected argument.  */
-+      else if (SET_VOLATILE_P (x)) {
-+	rtx x1 = SET_DEST (x);
-+	if (GET_CODE (x1) == SUBREG && GET_CODE (SUBREG_REG (x1)) == REG)
-+	  x1 = SUBREG_REG (x1);
-+	if (! REGNO_QTY_VALID_P(REGNO (x1)))
-+	  make_new_qty (REGNO (x1), GET_MODE (x1));
-+      }
- 
-       /* Don't count call-insns, (set (reg 0) (call ...)), as a set.
- 	 The hard function value register is used only once, to copy to
-diff -Naur gcc-3.4.0.orig/gcc/doc/invoke.texi gcc-3.4.0.ssp/gcc/doc/invoke.texi
---- gcc-3.4.0.orig/gcc/doc/invoke.texi	2004-04-18 23:05:36.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/doc/invoke.texi	2004-11-08 01:51:37.000000000 +0000
-@@ -227,7 +227,7 @@
- -Wno-multichar  -Wnonnull  -Wpacked  -Wpadded @gol
- -Wparentheses  -Wpointer-arith  -Wredundant-decls @gol
- -Wreturn-type  -Wsequence-point  -Wshadow @gol
---Wsign-compare  -Wstrict-aliasing @gol
-+-Wsign-compare  -Wstack-protector  -Wstrict-aliasing @gol
- -Wswitch  -Wswitch-default  -Wswitch-enum @gol
- -Wsystem-headers  -Wtrigraphs  -Wundef  -Wuninitialized @gol
- -Wunknown-pragmas  -Wunreachable-code @gol
-@@ -671,6 +671,7 @@
- -fshort-double  -fshort-wchar @gol
- -fverbose-asm  -fpack-struct  -fstack-check @gol
- -fstack-limit-register=@var{reg}  -fstack-limit-symbol=@var{sym} @gol
-+-fstack-protector  -fstack-protector-all @gol
- -fargument-alias  -fargument-noalias @gol
- -fargument-noalias-global  -fleading-underscore @gol
- -ftls-model=@var{model} @gol
-@@ -2989,6 +2990,10 @@
- complex; GCC will refuse to optimize programs when the optimization
- itself is likely to take inordinate amounts of time.
- 
-+ at item -Wstack-protector
-+ at opindex Wstack-protector
-+Warn when not issuing stack smashing protection for some reason.
-+
- @item -Werror
- @opindex Werror
- Make all warnings into errors.
-@@ -11159,6 +11164,24 @@
- @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
- of 128KB at .  Note that this may only work with the GNU linker.
- 
-+ at item -fstack-protector
-+ at item -fstack-protector-all
-+ at opindex fstack-protector
-+ at opindex fstack-protector-all
-+ at opindex fno-stack-protector
-+Generate code to protect an application from a stack smashing
-+attack. The features are (1) the insertion of random value next to the
-+frame pointer to detect the integrity of the stack, (2) the reordering
-+of local variables to place buffers after pointers to avoid the
-+corruption of pointers that could be used to further corrupt arbitrary
-+memory locations, (3) the copying of pointers in function arguments to
-+an area preceding local variable buffers to prevent the corruption of
-+pointers that could be used to further corrupt arbitrary memory
-+locations, and the (4) omission of instrumentation code from some
-+functions to decrease the performance overhead.  If the integrity
-+would be broken, the program is aborted.  If stack-protector-all is
-+specified, instrumentation codes are generated at every functions.
-+
- @cindex aliasing of parameters
- @cindex parameters, aliased
- @item -fargument-alias
-diff -Naur gcc-3.4.0.orig/gcc/explow.c gcc-3.4.0.ssp/gcc/explow.c
---- gcc-3.4.0.orig/gcc/explow.c	2004-04-02 23:05:26.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/explow.c	2004-11-08 01:51:38.000000000 +0000
-@@ -84,7 +84,8 @@
-   rtx tem;
-   int all_constant = 0;
- 
--  if (c == 0)
-+  if (c == 0
-+      && ! (flag_propolice_protection && x == virtual_stack_vars_rtx))
-     return x;
- 
-  restart:
-@@ -185,7 +186,10 @@
-       break;
-     }
- 
--  if (c != 0)
-+  /* For the use of stack protection, keep the frame and offset pattern
-+     even if the offset is zero.  */
-+  if (c != 0
-+      || (flag_propolice_protection && x == virtual_stack_vars_rtx))
-     x = gen_rtx_PLUS (mode, x, GEN_INT (c));
- 
-   if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
-@@ -474,6 +478,26 @@
-       if (memory_address_p (mode, oldx))
- 	goto win2;
- 
-+      /* The stack protector keeps the addressing style of a local variable.
-+	 LEGITIMIZE_ADDRESS changes the addressing to the machine-dependent
-+	 style, so the protector split the frame address to a register using
-+	 force_reg. */
-+      if (flag_propolice_protection)
-+	{
-+#define FRAMEADDR_P(X) (GET_CODE (X) == PLUS				\
-+			&& XEXP (X, 0) == virtual_stack_vars_rtx	\
-+			&& GET_CODE (XEXP (X, 1)) == CONST_INT)
-+	  rtx y;
-+	  if (FRAMEADDR_P (x))
-+	    goto win;
-+	  for (y = x; y != 0 && GET_CODE (y) == PLUS; y = XEXP (y, 0))
-+	    {
-+	      if (FRAMEADDR_P (XEXP (y, 0)))
-+		XEXP (y, 0) = force_reg (GET_MODE (XEXP (y, 0)), XEXP (y, 0));
-+	      if (FRAMEADDR_P (XEXP (y, 1)))
-+		XEXP (y, 1) = force_reg (GET_MODE (XEXP (y, 1)), XEXP (y, 1));
-+	    }
-+	}
-       /* Perform machine-dependent transformations on X
- 	 in certain cases.  This is not necessary since the code
- 	 below can handle all possible cases, but machine-dependent
-diff -Naur gcc-3.4.0.orig/gcc/expr.c gcc-3.4.0.ssp/gcc/expr.c
---- gcc-3.4.0.orig/gcc/expr.c	2004-04-02 23:05:28.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/expr.c	2004-11-08 01:51:38.000000000 +0000
-@@ -48,6 +48,7 @@
- #include "intl.h"
- #include "tm_p.h"
- #include "target.h"
-+#include "protector.h"
- 
- /* Decide whether a function's arguments should be processed
-    from first to last or from last to first.
-@@ -1060,7 +1061,11 @@
- 
-    If ENDP is 0 return to, if ENDP is 1 return memory at the end ala
-    mempcpy, and if ENDP is 2 return memory the end minus one byte ala
--   stpcpy.  */
-+   stpcpy.
-+
-+   When the stack protector is used at the reverse move, it starts the move
-+   instruction from the address within the region of a variable.
-+   So it eliminates the first address decrement instruction.  */
- 
- rtx
- move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len,
-@@ -1123,6 +1128,8 @@
- 
-       if (USE_LOAD_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_from)
- 	{
-+	  if (flag_propolice_protection)
-+	    len = len - GET_MODE_SIZE (mode);
- 	  data.from_addr = copy_addr_to_reg (plus_constant (from_addr, len));
- 	  data.autinc_from = 1;
- 	  data.explicit_inc_from = -1;
-@@ -1137,6 +1144,8 @@
- 	data.from_addr = copy_addr_to_reg (from_addr);
-       if (USE_STORE_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_to)
- 	{
-+	  if (flag_propolice_protection)
-+	    len = len - GET_MODE_SIZE (mode);
- 	  data.to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
- 	  data.autinc_to = 1;
- 	  data.explicit_inc_to = -1;
-@@ -1280,11 +1289,15 @@
- 	from1 = adjust_address (data->from, mode, data->offset);
- 
-       if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
--	emit_insn (gen_add2_insn (data->to_addr,
--				  GEN_INT (-(HOST_WIDE_INT)size)));
-+	/* The stack protector skips the first address decrement instruction
-+	   at the reverse move.  */
-+	if (!flag_propolice_protection || data->explicit_inc_to < -1)
-+	  emit_insn (gen_add2_insn (data->to_addr,
-+				    GEN_INT (-(HOST_WIDE_INT)size)));
-       if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0)
--	emit_insn (gen_add2_insn (data->from_addr,
--				  GEN_INT (-(HOST_WIDE_INT)size)));
-+	if (!flag_propolice_protection || data->explicit_inc_from < -1)
-+	  emit_insn (gen_add2_insn (data->from_addr,
-+				    GEN_INT (-(HOST_WIDE_INT)size)));
- 
-       if (data->to)
- 	emit_insn ((*genfun) (to1, from1));
-@@ -2475,7 +2488,12 @@
- 
-       if (USE_STORE_PRE_DECREMENT (mode) && data->reverse && ! data->autinc_to)
- 	{
--	  data->to_addr = copy_addr_to_reg (plus_constant (to_addr, data->len));
-+	  int len = data->len;
-+	  /* The stack protector starts the store instruction from
-+	     the address within the region of a variable.  */
-+	  if (flag_propolice_protection)
-+	    len -= GET_MODE_SIZE (mode);
-+	  data->to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
- 	  data->autinc_to = 1;
- 	  data->explicit_inc_to = -1;
- 	}
-@@ -2544,8 +2562,11 @@
- 	to1 = adjust_address (data->to, mode, data->offset);
- 
-       if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
--	emit_insn (gen_add2_insn (data->to_addr,
--				  GEN_INT (-(HOST_WIDE_INT) size)));
-+	/* The stack protector skips the first address decrement instruction
-+	   at the reverse store.  */
-+	if (!flag_propolice_protection || data->explicit_inc_to < -1)
-+	  emit_insn (gen_add2_insn (data->to_addr,
-+				    GEN_INT (-(HOST_WIDE_INT) size)));
- 
-       cst = (*data->constfun) (data->constfundata, data->offset, mode);
-       emit_insn ((*genfun) (to1, cst));
-@@ -5700,7 +5721,9 @@
- 	  && GET_CODE (XEXP (value, 0)) == PLUS
- 	  && GET_CODE (XEXP (XEXP (value, 0), 0)) == REG
- 	  && REGNO (XEXP (XEXP (value, 0), 0)) >= FIRST_VIRTUAL_REGISTER
--	  && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER)
-+	  && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER
-+	  && (!flag_propolice_protection
-+	      || XEXP (XEXP (value, 0), 0) != virtual_stack_vars_rtx))
- 	{
- 	  rtx temp = expand_simple_binop (GET_MODE (value), code,
- 					  XEXP (XEXP (value, 0), 0), op2,
-diff -Naur gcc-3.4.0.orig/gcc/flags.h gcc-3.4.0.ssp/gcc/flags.h
---- gcc-3.4.0.orig/gcc/flags.h	2004-02-18 00:09:04.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/flags.h	2004-11-08 01:51:38.000000000 +0000
-@@ -186,6 +186,10 @@
- 
- extern bool warn_strict_aliasing;
- 
-+/* Warn when not issuing stack smashing protection for some reason.  */
-+
-+extern bool warn_stack_protector;
-+
- /* Nonzero if generating code to do profiling.  */
- 
- extern int profile_flag;
-@@ -771,4 +775,12 @@
- #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
-   (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
- 
-+/* Nonzero means use propolice as a stack protection method.  */
-+
-+extern int flag_propolice_protection;
-+
-+/* Nonzero means use a stack protection method for every function.  */
-+
-+extern int flag_stack_protection;
-+
- #endif /* ! GCC_FLAGS_H */
-diff -Naur gcc-3.4.0.orig/gcc/function.c gcc-3.4.0.ssp/gcc/function.c
---- gcc-3.4.0.orig/gcc/function.c	2004-03-15 23:22:47.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/function.c	2004-11-08 01:51:38.000000000 +0000
-@@ -63,6 +63,7 @@
- #include "integrate.h"
- #include "langhooks.h"
- #include "target.h"
-+#include "protector.h"
- 
- #ifndef TRAMPOLINE_ALIGNMENT
- #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
-@@ -155,6 +156,10 @@
- /* Array of INSN_UIDs to hold the INSN_UIDs for each sibcall epilogue
-    in this function.  */
- static GTY(()) varray_type sibcall_epilogue;
-+
-+/* Current boundary mark for character arrays.  */
-+static int temp_boundary_mark = 0;
-+
- 

- /* In order to evaluate some expressions, such as function calls returning
-    structures in memory, we need to temporarily allocate stack locations.
-@@ -208,6 +213,8 @@
-   /* The size of the slot, including extra space for alignment.  This
-      info is for combine_temp_slots.  */
-   HOST_WIDE_INT full_size;
-+  /* Boundary mark of a character array and the others. This info is for propolice.  */
-+  int boundary_mark;
- };
- 

- /* This structure is used to record MEMs or pseudos used to replace VAR, any
-@@ -638,6 +645,7 @@
-    whose lifetime is controlled by CLEANUP_POINT_EXPRs.  KEEP is 3
-    if we are to allocate something at an inner level to be treated as
-    a variable in the block (e.g., a SAVE_EXPR).
-+   KEEP is 5 if we allocate a place to return structure.
- 
-    TYPE is the type that will be used for the stack slot.  */
- 
-@@ -648,6 +656,8 @@
-   unsigned int align;
-   struct temp_slot *p, *best_p = 0;
-   rtx slot;
-+  int char_array = (flag_propolice_protection
-+		    && keep == 1 && search_string_def (type));
- 
-   /* If SIZE is -1 it means that somebody tried to allocate a temporary
-      of a variable size.  */
-@@ -673,7 +683,8 @@
- 	&& ! p->in_use
- 	&& objects_must_conflict_p (p->type, type)
- 	&& (best_p == 0 || best_p->size > p->size
--	    || (best_p->size == p->size && best_p->align > p->align)))
-+	    || (best_p->size == p->size && best_p->align > p->align))
-+	&& (! char_array || p->boundary_mark != 0))
-       {
- 	if (p->align == align && p->size == size)
- 	  {
-@@ -708,6 +719,7 @@
- 	      p->address = 0;
- 	      p->rtl_expr = 0;
- 	      p->type = best_p->type;
-+	      p->boundary_mark = best_p->boundary_mark;
- 	      p->next = temp_slots;
- 	      temp_slots = p;
- 
-@@ -768,6 +780,7 @@
-       p->full_size = frame_offset - frame_offset_old;
- #endif
-       p->address = 0;
-+      p->boundary_mark = char_array ? ++temp_boundary_mark : 0;
-       p->next = temp_slots;
-       temp_slots = p;
-     }
-@@ -932,14 +945,16 @@
- 	    int delete_q = 0;
- 	    if (! q->in_use && GET_MODE (q->slot) == BLKmode)
- 	      {
--		if (p->base_offset + p->full_size == q->base_offset)
-+		if (p->base_offset + p->full_size == q->base_offset &&
-+		    p->boundary_mark == q->boundary_mark)
- 		  {
- 		    /* Q comes after P; combine Q into P.  */
- 		    p->size += q->size;
- 		    p->full_size += q->full_size;
- 		    delete_q = 1;
- 		  }
--		else if (q->base_offset + q->full_size == p->base_offset)
-+		else if (q->base_offset + q->full_size == p->base_offset &&
-+			 p->boundary_mark == q->boundary_mark)
- 		  {
- 		    /* P comes after Q; combine P into Q.  */
- 		    q->size += p->size;
-@@ -1449,7 +1464,9 @@
-     }
- 
-   if (new == 0)
--    new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
-+    new = function ?
-+      assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func)
-+      :	assign_stack_local_for_pseudo_reg (decl_mode, GET_MODE_SIZE (decl_mode), 0);
- 
-   PUT_CODE (reg, MEM);
-   PUT_MODE (reg, decl_mode);
-@@ -3927,10 +3944,13 @@
- 		}
- 
- 	      /* Otherwise copy the new constant into a register and replace
--		 constant with that register.  */
-+		 constant with that register.
-+		 At the use of stack protection, stop to replace the frame
-+		 offset with a register.  */
- 	      temp = gen_reg_rtx (Pmode);
- 	      XEXP (x, 0) = new;
--	      if (validate_change (object, &XEXP (x, 1), temp, 0))
-+	      if (validate_change (object, &XEXP (x, 1), temp, 0)
-+		  && !flag_propolice_protection)
- 		emit_insn_before (gen_move_insn (temp, new_offset), object);
- 	      else
- 		{
-diff -Naur gcc-3.4.0.orig/gcc/gcse.c gcc-3.4.0.ssp/gcc/gcse.c
---- gcc-3.4.0.orig/gcc/gcse.c	2004-03-25 16:44:42.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/gcse.c	2004-11-08 01:51:38.000000000 +0000
-@@ -4176,9 +4176,13 @@
- 	continue;
- 
-       /* Find an assignment that sets reg_used and is available
--	 at the start of the block.  */
-+	 at the start of the block.
-+
-+         Skip the copy propagation not to eliminate the register that is
-+	 the duplicated pointer of a function argument. It is used for
-+	 the function argument protection.  */
-       set = find_avail_set (regno, insn);
--      if (! set)
-+      if (! set || SET_VOLATILE_P (set->expr))
- 	continue;
- 
-       pat = set->expr;
-diff -Naur gcc-3.4.0.orig/gcc/integrate.c gcc-3.4.0.ssp/gcc/integrate.c
---- gcc-3.4.0.orig/gcc/integrate.c	2004-01-23 23:36:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/integrate.c	2004-11-08 01:51:38.000000000 +0000
-@@ -393,6 +393,11 @@
-   /* These args would always appear unused, if not for this.  */
-   TREE_USED (copy) = 1;
- 
-+  /* The inlined variable is marked as INLINE not to change the location
-+     by stack protector.  */
-+  if (flag_propolice_protection && TREE_CODE (copy) == VAR_DECL)
-+    DECL_COPIED (copy) = 1;
-+
-   /* Set the context for the new declaration.  */
-   if (!DECL_CONTEXT (decl))
-     /* Globals stay global.  */
-@@ -1970,6 +1975,12 @@
- 
- 	      seq = get_insns ();
- 	      end_sequence ();
-+#ifdef ARGS_GROWS_DOWNWARD
-+	      /* Mark this pointer as the top of the argument
-+		 block. The pointer minus one is in the block.  */
-+	      if (flag_propolice_protection && GET_CODE (seq) == SET)
-+		RTX_INTEGRATED_P (SET_SRC (seq)) = 1;
-+#endif
- 	      emit_insn_after (seq, map->insns_at_start);
- 	      return temp;
- 	    }
-diff -Naur gcc-3.4.0.orig/gcc/loop.c gcc-3.4.0.ssp/gcc/loop.c
---- gcc-3.4.0.orig/gcc/loop.c	2004-02-14 14:46:03.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/loop.c	2004-11-08 01:51:38.000000000 +0000
-@@ -6513,6 +6513,14 @@
-   if (GET_CODE (*mult_val) == USE)
-     *mult_val = XEXP (*mult_val, 0);
- 
-+#ifndef FRAME_GROWS_DOWNWARD
-+  if (flag_propolice_protection
-+      && GET_CODE (*add_val) == PLUS
-+      && (XEXP (*add_val, 0) == frame_pointer_rtx
-+	  || XEXP (*add_val, 1) == frame_pointer_rtx))
-+    return 0;
-+#endif
-+
-   if (is_addr)
-     *pbenefit += address_cost (orig_x, addr_mode) - reg_address_cost;
-   else
-diff -Naur gcc-3.4.0.orig/gcc/mklibgcc.in gcc-3.4.0.ssp/gcc/mklibgcc.in
---- gcc-3.4.0.orig/gcc/mklibgcc.in	2003-11-21 04:53:09.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/mklibgcc.in	2004-11-08 01:51:38.000000000 +0000
-@@ -51,7 +51,7 @@
- 	_trampoline __main _absvsi2 _absvdi2 _addvsi3 _addvdi3
- 	_subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
- 	_ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab
--	_popcountsi2 _popcountdi2 _paritysi2 _paritydi2'
-+	_popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _stack_smash_handler'
- 
- # Disable SHLIB_LINK if shared libgcc not enabled.
- if [ "@enable_shared@" = "no" ]; then
-diff -Naur gcc-3.4.0.orig/gcc/optabs.c gcc-3.4.0.ssp/gcc/optabs.c
---- gcc-3.4.0.orig/gcc/optabs.c	2004-03-03 00:45:01.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/optabs.c	2004-11-08 01:51:38.000000000 +0000
-@@ -678,6 +678,27 @@
-   if (target)
-     target = protect_from_queue (target, 1);
- 
-+  /* Keep the frame and offset pattern at the use of stack protection.  */
-+  if (flag_propolice_protection
-+      && binoptab->code == PLUS
-+      && op0 == virtual_stack_vars_rtx
-+      && GET_CODE(op1) == CONST_INT)
-+    {
-+      int icode = (int) binoptab->handlers[(int) mode].insn_code;
-+      if (target)
-+	temp = target;
-+      else
-+	temp = gen_reg_rtx (mode);
-+
-+      if (! (*insn_data[icode].operand[0].predicate) (temp, mode)
-+	  || GET_CODE (temp) != REG)
-+	temp = gen_reg_rtx (mode);
-+
-+      emit_insn (gen_rtx_SET (VOIDmode, temp,
-+			      gen_rtx_PLUS (GET_MODE (op0), op0, op1)));
-+      return temp;
-+    }
-+
-   if (flag_force_mem)
-     {
-       /* Load duplicate non-volatile operands once.  */
-diff -Naur gcc-3.4.0.orig/gcc/opts.c gcc-3.4.0.ssp/gcc/opts.c
---- gcc-3.4.0.orig/gcc/opts.c	2004-02-18 00:09:04.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/opts.c	2004-11-08 01:51:38.000000000 +0000
-@@ -125,6 +125,9 @@
- bool warn_unused_variable;
- bool warn_unused_value;
- 
-+/* Warn when not issuing stack smashing protection for some reason */
-+bool warn_stack_protector;
-+
- /* Hack for cooperation between set_Wunused and set_Wextra.  */
- static bool maybe_warn_unused_parameter;
- 
-@@ -798,6 +801,10 @@
-       warn_unused_variable = value;
-       break;
- 
-+    case OPT_Wstack_protector:
-+      warn_stack_protector = value;
-+      break;
-+
-     case OPT_aux_info:
-     case OPT_aux_info_:
-       aux_info_file_name = arg;
-@@ -1361,6 +1368,14 @@
-       stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (arg));
-       break;
- 
-+    case OPT_fstack_protector:
-+      flag_propolice_protection = value;
-+      break;
-+
-+    case OPT_fstack_protector_all:
-+      flag_stack_protection = value;
-+      break;
-+
-     case OPT_fstrength_reduce:
-       flag_strength_reduce = value;
-       break;
-diff -Naur gcc-3.4.0.orig/gcc/protector.c gcc-3.4.0.ssp/gcc/protector.c
---- gcc-3.4.0.orig/gcc/protector.c	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/protector.c	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,2730 @@
-+/* RTL buffer overflow protection function for GNU C compiler
-+   Copyright (C) 2003 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC 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.
-+
-+GCC 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 GCC; see the file COPYING.  If not, write to the Free
-+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-+02111-1307, USA.  */
-+
-+/* This file contains several memory arrangement functions to protect
-+   the return address and the frame pointer of the stack
-+   from a stack-smashing attack. It also
-+   provides the function that protects pointer variables.  */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tm.h"
-+#include "machmode.h"
-+#include "real.h"
-+#include "rtl.h"
-+#include "tree.h"
-+#include "regs.h"
-+#include "flags.h"
-+#include "insn-config.h"
-+#include "insn-flags.h"
-+#include "expr.h"
-+#include "output.h"
-+#include "recog.h"
-+#include "hard-reg-set.h"
-+#include "except.h"
-+#include "function.h"
-+#include "toplev.h"
-+#include "tm_p.h"
-+#include "conditions.h"
-+#include "insn-attr.h"
-+#include "optabs.h"
-+#include "reload.h"
-+#include "protector.h"
-+
-+
-+/* Round a value to the lowest integer less than it that is a multiple of
-+   the required alignment.  Avoid using division in case the value is
-+   negative.  Assume the alignment is a power of two.  */
-+#define FLOOR_ROUND(VALUE,ALIGN) ((VALUE) & ~((ALIGN) - 1))
-+
-+/* Similar, but round to the next highest integer that meets the
-+   alignment.  */
-+#define CEIL_ROUND(VALUE,ALIGN)	(((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
-+
-+
-+/* Nonzero if function being compiled can define string buffers that may be
-+   damaged by the stack-smash attack.  */
-+static int current_function_defines_vulnerable_string;
-+static int current_function_defines_short_string;
-+static int current_function_has_variable_string;
-+static int current_function_defines_vsized_array;
-+static int current_function_is_inlinable;
-+
-+/* Nonzero if search_string_def finds the variable which contains an array.  */
-+static int is_array;
-+
-+/* Nonzero if search_string_def finds a byte-pointer variable,
-+   which may be assigned to alloca output.  */
-+static int may_have_alloca_pointer;
-+
-+static rtx guard_area, _guard;
-+static rtx function_first_insn, prologue_insert_point;
-+
-+/* Offset to end of sweeped area for gathering character arrays.  */
-+static HOST_WIDE_INT sweep_frame_offset;
-+
-+/* Offset to end of allocated area for instantiating pseudo registers.  */
-+static HOST_WIDE_INT push_allocated_offset = 0;
-+
-+/* Offset to end of assigned area for instantiating pseudo registers.  */
-+static HOST_WIDE_INT push_frame_offset = 0;
-+
-+/* Set to 1 after cse_not_expected becomes nonzero. it is used to identify
-+   which stage assign_stack_local_for_pseudo_reg is called from.  */
-+static int saved_cse_not_expected = 0;
-+
-+static int search_string_from_argsandvars (int);
-+static int search_string_from_local_vars (tree);
-+static int search_pointer_def (tree);
-+static int search_func_pointer (tree);
-+static int check_used_flag (rtx);
-+static void reset_used_flags_for_insns (rtx);
-+static void reset_used_flags_for_decls (tree);
-+static void reset_used_flags_of_plus (rtx);
-+static void rtl_prologue (rtx);
-+static void rtl_epilogue (rtx);
-+static void arrange_var_order (tree);
-+static void copy_args_for_protection (void);
-+static void sweep_string_variable (rtx, HOST_WIDE_INT);
-+static void sweep_string_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void sweep_string_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void sweep_string_use_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void sweep_string_in_operand (rtx, rtx *, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void move_arg_location (rtx, rtx, rtx, HOST_WIDE_INT);
-+static void change_arg_use_of_insns (rtx, rtx, rtx *, HOST_WIDE_INT);
-+static void change_arg_use_in_operand (rtx, rtx, rtx, rtx *, HOST_WIDE_INT);
-+static void validate_insns_of_varrefs (rtx);
-+static void validate_operand_of_varrefs (rtx, rtx *);
-+
-+/* Specify which size of buffers should be protected from a stack smashing
-+   attack. Because small buffers are not used in situations which may
-+   overflow buffer, the default size sets to the size of 64 bit register.  */
-+#ifndef SUSPICIOUS_BUF_SIZE
-+#define SUSPICIOUS_BUF_SIZE 8
-+#endif
-+
-+#define AUTO_BASEPTR(X) \
-+  (GET_CODE (X) == PLUS ? XEXP (X, 0) : X)
-+#define AUTO_OFFSET(X) \
-+  (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
-+#undef PARM_PASSED_IN_MEMORY
-+#define PARM_PASSED_IN_MEMORY(PARM) \
-+ (GET_CODE (DECL_INCOMING_RTL (PARM)) == MEM)
-+#define TREE_VISITED(NODE) ((NODE)->common.unused_0)
-+
-+/* Argument values for calling search_string_from_argsandvars.  */
-+#define CALL_FROM_PREPARE_STACK_PROTECTION	0
-+#define CALL_FROM_PUSH_FRAME			1
-+
-+
-+/* Prepare several stack protection instruments for the current function
-+   if the function has an array as a local variable, which may be vulnerable
-+   from a stack smashing attack, and it is not inlinable.
-+
-+   The overall steps are as follows;
-+   (1)search an array,
-+   (2)insert guard_area on the stack,
-+   (3)duplicate pointer arguments into local variables, and
-+   (4)arrange the location of local variables.  */
-+void
-+prepare_stack_protection (int inlinable)
-+{
-+  tree blocks = DECL_INITIAL (current_function_decl);
-+  current_function_is_inlinable = inlinable && !flag_no_inline;
-+  push_frame_offset = push_allocated_offset = 0;
-+  saved_cse_not_expected = 0;
-+
-+  /* Skip the protection if the function has no block
-+    or it is an inline function.  */
-+  if (current_function_is_inlinable)
-+    validate_insns_of_varrefs (get_insns ());
-+  if (! blocks || current_function_is_inlinable)
-+    return;
-+
-+  current_function_defines_vulnerable_string
-+    = search_string_from_argsandvars (CALL_FROM_PREPARE_STACK_PROTECTION);
-+
-+  if (current_function_defines_vulnerable_string
-+      || flag_stack_protection)
-+    {
-+      function_first_insn = get_insns ();
-+
-+      if (current_function_contains_functions)
-+	{
-+	  if (warn_stack_protector)
-+	    warning ("not protecting function: it contains functions");
-+	  return;
-+	}
-+
-+      /* Initialize recognition, indicating that volatile is OK.  */
-+      init_recog ();
-+
-+      sweep_frame_offset = 0;
-+	
-+#ifdef STACK_GROWS_DOWNWARD
-+      /* frame_offset: offset to end of allocated area of stack frame.
-+	 It is defined in the function.c.  */
-+
-+      /* the location must be before buffers.  */
-+      guard_area = assign_stack_local (BLKmode, UNITS_PER_GUARD, -1);
-+      PUT_MODE (guard_area, GUARD_m);
-+      MEM_VOLATILE_P (guard_area) = 1;
-+
-+#ifndef FRAME_GROWS_DOWNWARD
-+      sweep_frame_offset = frame_offset;
-+#endif
-+
-+      /* For making room for guard value, scan all insns and fix the offset
-+	 address of the variable that is based on frame pointer.
-+	 Scan all declarations of variables and fix the offset address
-+	 of the variable that is based on the frame pointer.  */
-+      sweep_string_variable (guard_area, UNITS_PER_GUARD);
-+
-+	
-+      /* the location of guard area moves to the beginning of stack frame.  */
-+      if (AUTO_OFFSET(XEXP (guard_area, 0)))
-+	XEXP (XEXP (guard_area, 0), 1)
-+	  = gen_rtx_CONST_INT (VOIDmode, sweep_frame_offset);
-+
-+
-+      /* Insert prologue rtl instructions.  */
-+      rtl_prologue (function_first_insn);
-+
-+      if (! current_function_has_variable_string)
-+	{
-+	  /* Generate argument saving instruction.  */
-+	  copy_args_for_protection ();
-+
-+#ifndef FRAME_GROWS_DOWNWARD
-+	  /* If frame grows upward, character arrays for protecting args
-+	     may copy to the top of the guard variable.
-+	     So sweep the guard variable again.  */
-+	  sweep_frame_offset = CEIL_ROUND (frame_offset,
-+					   BIGGEST_ALIGNMENT / BITS_PER_UNIT);
-+	  sweep_string_variable (guard_area, UNITS_PER_GUARD);
-+#endif
-+	}
-+      /* Variable can't be protected from the overflow of variable length
-+	 buffer. But variable reordering is still effective against
-+	 the overflow of fixed size character arrays.  */
-+      else if (warn_stack_protector)
-+	warning ("not protecting variables: it has a variable length buffer");
-+#endif
-+#ifndef FRAME_GROWS_DOWNWARD
-+      if (STARTING_FRAME_OFFSET == 0)
-+	{
-+	  /* This part may be only for alpha.  */
-+	  push_allocated_offset = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
-+	  assign_stack_local (BLKmode, push_allocated_offset, -1);
-+	  sweep_frame_offset = frame_offset;
-+	  sweep_string_variable (const0_rtx, -push_allocated_offset);
-+	  sweep_frame_offset = AUTO_OFFSET (XEXP (guard_area, 0));
-+	}
-+#endif
-+
-+      /* Arrange the order of local variables.  */
-+      arrange_var_order (blocks);
-+
-+#ifdef STACK_GROWS_DOWNWARD
-+      /* Insert epilogue rtl instructions.  */
-+      rtl_epilogue (get_last_insn ());
-+#endif
-+      init_recog_no_volatile ();
-+    }
-+  else if (current_function_defines_short_string
-+	   && warn_stack_protector)
-+    warning ("not protecting function: buffer is less than %d bytes long",
-+	     SUSPICIOUS_BUF_SIZE);
-+}
-+
-+/*
-+  Search string from arguments and local variables.
-+   caller: CALL_FROM_PREPARE_STACK_PROTECTION (0)
-+	   CALL_FROM_PUSH_FRAME (1)
-+*/
-+static int
-+search_string_from_argsandvars (int caller)
-+{
-+  tree blocks, parms;
-+  int string_p;
-+
-+  /* Saves a latest search result as a cached infomation.  */
-+  static tree __latest_search_decl = 0;
-+  static int  __latest_search_result = FALSE;
-+
-+  if (__latest_search_decl == current_function_decl)
-+    return __latest_search_result;
-+  else
-+    if (caller == CALL_FROM_PUSH_FRAME)
-+      return FALSE;
-+
-+  __latest_search_decl = current_function_decl;
-+  __latest_search_result = TRUE;
-+  
-+  current_function_defines_short_string = FALSE;
-+  current_function_has_variable_string = FALSE;
-+  current_function_defines_vsized_array = FALSE;
-+  may_have_alloca_pointer = FALSE;
-+
-+  /* Search a string variable from local variables.  */
-+  blocks = DECL_INITIAL (current_function_decl);
-+  string_p = search_string_from_local_vars (blocks);
-+
-+  if (! current_function_defines_vsized_array
-+      && may_have_alloca_pointer
-+      && current_function_calls_alloca)
-+    {
-+      current_function_has_variable_string = TRUE;
-+      return TRUE;
-+    }
-+
-+  if (string_p)
-+    return TRUE;
-+
-+#ifdef STACK_GROWS_DOWNWARD
-+  /* Search a string variable from arguments.  */
-+  parms = DECL_ARGUMENTS (current_function_decl);
-+
-+  for (; parms; parms = TREE_CHAIN (parms))
-+    if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
-+      {
-+	if (PARM_PASSED_IN_MEMORY (parms))
-+	  {
-+	    string_p = search_string_def (TREE_TYPE(parms));
-+	    if (string_p)
-+	      return TRUE;
-+	  }
-+      }
-+#endif
-+
-+  __latest_search_result = FALSE;
-+  return FALSE;
-+}
-+
-+
-+/* Search string from local variables in the specified scope.  */
-+static int
-+search_string_from_local_vars (tree block)
-+{
-+  tree types;
-+  int found = FALSE;
-+
-+  while (block && TREE_CODE(block)==BLOCK)
-+    {
-+      for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
-+	{
-+	  /* Skip the declaration that refers an external variable.  */
-+	  /* name: types.decl.name.identifier.id                     */
-+	  if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
-+	      && TREE_CODE (types) == VAR_DECL
-+	      && ! DECL_ARTIFICIAL (types)
-+	      && DECL_RTL_SET_P (types)
-+	      && GET_CODE (DECL_RTL (types)) == MEM
-+
-+	      && search_string_def (TREE_TYPE (types)))
-+	    {
-+	      rtx home = DECL_RTL (types);
-+
-+	      if (GET_CODE (home) == MEM
-+		  && (GET_CODE (XEXP (home, 0)) == MEM
-+		      || (GET_CODE (XEXP (home, 0)) == REG
-+			  && XEXP (home, 0) != virtual_stack_vars_rtx
-+			  && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
-+			  && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
-+#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
-+			  && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
-+#endif
-+			  )))
-+		/* If the value is indirect by memory or by a register
-+		   that isn't the frame pointer then it means the object is
-+		   variable-sized and address through
-+		   that register or stack slot.
-+		   The protection has no way to hide pointer variables
-+		   behind the array, so all we can do is staying
-+		   the order of variables and arguments.  */
-+		{
-+		  current_function_has_variable_string = TRUE;
-+		}
-+	    
-+	      /* Found character array.  */
-+	      found = TRUE;
-+	    }
-+	}
-+
-+      if (search_string_from_local_vars (BLOCK_SUBBLOCKS (block)))
-+	{
-+	  found = TRUE;
-+	}
-+
-+      block = BLOCK_CHAIN (block);
-+    }
-+    
-+  return found;
-+}
-+
-+
-+/* Search a character array from the specified type tree.  */
-+int
-+search_string_def (tree type)
-+{
-+  tree tem;
-+    
-+  if (! type)
-+    return FALSE;
-+
-+  switch (TREE_CODE (type))
-+    {
-+    case ARRAY_TYPE:
-+      /* Check if the array is a variable-sized array.  */
-+      if (TYPE_DOMAIN (type) == 0
-+	  || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
-+	      && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
-+	current_function_defines_vsized_array = TRUE;
-+
-+      /* Check if the array is related to char array.  */
-+      if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
-+	  || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
-+	  || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
-+	{
-+	  /* Check if the string is a variable string.  */
-+	  if (TYPE_DOMAIN (type) == 0
-+	      || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
-+		  && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
-+	    return TRUE;
-+
-+	  /* Check if the string size is greater than SUSPICIOUS_BUF_SIZE.  */
-+	  if (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
-+	      && (TREE_INT_CST_LOW(TYPE_MAX_VALUE(TYPE_DOMAIN(type)))+1
-+		  >= SUSPICIOUS_BUF_SIZE))
-+	    return TRUE;
-+
-+	  current_function_defines_short_string = TRUE;
-+	}
-+      
-+      /* to protect every functions, sweep any arrays to the frame top.  */
-+      is_array = TRUE;
-+
-+      return search_string_def(TREE_TYPE(type));
-+	
-+    case UNION_TYPE:
-+    case QUAL_UNION_TYPE:
-+    case RECORD_TYPE:
-+      /* Check if each field has character arrays.  */
-+      for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
-+	{
-+	  /* Omit here local type decls until we know how to support them. */
-+	  if ((TREE_CODE (tem) == TYPE_DECL)
-+	      || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
-+	    continue;
-+
-+	  if (search_string_def(TREE_TYPE(tem)))
-+	    return TRUE;
-+	}
-+      break;
-+	
-+    case POINTER_TYPE:
-+      /* Check if pointer variables, which may be a pointer assigned 
-+	 by alloca function call, are declared.  */
-+      if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
-+	  || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
-+	  || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
-+	may_have_alloca_pointer = TRUE;
-+      break;
-+
-+    case REFERENCE_TYPE:
-+    case OFFSET_TYPE:
-+    default:
-+      break;
-+    }
-+
-+  return FALSE;
-+}
-+
-+
-+/* Examine whether the input contains frame pointer addressing.  */
-+int
-+contains_fp (rtx op)
-+{
-+  enum rtx_code code;
-+  rtx x;
-+  int i, j;
-+  const char *fmt;
-+
-+  x = op;
-+  if (x == 0)
-+    return FALSE;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case REG:
-+    case ADDRESSOF:
-+      return FALSE;
-+
-+    case MEM:
-+      /* This case is not generated at the stack protection.
-+	 see plus_constant_wide and simplify_plus_minus function.  */
-+      if (XEXP (x, 0) == virtual_stack_vars_rtx)
-+	abort ();
-+      
-+    case PLUS:
-+      if (XEXP (x, 0) == virtual_stack_vars_rtx
-+	  && GET_CODE (XEXP (x, 1)) == CONST_INT)
-+	return TRUE;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      {
-+	if (contains_fp (XEXP (x, i)))
-+	  return TRUE;
-+      }
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	if (contains_fp (XVECEXP (x, i, j)))
-+	  return TRUE;
-+
-+  return FALSE;
-+}
-+
-+
-+/* Examine whether the input contains any pointer.  */
-+static int
-+search_pointer_def (tree type)
-+{
-+  tree tem;
-+    
-+  if (! type)
-+    return FALSE;
-+
-+  switch (TREE_CODE (type))
-+    {
-+    case UNION_TYPE:
-+    case QUAL_UNION_TYPE:
-+    case RECORD_TYPE:
-+      /* Check if each field has a pointer.  */
-+      for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
-+	{
-+	  if ((TREE_CODE (tem) == TYPE_DECL)
-+	      || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
-+	    continue;
-+
-+	  if (search_pointer_def (TREE_TYPE(tem)))
-+	    return TRUE;
-+	}
-+      break;
-+
-+    case ARRAY_TYPE:
-+      return search_pointer_def (TREE_TYPE(type));
-+	
-+    case POINTER_TYPE:
-+    case REFERENCE_TYPE:
-+    case OFFSET_TYPE:
-+      if (TYPE_READONLY (TREE_TYPE (type)))
-+	{
-+	  /* If this pointer contains function pointer,
-+	     it should be protected.  */
-+	  return search_func_pointer (TREE_TYPE (type));
-+	}
-+      return TRUE;
-+	
-+    default:
-+      break;
-+    }
-+
-+  return FALSE;
-+}
-+
-+
-+/* Examine whether the input contains function pointer.  */
-+static int
-+search_func_pointer (tree type)
-+{
-+  tree tem;
-+    
-+  if (! type)
-+    return FALSE;
-+
-+  switch (TREE_CODE (type))
-+    {
-+    case UNION_TYPE:
-+    case QUAL_UNION_TYPE:
-+    case RECORD_TYPE:
-+	if (! TREE_VISITED (type))
-+	  {
-+	    /* Mark the type as having been visited already.  */
-+	    TREE_VISITED (type) = 1;
-+
-+	    /* Check if each field has a function pointer.  */
-+	    for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
-+	      {
-+		if (TREE_CODE (tem) == FIELD_DECL
-+		    && search_func_pointer (TREE_TYPE(tem)))
-+		  {
-+		    TREE_VISITED (type) = 0;
-+		    return TRUE;
-+		  }
-+	      }
-+	    
-+	    TREE_VISITED (type) = 0;
-+	  }
-+	break;
-+
-+    case ARRAY_TYPE:
-+      return search_func_pointer (TREE_TYPE(type));
-+	
-+    case POINTER_TYPE:
-+    case REFERENCE_TYPE:
-+    case OFFSET_TYPE:
-+      if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
-+	return TRUE;
-+      return search_func_pointer (TREE_TYPE(type));
-+	
-+    default:
-+      break;
-+    }
-+
-+  return FALSE;
-+}
-+
-+
-+/* Check whether the specified rtx contains PLUS rtx with used flag.  */
-+static int
-+check_used_flag (rtx x)
-+{
-+  register int i, j;
-+  register enum rtx_code code;
-+  register const char *format_ptr;
-+
-+  if (x == 0)
-+    return FALSE;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case REG:
-+    case QUEUED:
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+      return FALSE;
-+
-+    case PLUS:
-+      if (x->used)
-+	return TRUE;
-+
-+    default:
-+      break;
-+    }
-+
-+  format_ptr = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++)
-+    {
-+      switch (*format_ptr++)
-+	{
-+	case 'e':
-+	  if (check_used_flag (XEXP (x, i)))
-+	    return TRUE;
-+	  break;
-+
-+	case 'E':
-+	  for (j = 0; j < XVECLEN (x, i); j++)
-+	    if (check_used_flag (XVECEXP (x, i, j)))
-+	      return TRUE;
-+	  break;
-+	}
-+    }
-+
-+  return FALSE;
-+}
-+
-+
-+/* Reset used flag of every insns after the spcecified insn.  */
-+static void
-+reset_used_flags_for_insns (rtx insn)
-+{
-+  int i, j;
-+  enum rtx_code code;
-+  const char *format_ptr;
-+
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	|| GET_CODE (insn) == CALL_INSN)
-+      {
-+	code = GET_CODE (insn);
-+	insn->used = 0;
-+	format_ptr = GET_RTX_FORMAT (code);
-+
-+	for (i = 0; i < GET_RTX_LENGTH (code); i++)
-+	  {
-+	    switch (*format_ptr++)
-+	      {
-+	      case 'e':
-+		reset_used_flags_of_plus (XEXP (insn, i));
-+		break;
-+			
-+	      case 'E':
-+		for (j = 0; j < XVECLEN (insn, i); j++)
-+		  reset_used_flags_of_plus (XVECEXP (insn, i, j));
-+		break;
-+	      }
-+	  }
-+      }
-+}
-+
-+
-+/* Reset used flag of every variables in the specified block.  */
-+static void
-+reset_used_flags_for_decls (tree block)
-+{
-+  tree types;
-+  rtx home;
-+
-+  while (block && TREE_CODE(block)==BLOCK)
-+    {
-+      types = BLOCK_VARS(block);
-+	
-+      for (types= BLOCK_VARS(block); types; types = TREE_CHAIN(types))
-+	{
-+	  /* Skip the declaration that refers an external variable and
-+	     also skip an global variable.  */
-+	  if (! DECL_EXTERNAL (types))
-+	    {
-+	      if (! DECL_RTL_SET_P (types))
-+		continue;
-+	      home = DECL_RTL (types);
-+
-+	      if (GET_CODE (home) == MEM
-+		  && GET_CODE (XEXP (home, 0)) == PLUS
-+		  && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
-+		{
-+		  XEXP (home, 0)->used = 0;
-+		}
-+	    }
-+	}
-+
-+      reset_used_flags_for_decls (BLOCK_SUBBLOCKS (block));
-+
-+      block = BLOCK_CHAIN (block);
-+    }
-+}
-+
-+
-+/* Reset the used flag of every PLUS rtx derived from the specified rtx.  */
-+static void
-+reset_used_flags_of_plus (rtx x)
-+{
-+  int i, j;
-+  enum rtx_code code;
-+  const char *format_ptr;
-+
-+  if (x == 0)
-+    return;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+      /* These types may be freely shared so we needn't do any resetting
-+	 for them.  */
-+    case REG:
-+    case QUEUED:
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+      return;
-+
-+    case INSN:
-+    case JUMP_INSN:
-+    case CALL_INSN:
-+    case NOTE:
-+    case LABEL_REF:
-+    case BARRIER:
-+      /* The chain of insns is not being copied.  */
-+      return;
-+      
-+    case PLUS:
-+      x->used = 0;
-+      break;
-+
-+    case CALL_PLACEHOLDER:
-+      reset_used_flags_for_insns (XEXP (x, 0));
-+      reset_used_flags_for_insns (XEXP (x, 1));
-+      reset_used_flags_for_insns (XEXP (x, 2));
-+      break;
-+
-+    default:
-+      break;
-+    }
-+
-+  format_ptr = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++)
-+    {
-+      switch (*format_ptr++)
-+	{
-+	case 'e':
-+	  reset_used_flags_of_plus (XEXP (x, i));
-+	  break;
-+
-+	case 'E':
-+	  for (j = 0; j < XVECLEN (x, i); j++)
-+	    reset_used_flags_of_plus (XVECEXP (x, i, j));
-+	  break;
-+	}
-+    }
-+}
-+
-+
-+/* Generate the prologue insns of the protector into the specified insn.  */
-+static void
-+rtl_prologue (rtx insn)
-+{
-+#if defined(INIT_SECTION_ASM_OP) && !defined(INVOKE__main)
-+#undef HAS_INIT_SECTION
-+#define HAS_INIT_SECTION
-+#endif
-+
-+  rtx _val;
-+
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == NOTE
-+	&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
-+      break;
-+  
-+#if !defined (HAS_INIT_SECTION)
-+  /* If this function is `main', skip a call to `__main'
-+     to run guard instruments after global initializers, etc.  */
-+  if (DECL_NAME (current_function_decl)
-+      && MAIN_NAME_P (DECL_NAME (current_function_decl))
-+      && DECL_CONTEXT (current_function_decl) == NULL_TREE)
-+    {
-+      rtx fbinsn = insn;
-+      for (; insn; insn = NEXT_INSN (insn))
-+	if (GET_CODE (insn) == NOTE
-+	    && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG)
-+	  break;
-+      if (insn == 0)
-+	insn = fbinsn;
-+    }
-+#endif
-+
-+  /* Mark the next insn of FUNCTION_BEG insn.  */
-+  prologue_insert_point = NEXT_INSN (insn);
-+		
-+  start_sequence ();
-+
-+  _guard = gen_rtx_MEM (GUARD_m, gen_rtx_SYMBOL_REF (Pmode, "__guard"));
-+  emit_move_insn ( guard_area, _guard);
-+
-+  _val = get_insns ();
-+  end_sequence ();
-+
-+  emit_insn_before (_val, prologue_insert_point);
-+}
-+
-+
-+/* Generate the epilogue insns of the protector into the specified insn.  */
-+static void
-+rtl_epilogue (rtx insn)
-+{
-+  rtx if_false_label;
-+  rtx _val;
-+  rtx funcname;
-+  tree funcstr;
-+  int  flag_have_return = FALSE;
-+		
-+  start_sequence ();
-+
-+#ifdef HAVE_return
-+  if (HAVE_return)
-+    {
-+      rtx insn;
-+      return_label = gen_label_rtx ();
-+      
-+      for (insn = prologue_insert_point; insn; insn = NEXT_INSN (insn))
-+	if (GET_CODE (insn) == JUMP_INSN
-+	    && GET_CODE (PATTERN (insn)) == RETURN
-+	    && GET_MODE (PATTERN (insn)) == VOIDmode)
-+	  {
-+	    rtx pat = gen_rtx_SET (VOIDmode,
-+				   pc_rtx,
-+				   gen_rtx_LABEL_REF (VOIDmode,
-+						      return_label));
-+	    PATTERN (insn) = pat;
-+	    flag_have_return = TRUE;
-+	  }
-+
-+
-+      emit_label (return_label);
-+    }
-+#endif
-+
-+  /*                                          if (guard_area != _guard) */
-+  compare_from_rtx (guard_area, _guard, NE, 0, GUARD_m, NULL_RTX);
-+
-+  if_false_label = gen_label_rtx ();		/* { */
-+  emit_jump_insn ( gen_beq(if_false_label));
-+
-+  /* generate string for the current function name */
-+  funcstr = build_string (strlen(current_function_name ())+1,
-+			  current_function_name ());
-+  TREE_TYPE (funcstr) = build_array_type (char_type_node, 0);
-+  funcname = output_constant_def (funcstr, 1);
-+
-+  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__stack_smash_handler"),
-+		     0, VOIDmode, 2,
-+                     XEXP (funcname, 0), Pmode, guard_area, GUARD_m);
-+
-+  /* generate RTL to return from the current function */
-+		
-+  emit_barrier ();				/* } */
-+  emit_label (if_false_label);
-+
-+  /* generate RTL to return from the current function */
-+  if (DECL_RTL_SET_P (DECL_RESULT (current_function_decl)))
-+    use_return_register ();
-+
-+#ifdef HAVE_return
-+  if (HAVE_return && flag_have_return)
-+    {
-+      emit_jump_insn (gen_return ());
-+      emit_barrier ();
-+    }
-+#endif
-+  
-+  _val = get_insns ();
-+  end_sequence ();
-+
-+  emit_insn_after (_val, insn);
-+}
-+
-+
-+/* For every variable which type is character array, moves its location
-+   in the stack frame to the sweep_frame_offset position.  */
-+static void
-+arrange_var_order (tree block)
-+{
-+  tree types;
-+  HOST_WIDE_INT offset;
-+    
-+  while (block && TREE_CODE(block)==BLOCK)
-+    {
-+      /* arrange the location of character arrays in depth first.  */
-+      arrange_var_order (BLOCK_SUBBLOCKS (block));
-+      
-+      for (types = BLOCK_VARS (block); types; types = TREE_CHAIN(types))
-+	{
-+	  /* Skip the declaration that refers an external variable.  */
-+	  if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
-+	      && TREE_CODE (types) == VAR_DECL
-+	      && ! DECL_ARTIFICIAL (types)
-+	      && DECL_RTL_SET_P (types)
-+	      && GET_CODE (DECL_RTL (types)) == MEM
-+	      && GET_MODE (DECL_RTL (types)) == BLKmode
-+
-+	      && (is_array=0,
-+		  search_string_def (TREE_TYPE (types))
-+		  || (! current_function_defines_vulnerable_string && is_array)))
-+	    {
-+	      rtx home = DECL_RTL (types);
-+
-+	      if (!(GET_CODE (home) == MEM
-+		    && (GET_CODE (XEXP (home, 0)) == MEM
-+			|| (GET_CODE (XEXP (home, 0)) == REG
-+			    && XEXP (home, 0) != virtual_stack_vars_rtx
-+			    && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
-+			    && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
-+#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
-+			    && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
-+#endif
-+			    ))))
-+		{
-+		  /* Found a string variable.  */
-+		  HOST_WIDE_INT var_size =
-+		    ((TREE_INT_CST_LOW (DECL_SIZE (types)) + BITS_PER_UNIT - 1)
-+		     / BITS_PER_UNIT);
-+
-+		  /* Confirmed it is BLKmode.  */
-+		  int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
-+		  var_size = CEIL_ROUND (var_size, alignment);
-+
-+		  /* Skip the variable if it is top of the region
-+		     specified by sweep_frame_offset.  */
-+		  offset = AUTO_OFFSET (XEXP (DECL_RTL (types), 0));
-+		  if (offset == sweep_frame_offset - var_size)
-+		    sweep_frame_offset -= var_size;
-+		      
-+		  else if (offset < sweep_frame_offset - var_size)
-+		    sweep_string_variable (DECL_RTL (types), var_size);
-+		}
-+	    }
-+	}
-+
-+      block = BLOCK_CHAIN (block);
-+    }
-+}
-+
-+
-+/* To protect every pointer argument and move character arrays in the argument,
-+   Copy those variables to the top of the stack frame and move the location of
-+   character arrays to the posion of sweep_frame_offset.  */
-+static void
-+copy_args_for_protection (void)
-+{
-+  tree parms = DECL_ARGUMENTS (current_function_decl);
-+  rtx temp_rtx;
-+
-+  parms = DECL_ARGUMENTS (current_function_decl);
-+  for (; parms; parms = TREE_CHAIN (parms))
-+    if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
-+      {
-+	if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
-+	  {
-+	    int string_p;
-+	    rtx seq;
-+
-+	    string_p = search_string_def (TREE_TYPE(parms));
-+
-+	    /* Check if it is a candidate to move.  */
-+	    if (string_p || search_pointer_def (TREE_TYPE (parms)))
-+	      {
-+		int arg_size
-+		  = ((TREE_INT_CST_LOW (DECL_SIZE (parms)) + BITS_PER_UNIT - 1)
-+		     / BITS_PER_UNIT);
-+		tree passed_type = DECL_ARG_TYPE (parms);
-+		tree nominal_type = TREE_TYPE (parms);
-+		
-+		start_sequence ();
-+
-+		if (GET_CODE (DECL_RTL (parms)) == REG)
-+		  {
-+		    rtx safe = 0;
-+		    
-+		    change_arg_use_of_insns (prologue_insert_point,
-+					     DECL_RTL (parms), &safe, 0);
-+		    if (safe)
-+		      {
-+			/* Generate codes for copying the content.  */
-+			rtx movinsn = emit_move_insn (safe, DECL_RTL (parms));
-+		    
-+			/* Avoid register elimination in gcse.c.  */
-+			PATTERN (movinsn)->volatil = 1;
-+			
-+			/* Save debugger info.  */
-+			SET_DECL_RTL (parms, safe);
-+		      }
-+		  }
-+		else if (GET_CODE (DECL_RTL (parms)) == MEM
-+			 && GET_CODE (XEXP (DECL_RTL (parms), 0)) == ADDRESSOF)
-+		  {
-+		    rtx movinsn;
-+		    rtx safe = gen_reg_rtx (GET_MODE (DECL_RTL (parms)));
-+
-+		    /* Generate codes for copying the content.  */
-+		    movinsn = emit_move_insn (safe, DECL_INCOMING_RTL (parms));
-+		    /* Avoid register elimination in gcse.c.  */
-+		    PATTERN (movinsn)->volatil = 1;
-+
-+		    /* Change the addressof information to the newly
-+		       allocated pseudo register.  */
-+		    emit_move_insn (DECL_RTL (parms), safe);
-+
-+		    /* Save debugger info.  */
-+		    SET_DECL_RTL (parms, safe);
-+		  }
-+			
-+		/* See if the frontend wants to pass this by invisible
-+		   reference.  */
-+		else if (passed_type != nominal_type
-+			 && POINTER_TYPE_P (passed_type)
-+			 && TREE_TYPE (passed_type) == nominal_type)
-+		  {
-+		    rtx safe = 0, orig = XEXP (DECL_RTL (parms), 0);
-+
-+		    change_arg_use_of_insns (prologue_insert_point,
-+					     orig, &safe, 0);
-+		    if (safe)
-+		      {
-+			/* Generate codes for copying the content.  */
-+			rtx movinsn = emit_move_insn (safe, orig);
-+		    
-+			/* Avoid register elimination in gcse.c  */
-+			PATTERN (movinsn)->volatil = 1;
-+			
-+			/* Save debugger info.  */
-+			SET_DECL_RTL (parms, safe);
-+		      }
-+		  }
-+
-+		else
-+		  {
-+		    /* Declare temporary local variable for parms.  */
-+		    temp_rtx
-+		      = assign_stack_local (DECL_MODE (parms), arg_size,
-+					    DECL_MODE (parms) == BLKmode ?
-+					    -1 : 0);
-+		    
-+		    MEM_IN_STRUCT_P (temp_rtx)
-+		      = AGGREGATE_TYPE_P (TREE_TYPE (parms));
-+		    set_mem_alias_set (temp_rtx, get_alias_set (parms));
-+
-+		    /* Generate codes for copying the content.  */
-+		    store_expr (parms, temp_rtx, 0);
-+
-+		    /* Change the reference for each instructions.  */
-+		    move_arg_location (prologue_insert_point, DECL_RTL (parms),
-+				       temp_rtx, arg_size);
-+
-+		    /* Change the location of parms variable.  */
-+		    SET_DECL_RTL (parms, temp_rtx);
-+		  }
-+
-+		seq = get_insns ();
-+		end_sequence ();
-+		emit_insn_before (seq, prologue_insert_point);
-+
-+#ifdef FRAME_GROWS_DOWNWARD
-+		/* Process the string argument.  */
-+		if (string_p && DECL_MODE (parms) == BLKmode)
-+		  {
-+		    int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
-+		    arg_size = CEIL_ROUND (arg_size, alignment);
-+			
-+		    /* Change the reference for each instructions.  */
-+		    sweep_string_variable (DECL_RTL (parms), arg_size);
-+		  }
-+#endif
-+	      }
-+	  }
-+      }
-+}
-+
-+
-+/* Sweep a string variable to the positon of sweep_frame_offset in the 
-+   stack frame, that is a last position of string variables.  */
-+static void
-+sweep_string_variable (rtx sweep_var, HOST_WIDE_INT var_size)
-+{
-+  HOST_WIDE_INT sweep_offset;
-+
-+  switch (GET_CODE (sweep_var))
-+    {
-+    case MEM:
-+      if (GET_CODE (XEXP (sweep_var, 0)) == ADDRESSOF
-+	  && GET_CODE (XEXP (XEXP (sweep_var, 0), 0)) == REG)
-+	return;
-+      sweep_offset = AUTO_OFFSET(XEXP (sweep_var, 0));
-+      break;
-+    case CONST_INT:
-+      sweep_offset = INTVAL (sweep_var);
-+      break;
-+    default:
-+      abort ();
-+    }
-+
-+  /* Scan all declarations of variables and fix the offset address of
-+     the variable based on the frame pointer.  */
-+  sweep_string_in_decls (DECL_INITIAL (current_function_decl),
-+			 sweep_offset, var_size);
-+
-+  /* Scan all argument variable and fix the offset address based on
-+     the frame pointer.  */
-+  sweep_string_in_args (DECL_ARGUMENTS (current_function_decl),
-+			sweep_offset, var_size);
-+
-+  /* For making room for sweep variable, scan all insns and
-+     fix the offset address of the variable that is based on frame pointer.  */
-+  sweep_string_use_of_insns (function_first_insn, sweep_offset, var_size);
-+
-+
-+  /* Clear all the USED bits in operands of all insns and declarations of
-+     local variables.  */
-+  reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
-+  reset_used_flags_for_insns (function_first_insn);
-+
-+  sweep_frame_offset -= var_size;
-+}
-+
-+
-+
-+/* Move an argument to the local variable addressed by frame_offset.  */
-+static void
-+move_arg_location (rtx insn, rtx orig, rtx new, HOST_WIDE_INT var_size)
-+{
-+  /* For making room for sweep variable, scan all insns and
-+     fix the offset address of the variable that is based on frame pointer.  */
-+  change_arg_use_of_insns (insn, orig, &new, var_size);
-+
-+
-+  /* Clear all the USED bits in operands of all insns and declarations
-+     of local variables.  */
-+  reset_used_flags_for_insns (insn);
-+}
-+
-+
-+/* Sweep character arrays declared as local variable.  */
-+static void
-+sweep_string_in_decls (tree block, HOST_WIDE_INT sweep_offset,
-+		       HOST_WIDE_INT sweep_size)
-+{
-+  tree types;
-+  HOST_WIDE_INT offset;
-+  rtx home;
-+
-+  while (block && TREE_CODE(block)==BLOCK)
-+    {
-+      for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
-+	{
-+	  /* Skip the declaration that refers an external variable and
-+	     also skip an global variable.  */
-+	  if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)) {
-+	    
-+	    if (! DECL_RTL_SET_P (types))
-+	      continue;
-+
-+	    home = DECL_RTL (types);
-+
-+	    /* Process for static local variable.  */
-+	    if (GET_CODE (home) == MEM
-+		&& GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
-+	      continue;
-+
-+	    if (GET_CODE (home) == MEM
-+		&& XEXP (home, 0) == virtual_stack_vars_rtx)
-+	      {
-+		offset = 0;
-+		
-+		/* the operand related to the sweep variable.  */
-+		if (sweep_offset <= offset
-+		    && offset < sweep_offset + sweep_size)
-+		  {
-+		    offset = sweep_frame_offset - sweep_size - sweep_offset;
-+
-+		    XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
-+						    offset);
-+		    XEXP (home, 0)->used = 1;
-+		  }
-+		else if (sweep_offset <= offset
-+			 && offset < sweep_frame_offset)
-+		  {
-+		    /* the rest of variables under sweep_frame_offset,
-+		       shift the location.  */
-+		    XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
-+						    -sweep_size);
-+		    XEXP (home, 0)->used = 1;
-+		  }
-+	      }
-+		
-+	    if (GET_CODE (home) == MEM
-+		&& GET_CODE (XEXP (home, 0)) == MEM)
-+	      {
-+		/* Process for dynamically allocated array.  */
-+		home = XEXP (home, 0);
-+	      }
-+		
-+	    if (GET_CODE (home) == MEM
-+		&& GET_CODE (XEXP (home, 0)) == PLUS
-+		&& XEXP (XEXP (home, 0), 0) == virtual_stack_vars_rtx
-+		&& GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
-+	      {
-+		if (! XEXP (home, 0)->used)
-+		  {
-+		    offset = AUTO_OFFSET(XEXP (home, 0));
-+
-+		    /* the operand related to the sweep variable.  */
-+		    if (sweep_offset <= offset
-+			&& offset < sweep_offset + sweep_size)
-+		      {
-+
-+			offset
-+			  += sweep_frame_offset - sweep_size - sweep_offset;
-+			XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
-+								      offset);
-+
-+			/* mark */
-+			XEXP (home, 0)->used = 1;
-+		      }
-+		    else if (sweep_offset <= offset
-+			     && offset < sweep_frame_offset)
-+		      {
-+			/* the rest of variables under sweep_frame_offset,
-+			   so shift the location.  */
-+
-+			XEXP (XEXP (home, 0), 1)
-+			  = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
-+
-+			/* mark */
-+			XEXP (home, 0)->used = 1;
-+		      }
-+		  }
-+	      }
-+	  }
-+	}
-+
-+      sweep_string_in_decls (BLOCK_SUBBLOCKS (block),
-+			     sweep_offset, sweep_size);
-+
-+      block = BLOCK_CHAIN (block);
-+    }
-+}
-+
-+
-+/* Sweep character arrays declared as argument.  */
-+static void
-+sweep_string_in_args (tree parms, HOST_WIDE_INT sweep_offset,
-+		      HOST_WIDE_INT sweep_size)
-+{
-+  rtx home;
-+  HOST_WIDE_INT offset;
-+    
-+  for (; parms; parms = TREE_CHAIN (parms))
-+    if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
-+      {
-+	if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
-+	  {
-+	    home = DECL_INCOMING_RTL (parms);
-+
-+	    if (XEXP (home, 0)->used)
-+	      continue;
-+
-+	    offset = AUTO_OFFSET(XEXP (home, 0));
-+
-+	    /* the operand related to the sweep variable.  */
-+	    if (AUTO_BASEPTR (XEXP (home, 0)) == virtual_stack_vars_rtx)
-+	      {
-+		if (sweep_offset <= offset
-+		    && offset < sweep_offset + sweep_size)
-+		  {
-+		    offset += sweep_frame_offset - sweep_size - sweep_offset;
-+		    XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
-+								  offset);
-+
-+		    /* mark */
-+		    XEXP (home, 0)->used = 1;
-+		  }
-+		else if (sweep_offset <= offset
-+			 && offset < sweep_frame_offset)
-+		  {
-+		    /* the rest of variables under sweep_frame_offset,
-+		       shift the location.  */
-+		    XEXP (XEXP (home, 0), 1)
-+		      = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
-+
-+		    /* mark */
-+		    XEXP (home, 0)->used = 1;
-+		  }
-+	      }
-+	  }
-+      }
-+}
-+
-+
-+/* Set to 1 when the instruction contains virtual registers.  */
-+static int has_virtual_reg;
-+
-+/* Sweep the specified character array for every insns. The array starts from
-+   the sweep_offset and its size is sweep_size.  */
-+static void
-+sweep_string_use_of_insns (rtx insn, HOST_WIDE_INT sweep_offset,
-+			   HOST_WIDE_INT sweep_size)
-+{
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	|| GET_CODE (insn) == CALL_INSN)
-+      {
-+	has_virtual_reg = FALSE;
-+	sweep_string_in_operand (insn, &PATTERN (insn),
-+				 sweep_offset, sweep_size);
-+	sweep_string_in_operand (insn, &REG_NOTES (insn),
-+				 sweep_offset, sweep_size);
-+      }
-+}
-+
-+
-+/* Sweep the specified character array, which starts from the sweep_offset and
-+   its size is sweep_size.
-+
-+   When a pointer is given,
-+   if it points the address higher than the array, it stays.
-+   if it points the address inside the array, it changes to point inside
-+   the sweeped array.
-+   if it points the address lower than the array, it shifts higher address by
-+   the sweep_size.  */
-+static void
-+sweep_string_in_operand (rtx insn, rtx *loc,
-+			 HOST_WIDE_INT sweep_offset, HOST_WIDE_INT sweep_size)
-+{
-+  rtx x = *loc;
-+  enum rtx_code code;
-+  int i, j, k = 0;
-+  HOST_WIDE_INT offset;
-+  const char *fmt;
-+
-+  if (x == 0)
-+    return;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+    case ASM_INPUT:
-+    case ADDR_VEC:
-+    case ADDR_DIFF_VEC:
-+    case RETURN:
-+    case ADDRESSOF:
-+      return;
-+	    
-+    case REG:
-+      if (x == virtual_incoming_args_rtx
-+	  || x == virtual_stack_vars_rtx
-+	  || x == virtual_stack_dynamic_rtx
-+	  || x == virtual_outgoing_args_rtx
-+	  || x == virtual_cfa_rtx)
-+	has_virtual_reg = TRUE;
-+      return;
-+      
-+    case SET:
-+      /*
-+	skip setjmp setup insn and setjmp restore insn
-+	Example:
-+	(set (MEM (reg:SI xx)) (virtual_stack_vars_rtx)))
-+	(set (virtual_stack_vars_rtx) (REG))
-+      */
-+      if (GET_CODE (XEXP (x, 0)) == MEM
-+	  && XEXP (x, 1) == virtual_stack_vars_rtx)
-+	return;
-+      if (XEXP (x, 0) == virtual_stack_vars_rtx
-+	  && GET_CODE (XEXP (x, 1)) == REG)
-+	return;
-+      break;
-+	    
-+    case PLUS:
-+      /* Handle typical case of frame register plus constant.  */
-+      if (XEXP (x, 0) == virtual_stack_vars_rtx
-+	  && GET_CODE (XEXP (x, 1)) == CONST_INT)
-+	{
-+	  if (x->used)
-+	    goto single_use_of_virtual_reg;
-+	  
-+	  offset = AUTO_OFFSET(x);
-+
-+	  /* When arguments grow downward, the virtual incoming
-+	     args pointer points to the top of the argument block,
-+	     so block is identified by the pointer - 1.
-+	     The flag is set at the copy_rtx_and_substitute in integrate.c  */
-+	  if (RTX_INTEGRATED_P (x))
-+	    k = -1;
-+
-+	  /* the operand related to the sweep variable.  */
-+	  if (sweep_offset <= offset + k
-+	      && offset + k < sweep_offset + sweep_size)
-+	    {
-+	      offset += sweep_frame_offset - sweep_size - sweep_offset;
-+
-+	      XEXP (x, 0) = virtual_stack_vars_rtx;
-+	      XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
-+	      x->used = 1;
-+	    }
-+	  else if (sweep_offset <= offset + k
-+		   && offset + k < sweep_frame_offset)
-+	    {
-+	      /* the rest of variables under sweep_frame_offset,
-+		 shift the location.  */
-+	      XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
-+	      x->used = 1;
-+	    }
-+	  
-+	single_use_of_virtual_reg:
-+	  if (has_virtual_reg) {
-+	    /* excerpt from insn_invalid_p in recog.c  */
-+	    int icode = recog_memoized (insn);
-+
-+	    if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
-+	      {
-+		rtx temp, seq;
-+		
-+		start_sequence ();
-+		temp = force_operand (x, NULL_RTX);
-+		seq = get_insns ();
-+		end_sequence ();
-+		
-+		emit_insn_before (seq, insn);
-+		if (! validate_change (insn, loc, temp, 0)
-+		    && !validate_replace_rtx (x, temp, insn))
-+		  fatal_insn ("sweep_string_in_operand", insn);
-+	      }
-+	  }
-+
-+	  has_virtual_reg = TRUE;
-+	  return;
-+	}
-+
-+#ifdef FRAME_GROWS_DOWNWARD
-+      /* Alert the case of frame register plus constant given by reg.  */
-+      else if (XEXP (x, 0) == virtual_stack_vars_rtx
-+	       && GET_CODE (XEXP (x, 1)) == REG)
-+	fatal_insn ("sweep_string_in_operand: unknown addressing", insn);
-+#endif
-+
-+      /*
-+	process further subtree:
-+	Example:  (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
-+	(const_int 5))
-+      */
-+      break;
-+
-+    case CALL_PLACEHOLDER:
-+      for (i = 0; i < 3; i++)
-+	{
-+	  rtx seq = XEXP (x, i);
-+	  if (seq)
-+	    {
-+	      push_to_sequence (seq);
-+	      sweep_string_use_of_insns (XEXP (x, i),
-+					 sweep_offset, sweep_size);
-+	      XEXP (x, i) = get_insns ();
-+	      end_sequence ();
-+	    }
-+	}
-+      break;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      {
-+	/*
-+	  virtual_stack_vars_rtx without offset
-+	  Example:
-+	    (set (reg:SI xx) (reg:SI 78))
-+	    (set (reg:SI xx) (MEM (reg:SI 78)))
-+	*/
-+	if (XEXP (x, i) == virtual_stack_vars_rtx)
-+	  fatal_insn ("sweep_string_in_operand: unknown fp usage", insn);
-+	sweep_string_in_operand (insn, &XEXP (x, i), sweep_offset, sweep_size);
-+      }
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	sweep_string_in_operand (insn, &XVECEXP (x, i, j), sweep_offset, sweep_size);
-+}   
-+
-+
-+/* Change the use of an argument to the use of the duplicated variable for
-+   every insns, The variable is addressed by new rtx.  */
-+static void
-+change_arg_use_of_insns (rtx insn, rtx orig, rtx *new, HOST_WIDE_INT size)
-+{
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	|| GET_CODE (insn) == CALL_INSN)
-+      {
-+	rtx seq;
-+	
-+	start_sequence ();
-+	change_arg_use_in_operand (insn, PATTERN (insn), orig, new, size);
-+
-+	seq = get_insns ();
-+	end_sequence ();
-+	emit_insn_before (seq, insn);
-+
-+	/* load_multiple insn from virtual_incoming_args_rtx have several
-+	   load insns. If every insn change the load address of arg
-+	   to frame region, those insns are moved before the PARALLEL insn
-+	   and remove the PARALLEL insn.  */
-+	if (GET_CODE (PATTERN (insn)) == PARALLEL
-+	    && XVECLEN (PATTERN (insn), 0) == 0)
-+	  delete_insn (insn);
-+      }
-+}
-+
-+
-+/* Change the use of an argument to the use of the duplicated variable for
-+   every rtx derived from the x.  */
-+static void
-+change_arg_use_in_operand (rtx insn, rtx x, rtx orig, rtx *new, HOST_WIDE_INT size)
-+{
-+  enum rtx_code code;
-+  int i, j;
-+  HOST_WIDE_INT offset;
-+  const char *fmt;
-+
-+  if (x == 0)
-+    return;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+    case ASM_INPUT:
-+    case ADDR_VEC:
-+    case ADDR_DIFF_VEC:
-+    case RETURN:
-+    case REG:
-+    case ADDRESSOF:
-+      return;
-+
-+    case MEM:
-+      /* Handle special case of MEM (incoming_args).  */
-+      if (GET_CODE (orig) == MEM
-+	  && XEXP (x, 0) == virtual_incoming_args_rtx)
-+	{
-+	  offset = 0;
-+
-+	  /* the operand related to the sweep variable.  */
-+	  if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
-+	      offset < AUTO_OFFSET(XEXP (orig, 0)) + size) {
-+
-+	    offset = AUTO_OFFSET(XEXP (*new, 0))
-+	      + (offset - AUTO_OFFSET(XEXP (orig, 0)));
-+
-+	    XEXP (x, 0) = plus_constant (virtual_stack_vars_rtx, offset);
-+	    XEXP (x, 0)->used = 1;
-+
-+	    return;
-+	  }
-+	}
-+      break;
-+      
-+    case PLUS:
-+      /* Handle special case of frame register plus constant.  */
-+      if (GET_CODE (orig) == MEM
-+	  && XEXP (x, 0) == virtual_incoming_args_rtx
-+	  && GET_CODE (XEXP (x, 1)) == CONST_INT
-+	  && ! x->used)
-+	{
-+	  offset = AUTO_OFFSET(x);
-+
-+	  /* the operand related to the sweep variable.  */
-+	  if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
-+	      offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
-+	    {
-+
-+	      offset = (AUTO_OFFSET(XEXP (*new, 0))
-+			+ (offset - AUTO_OFFSET(XEXP (orig, 0))));
-+
-+	      XEXP (x, 0) = virtual_stack_vars_rtx;
-+	      XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
-+	      x->used = 1;
-+
-+	      return;
-+	    }
-+
-+	  /*
-+	    process further subtree:
-+	    Example:  (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
-+	    (const_int 5))
-+	  */
-+	}
-+      break;
-+
-+    case SET:
-+      /* Handle special case of "set (REG or MEM) (incoming_args)".
-+	 It means that the the address of the 1st argument is stored.  */
-+      if (GET_CODE (orig) == MEM
-+	  && XEXP (x, 1) == virtual_incoming_args_rtx)
-+	{
-+	  offset = 0;
-+
-+	  /* the operand related to the sweep variable.  */
-+	  if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
-+	      offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
-+	    {
-+	      offset = (AUTO_OFFSET(XEXP (*new, 0))
-+			+ (offset - AUTO_OFFSET(XEXP (orig, 0))));
-+
-+	      XEXP (x, 1) = force_operand (plus_constant (virtual_stack_vars_rtx,
-+							  offset), NULL_RTX);
-+	      XEXP (x, 1)->used = 1;
-+
-+	      return;
-+	    }
-+	}
-+      break;
-+
-+    case CALL_PLACEHOLDER:
-+      for (i = 0; i < 3; i++)
-+	{
-+	  rtx seq = XEXP (x, i);
-+	  if (seq)
-+	    {
-+	      push_to_sequence (seq);
-+	      change_arg_use_of_insns (XEXP (x, i), orig, new, size);
-+	      XEXP (x, i) = get_insns ();
-+	      end_sequence ();
-+	    }
-+	}
-+      break;
-+
-+    case PARALLEL:
-+      for (j = 0; j < XVECLEN (x, 0); j++)
-+	{
-+	  change_arg_use_in_operand (insn, XVECEXP (x, 0, j), orig, new, size);
-+	}
-+      if (recog_memoized (insn) < 0)
-+	{
-+	  for (i = 0, j = 0; j < XVECLEN (x, 0); j++)
-+	    {
-+	      /* if parallel insn has a insn used virtual_incoming_args_rtx,
-+		 the insn is removed from this PARALLEL insn.  */
-+	      if (check_used_flag (XVECEXP (x, 0, j)))
-+		{
-+		  emit_insn (XVECEXP (x, 0, j));
-+		  XVECEXP (x, 0, j) = NULL;
-+		}
-+	      else
-+		XVECEXP (x, 0, i++) = XVECEXP (x, 0, j);
-+	    }
-+	  PUT_NUM_ELEM (XVEC (x, 0), i);
-+	}
-+      return;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      {
-+	if (XEXP (x, i) == orig)
-+	  {
-+	    if (*new == 0)
-+	      *new = gen_reg_rtx (GET_MODE (orig));
-+	    XEXP (x, i) = *new;
-+	    continue;
-+	  }
-+	change_arg_use_in_operand (insn, XEXP (x, i), orig, new, size);
-+      }
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	{
-+	  if (XVECEXP (x, i, j) == orig)
-+	    {
-+	      if (*new == 0)
-+		*new = gen_reg_rtx (GET_MODE (orig));
-+	      XVECEXP (x, i, j) = *new;
-+	      continue;
-+	    }
-+	  change_arg_use_in_operand (insn, XVECEXP (x, i, j), orig, new, size);
-+	}
-+}   
-+
-+
-+/* Validate every instructions from the specified instruction.
-+   
-+   The stack protector prohibits to generate machine specific frame addressing
-+   for the first rtl generation. The prepare_stack_protection must convert
-+   machine independent frame addressing to machine specific frame addressing,
-+   so instructions for inline functions, which skip the conversion of
-+   the stack protection, validate every instructions.  */
-+static void
-+validate_insns_of_varrefs (rtx insn)
-+{
-+  rtx next;
-+
-+  /* Initialize recognition, indicating that volatile is OK.  */
-+  init_recog ();
-+
-+  for (; insn; insn = next)
-+    {
-+      next = NEXT_INSN (insn);
-+      if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	  || GET_CODE (insn) == CALL_INSN)
-+	{
-+	  /* excerpt from insn_invalid_p in recog.c  */
-+	  int icode = recog_memoized (insn);
-+
-+	  if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
-+	    validate_operand_of_varrefs (insn, &PATTERN (insn));
-+	}
-+    }
-+
-+  init_recog_no_volatile ();
-+}
-+
-+
-+/* Validate frame addressing of the rtx and covert it to machine specific one.  */
-+static void
-+validate_operand_of_varrefs (rtx insn, rtx *loc)
-+{
-+  enum rtx_code code;
-+  rtx x, temp, seq;
-+  int i, j;
-+  const char *fmt;
-+
-+  x = *loc;
-+  if (x == 0)
-+    return;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case USE:
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+    case ASM_INPUT:
-+    case ADDR_VEC:
-+    case ADDR_DIFF_VEC:
-+    case RETURN:
-+    case REG:
-+    case ADDRESSOF:
-+      return;
-+
-+    case PLUS:
-+      /* validate insn of frame register plus constant.  */
-+      if (GET_CODE (x) == PLUS
-+	  && XEXP (x, 0) == virtual_stack_vars_rtx
-+	  && GET_CODE (XEXP (x, 1)) == CONST_INT)
-+	{
-+	  start_sequence ();
-+
-+	  { /* excerpt from expand_binop in optabs.c  */
-+	    optab binoptab = add_optab;
-+	    enum machine_mode mode = GET_MODE (x);
-+	    int icode = (int) binoptab->handlers[(int) mode].insn_code;
-+	    enum machine_mode mode1 = insn_data[icode].operand[2].mode;
-+	    rtx pat;
-+	    rtx xop0 = XEXP (x, 0), xop1 = XEXP (x, 1);
-+	    temp = gen_reg_rtx (mode);
-+
-+	    /* Now, if insn's predicates don't allow offset operands,
-+	       put them into pseudo regs.  */
-+
-+	    if (! (*insn_data[icode].operand[2].predicate) (xop1, mode1)
-+		&& mode1 != VOIDmode)
-+	      xop1 = copy_to_mode_reg (mode1, xop1);
-+
-+	    pat = GEN_FCN (icode) (temp, xop0, xop1);
-+	    if (pat)
-+	      emit_insn (pat);
-+	    else
-+	      abort (); /* there must be add_optab handler.  */
-+	  }	      
-+	  seq = get_insns ();
-+	  end_sequence ();
-+	  
-+	  emit_insn_before (seq, insn);
-+	  if (! validate_change (insn, loc, temp, 0))
-+	    abort ();
-+	  return;
-+	}
-+	break;
-+      
-+
-+    case CALL_PLACEHOLDER:
-+      for (i = 0; i < 3; i++)
-+	{
-+	  rtx seq = XEXP (x, i);
-+	  if (seq)
-+	    {
-+	      push_to_sequence (seq);
-+	      validate_insns_of_varrefs (XEXP (x, i));
-+	      XEXP (x, i) = get_insns ();
-+	      end_sequence ();
-+	    }
-+	}
-+      break;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      validate_operand_of_varrefs (insn, &XEXP (x, i));
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	validate_operand_of_varrefs (insn, &XVECEXP (x, i, j));
-+}
-+
-+
-+
-+/* Return size that is not allocated for stack frame. It will be allocated
-+   to modify the home of pseudo registers called from global_alloc.  */
-+HOST_WIDE_INT
-+get_frame_free_size (void)
-+{
-+  if (! flag_propolice_protection)
-+    return 0;
-+
-+  return push_allocated_offset - push_frame_offset;
-+}
-+
-+
-+/* The following codes are invoked after the instantiation of pseudo registers.
-+
-+   Reorder local variables to place a peudo register after buffers to avoid
-+   the corruption of local variables that could be used to further corrupt
-+   arbitrary memory locations.  */
-+#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
-+static void push_frame (HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_in_operand (rtx, rtx, HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT, HOST_WIDE_INT);
-+static void push_frame_of_reg_equiv_constant (HOST_WIDE_INT, HOST_WIDE_INT);
-+static void reset_used_flags_for_push_frame (void);
-+static int check_out_of_frame_access (rtx, HOST_WIDE_INT);
-+static int check_out_of_frame_access_in_operand (rtx, HOST_WIDE_INT);
-+#endif
-+
-+
-+/* Assign stack local at the stage of register allocater. if a pseudo reg is
-+   spilled out from such an allocation, it is allocated on the stack.
-+   The protector keep the location be lower stack region than the location of
-+   sweeped arrays.  */
-+rtx
-+assign_stack_local_for_pseudo_reg (enum machine_mode mode,
-+				   HOST_WIDE_INT size, int align)
-+{
-+#if defined(FRAME_GROWS_DOWNWARD) || !defined(STACK_GROWS_DOWNWARD)
-+  return assign_stack_local (mode, size, align);
-+#else
-+  tree blocks = DECL_INITIAL (current_function_decl);
-+  rtx new;
-+  HOST_WIDE_INT saved_frame_offset, units_per_push, starting_frame;
-+  int first_call_from_purge_addressof, first_call_from_global_alloc;
-+
-+  if (! flag_propolice_protection
-+      || size == 0
-+      || ! blocks
-+      || current_function_is_inlinable
-+      || ! search_string_from_argsandvars (CALL_FROM_PUSH_FRAME)
-+      || current_function_contains_functions)
-+    return assign_stack_local (mode, size, align);
-+
-+  first_call_from_purge_addressof = !push_frame_offset && !cse_not_expected;
-+  first_call_from_global_alloc = !saved_cse_not_expected && cse_not_expected;
-+  saved_cse_not_expected = cse_not_expected;
-+
-+  starting_frame = ((STARTING_FRAME_OFFSET)
-+		    ? STARTING_FRAME_OFFSET : BIGGEST_ALIGNMENT / BITS_PER_UNIT);
-+  units_per_push = MAX (BIGGEST_ALIGNMENT / BITS_PER_UNIT,
-+			GET_MODE_SIZE (mode));
-+    
-+  if (first_call_from_purge_addressof)
-+    {
-+      push_frame_offset = push_allocated_offset;
-+      if (check_out_of_frame_access (get_insns (), starting_frame))
-+	{
-+	  /* After the purge_addressof stage, there may be an instruction which
-+	     have the pointer less than the starting_frame. 
-+	     if there is an access below frame, push dummy region to seperate
-+	     the address of instantiated variables.  */
-+	  push_frame (GET_MODE_SIZE (DImode), 0);
-+	  assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
-+	}
-+    }
-+
-+  if (first_call_from_global_alloc)
-+    {
-+      push_frame_offset = push_allocated_offset = 0;
-+      if (check_out_of_frame_access (get_insns (), starting_frame))
-+	{
-+	  if (STARTING_FRAME_OFFSET)
-+	    {
-+	      /* if there is an access below frame, push dummy region 
-+		 to seperate the address of instantiated variables.  */
-+	      push_frame (GET_MODE_SIZE (DImode), 0);
-+	      assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
-+	    }
-+	  else
-+	    push_allocated_offset = starting_frame;
-+	}
-+    }
-+
-+  saved_frame_offset = frame_offset;
-+  frame_offset = push_frame_offset;
-+
-+  new = assign_stack_local (mode, size, align);
-+
-+  push_frame_offset = frame_offset;
-+  frame_offset = saved_frame_offset;
-+  
-+  if (push_frame_offset > push_allocated_offset)
-+    {
-+      push_frame (units_per_push,
-+		  push_allocated_offset + STARTING_FRAME_OFFSET);
-+
-+      assign_stack_local (BLKmode, units_per_push, -1);
-+      push_allocated_offset += units_per_push;
-+    }
-+
-+  /* At the second call from global alloc, alpha push frame and assign
-+     a local variable to the top of the stack.  */
-+  if (first_call_from_global_alloc && STARTING_FRAME_OFFSET == 0)
-+    push_frame_offset = push_allocated_offset = 0;
-+
-+  return new;
-+#endif
-+}
-+
-+
-+#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
-+
-+/* push frame infomation for instantiating pseudo register at the top of stack.
-+   This is only for the "frame grows upward", it means FRAME_GROWS_DOWNWARD is 
-+   not defined.
-+
-+   It is called by purge_addressof function and global_alloc (or reload)
-+   function.  */
-+static void
-+push_frame (HOST_WIDE_INT var_size, HOST_WIDE_INT boundary)
-+{
-+  reset_used_flags_for_push_frame();
-+
-+  /* Scan all declarations of variables and fix the offset address of
-+     the variable based on the frame pointer.  */
-+  push_frame_in_decls (DECL_INITIAL (current_function_decl),
-+		       var_size, boundary);
-+
-+  /* Scan all argument variable and fix the offset address based on
-+     the frame pointer.  */
-+  push_frame_in_args (DECL_ARGUMENTS (current_function_decl),
-+		      var_size, boundary);
-+
-+  /* Scan all operands of all insns and fix the offset address
-+     based on the frame pointer.  */
-+  push_frame_of_insns (get_insns (), var_size, boundary);
-+
-+  /* Scan all reg_equiv_memory_loc and reg_equiv_constant.  */
-+  push_frame_of_reg_equiv_memory_loc (var_size, boundary);
-+  push_frame_of_reg_equiv_constant (var_size, boundary);
-+
-+  reset_used_flags_for_push_frame();
-+}
-+
-+
-+/* Reset used flag of every insns, reg_equiv_memory_loc,
-+   and reg_equiv_constant.  */
-+static void
-+reset_used_flags_for_push_frame(void)
-+{
-+  int i;
-+  extern rtx *reg_equiv_memory_loc;
-+  extern rtx *reg_equiv_constant;
-+
-+  /* Clear all the USED bits in operands of all insns and declarations of
-+     local vars.  */
-+  reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
-+  reset_used_flags_for_insns (get_insns ());
-+
-+
-+  /* The following codes are processed if the push_frame is called from 
-+     global_alloc (or reload) function.  */
-+  if (reg_equiv_memory_loc == 0)
-+    return;
-+
-+  for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
-+    if (reg_equiv_memory_loc[i])
-+      {
-+	rtx x = reg_equiv_memory_loc[i];
-+
-+	if (GET_CODE (x) == MEM
-+	    && GET_CODE (XEXP (x, 0)) == PLUS
-+	    && AUTO_BASEPTR (XEXP (x, 0)) == frame_pointer_rtx)
-+	  {
-+	    /* reset */
-+	    XEXP (x, 0)->used = 0;
-+	  }
-+      }
-+
-+  
-+  if (reg_equiv_constant == 0)
-+    return;
-+
-+  for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
-+    if (reg_equiv_constant[i])
-+      {
-+	rtx x = reg_equiv_constant[i];
-+
-+	if (GET_CODE (x) == PLUS
-+	    && AUTO_BASEPTR (x) == frame_pointer_rtx)
-+	  {
-+	    /* reset */
-+	    x->used = 0;
-+	  }
-+      }
-+}
-+
-+
-+/* Push every variables declared as a local variable and make a room for
-+   instantiated register.  */
-+static void
-+push_frame_in_decls (tree block, HOST_WIDE_INT push_size,
-+		     HOST_WIDE_INT boundary)
-+{
-+  tree types;
-+  HOST_WIDE_INT offset;
-+  rtx home;
-+
-+  while (block && TREE_CODE(block)==BLOCK)
-+    {
-+      for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
-+	{
-+	  /* Skip the declaration that refers an external variable and
-+	     also skip an global variable.  */
-+	  if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types))
-+	    {
-+	      if (! DECL_RTL_SET_P (types))
-+		continue;
-+
-+	      home = DECL_RTL (types);
-+
-+	      /* Process for static local variable.  */
-+	      if (GET_CODE (home) == MEM
-+		  && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
-+		continue;
-+
-+	      if (GET_CODE (home) == MEM
-+		  && GET_CODE (XEXP (home, 0)) == REG)
-+		{
-+		  if (XEXP (home, 0) != frame_pointer_rtx
-+		      || boundary != 0)
-+		    continue;
-+
-+		  XEXP (home, 0) = plus_constant (frame_pointer_rtx,
-+						  push_size);
-+
-+		  /* mark */
-+		  XEXP (home, 0)->used = 1;
-+		}
-+		
-+	      if (GET_CODE (home) == MEM
-+		  && GET_CODE (XEXP (home, 0)) == MEM)
-+		{
-+		  /* Process for dynamically allocated array.  */
-+		  home = XEXP (home, 0);
-+		}
-+		
-+	      if (GET_CODE (home) == MEM
-+		  && GET_CODE (XEXP (home, 0)) == PLUS
-+		  && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
-+		{
-+		  offset = AUTO_OFFSET(XEXP (home, 0));
-+
-+		  if (! XEXP (home, 0)->used
-+		      && offset >= boundary)
-+		    {
-+		      offset += push_size;
-+		      XEXP (XEXP (home, 0), 1)
-+			= gen_rtx_CONST_INT (VOIDmode, offset);
-+		      
-+		      /* mark */
-+		      XEXP (home, 0)->used = 1;
-+		    }
-+		}
-+	    }
-+	}
-+
-+      push_frame_in_decls (BLOCK_SUBBLOCKS (block), push_size, boundary);
-+      block = BLOCK_CHAIN (block);
-+    }
-+}
-+
-+
-+/* Push every variables declared as an argument and make a room for
-+   instantiated register.  */
-+static void
-+push_frame_in_args (tree parms, HOST_WIDE_INT push_size,
-+		    HOST_WIDE_INT boundary)
-+{
-+  rtx home;
-+  HOST_WIDE_INT offset;
-+    
-+  for (; parms; parms = TREE_CHAIN (parms))
-+    if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
-+      {
-+	if (PARM_PASSED_IN_MEMORY (parms))
-+	  {
-+	    home = DECL_INCOMING_RTL (parms);
-+	    offset = AUTO_OFFSET(XEXP (home, 0));
-+
-+	    if (XEXP (home, 0)->used || offset < boundary)
-+	      continue;
-+
-+	    /* the operand related to the sweep variable.  */
-+	    if (AUTO_BASEPTR (XEXP (home, 0)) == frame_pointer_rtx)
-+	      {
-+		if (XEXP (home, 0) == frame_pointer_rtx)
-+		  XEXP (home, 0) = plus_constant (frame_pointer_rtx,
-+						  push_size);
-+		else {
-+		  offset += push_size;
-+		  XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
-+								offset);
-+		}
-+
-+		/* mark */
-+		XEXP (home, 0)->used = 1;
-+	      }
-+	  }
-+      }
-+}
-+
-+
-+/* Set to 1 when the instruction has the reference to be pushed.  */
-+static int insn_pushed;
-+
-+/* Tables of equivalent registers with frame pointer.  */
-+static int *fp_equiv = 0;
-+
-+
-+/* Push the frame region to make a room for allocated local variable.  */
-+static void
-+push_frame_of_insns (rtx insn, HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
-+{
-+  /* init fp_equiv */
-+  fp_equiv = (int *) xcalloc (max_reg_num (), sizeof (int));
-+		
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	|| GET_CODE (insn) == CALL_INSN)
-+      {
-+	rtx last;
-+	
-+	insn_pushed = FALSE;
-+
-+	/* Push frame in INSN operation.  */
-+	push_frame_in_operand (insn, PATTERN (insn), push_size, boundary);
-+
-+	/* Push frame in NOTE.  */
-+	push_frame_in_operand (insn, REG_NOTES (insn), push_size, boundary);
-+
-+	/* Push frame in CALL EXPR_LIST.  */
-+	if (GET_CODE (insn) == CALL_INSN)
-+	  push_frame_in_operand (insn, CALL_INSN_FUNCTION_USAGE (insn),
-+				 push_size, boundary);
-+
-+	/* Pushed frame addressing style may not be machine specific one.
-+	   so the instruction should be converted to use the machine specific
-+	   frame addressing.  */
-+	if (insn_pushed
-+	    && (last = try_split (PATTERN (insn), insn, 1)) != insn)
-+	  {
-+	    rtx first = NEXT_INSN (insn);
-+	    rtx trial = NEXT_INSN (first);
-+	    rtx pattern = PATTERN (trial);
-+	    rtx set;
-+
-+	    /* Update REG_EQUIV info to the first splitted insn.  */
-+	    if ((set = single_set (insn))
-+		&& find_reg_note (insn, REG_EQUIV, SET_SRC (set))
-+		&& GET_CODE (PATTERN (first)) == SET)
-+	      {
-+		REG_NOTES (first)
-+		  = gen_rtx_EXPR_LIST (REG_EQUIV,
-+				       SET_SRC (PATTERN (first)),
-+				       REG_NOTES (first));
-+	      }
-+
-+	    /* copy the first insn of splitted insns to the original insn and
-+	       delete the first insn,
-+	       because the original insn is pointed from records:
-+	       insn_chain, reg_equiv_init, used for global_alloc.  */
-+	    if (cse_not_expected)
-+	      {
-+		add_insn_before (insn, first);
-+		
-+		/* Copy the various flags, and other information.  */
-+		memcpy (insn, first, sizeof (struct rtx_def) - sizeof (rtunion));
-+		PATTERN (insn) = PATTERN (first);
-+		INSN_CODE (insn) = INSN_CODE (first);
-+		LOG_LINKS (insn) = LOG_LINKS (first);
-+		REG_NOTES (insn) = REG_NOTES (first);
-+
-+		/* then remove the first insn of splitted insns.  */
-+		remove_insn (first);
-+		INSN_DELETED_P (first) = 1;
-+	      }
-+
-+	    if (GET_CODE (pattern) == SET
-+		&& GET_CODE (XEXP (pattern, 0)) == REG
-+		&& GET_CODE (XEXP (pattern, 1)) == PLUS
-+		&& XEXP (pattern, 0) == XEXP (XEXP (pattern, 1), 0)
-+		&& GET_CODE (XEXP (XEXP (pattern, 1), 1)) == CONST_INT)
-+	      {
-+		rtx offset = XEXP (XEXP (pattern, 1), 1);
-+		fp_equiv[REGNO (XEXP (pattern, 0))] = INTVAL (offset);
-+
-+		delete_insn (trial);
-+	      }
-+
-+	    insn = last;
-+	  }
-+      }
-+
-+  /* Clean up.  */
-+  free (fp_equiv);
-+}
-+
-+
-+/* Push the frame region by changing the operand that points the frame.  */
-+static void
-+push_frame_in_operand (rtx insn, rtx orig,
-+		       HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
-+{
-+  rtx x = orig;
-+  enum rtx_code code;
-+  int i, j;
-+  HOST_WIDE_INT offset;
-+  const char *fmt;
-+
-+  if (x == 0)
-+    return;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+    case ASM_INPUT:
-+    case ADDR_VEC:
-+    case ADDR_DIFF_VEC:
-+    case RETURN:
-+    case REG:
-+    case ADDRESSOF:
-+    case USE:
-+      return;
-+	    
-+    case SET:
-+      /*
-+	Skip setjmp setup insn and setjmp restore insn
-+	alpha case:
-+	(set (MEM (reg:SI xx)) (frame_pointer_rtx)))
-+	(set (frame_pointer_rtx) (REG))
-+      */
-+      if (GET_CODE (XEXP (x, 0)) == MEM
-+	  && XEXP (x, 1) == frame_pointer_rtx)
-+	return;
-+      if (XEXP (x, 0) == frame_pointer_rtx
-+	  && GET_CODE (XEXP (x, 1)) == REG)
-+	return;
-+
-+      /*
-+	powerpc case: restores setjmp address
-+	(set (frame_pointer_rtx) (plus frame_pointer_rtx const_int -n))
-+	or
-+	(set (reg) (plus frame_pointer_rtx const_int -n))
-+	(set (frame_pointer_rtx) (reg))
-+      */
-+      if (GET_CODE (XEXP (x, 0)) == REG
-+	  && GET_CODE (XEXP (x, 1)) == PLUS
-+	  && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
-+	  && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT
-+	  && INTVAL (XEXP (XEXP (x, 1), 1)) < 0)
-+	{
-+	  x = XEXP (x, 1);
-+	  offset = AUTO_OFFSET(x);
-+	  if (x->used || -offset < boundary)
-+	    return;
-+
-+	  XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - push_size);
-+	  x->used = 1; insn_pushed = TRUE;
-+	  return;
-+	}
-+
-+      /* Reset fp_equiv register.  */
-+      else if (GET_CODE (XEXP (x, 0)) == REG
-+	  && fp_equiv[REGNO (XEXP (x, 0))])
-+	fp_equiv[REGNO (XEXP (x, 0))] = 0;
-+
-+      /* Propagete fp_equiv register.  */
-+      else if (GET_CODE (XEXP (x, 0)) == REG
-+	       && GET_CODE (XEXP (x, 1)) == REG
-+	       && fp_equiv[REGNO (XEXP (x, 1))])
-+	if (REGNO (XEXP (x, 0)) <= LAST_VIRTUAL_REGISTER
-+	    || reg_renumber[REGNO (XEXP (x, 0))] > 0)
-+	  fp_equiv[REGNO (XEXP (x, 0))] = fp_equiv[REGNO (XEXP (x, 1))];
-+      break;
-+
-+    case MEM:
-+      if (XEXP (x, 0) == frame_pointer_rtx
-+	  && boundary == 0)
-+	{
-+	  XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
-+	  XEXP (x, 0)->used = 1; insn_pushed = TRUE;
-+	  return;
-+	}
-+      break;
-+      
-+    case PLUS:
-+      /* Handle special case of frame register plus constant.  */
-+      if (GET_CODE (XEXP (x, 1)) == CONST_INT
-+	  && XEXP (x, 0) == frame_pointer_rtx)
-+	{
-+	  offset = AUTO_OFFSET(x);
-+
-+	  if (x->used || offset < boundary)
-+	    return;
-+
-+	  XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
-+	  x->used = 1; insn_pushed = TRUE;
-+
-+	  return;
-+	}
-+      /*
-+	Handle alpha case:
-+	 (plus:SI (subreg:SI (reg:DI 63 FP) 0) (const_int 64 [0x40]))
-+      */
-+      if (GET_CODE (XEXP (x, 1)) == CONST_INT
-+	  && GET_CODE (XEXP (x, 0)) == SUBREG
-+	  && SUBREG_REG (XEXP (x, 0)) == frame_pointer_rtx)
-+	{
-+	  offset = AUTO_OFFSET(x);
-+
-+	  if (x->used || offset < boundary)
-+	    return;
-+
-+	  XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
-+	  x->used = 1; insn_pushed = TRUE;
-+
-+	  return;
-+	}
-+      /*
-+	Handle powerpc case:
-+	 (set (reg x) (plus fp const))
-+	 (set (.....) (... (plus (reg x) (const B))))
-+      */
-+      else if (GET_CODE (XEXP (x, 1)) == CONST_INT
-+	       && GET_CODE (XEXP (x, 0)) == REG
-+	       && fp_equiv[REGNO (XEXP (x, 0))])
-+	{
-+	  offset = AUTO_OFFSET(x);
-+
-+	  if (x->used)
-+	    return;
-+
-+	  offset += fp_equiv[REGNO (XEXP (x, 0))];
-+
-+	  XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
-+	  x->used = 1; insn_pushed = TRUE;
-+
-+	  return;
-+	}
-+      /*
-+	Handle special case of frame register plus reg (constant).
-+	 (set (reg x) (const B))
-+	 (set (....) (...(plus fp (reg x))))
-+      */
-+      else if (XEXP (x, 0) == frame_pointer_rtx
-+	       && GET_CODE (XEXP (x, 1)) == REG
-+	       && PREV_INSN (insn)
-+	       && PATTERN (PREV_INSN (insn))
-+	       && SET_DEST (PATTERN (PREV_INSN (insn))) == XEXP (x, 1)
-+	       && GET_CODE (SET_SRC (PATTERN (PREV_INSN (insn)))) == CONST_INT)
-+	{
-+	  offset = INTVAL (SET_SRC (PATTERN (PREV_INSN (insn))));
-+
-+	  if (x->used || offset < boundary)
-+	    return;
-+	  
-+	  SET_SRC (PATTERN (PREV_INSN (insn)))
-+	    = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
-+	  x->used = 1;
-+	  XEXP (x, 1)->used = 1;
-+
-+	  return;
-+	}
-+      /*
-+	Handle special case of frame register plus reg (used).
-+	The register already have a pushed offset, just mark this frame
-+	addressing.
-+      */
-+      else if (XEXP (x, 0) == frame_pointer_rtx
-+	       && XEXP (x, 1)->used)
-+	{
-+	  x->used = 1;
-+	  return;
-+	}
-+      /*
-+	Process further subtree:
-+	Example:  (plus:SI (mem/s:SI (plus:SI (FP) (const_int 8)))
-+	(const_int 5))
-+      */
-+      break;
-+
-+    case CALL_PLACEHOLDER:
-+      push_frame_of_insns (XEXP (x, 0), push_size, boundary);
-+      push_frame_of_insns (XEXP (x, 1), push_size, boundary);
-+      push_frame_of_insns (XEXP (x, 2), push_size, boundary);
-+      break;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      {
-+	if (XEXP (x, i) == frame_pointer_rtx && boundary == 0)
-+	  fatal_insn ("push_frame_in_operand", insn);
-+	push_frame_in_operand (insn, XEXP (x, i), push_size, boundary);
-+      }
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	push_frame_in_operand (insn, XVECEXP (x, i, j), push_size, boundary);
-+}   
-+
-+
-+/* Change the location pointed in reg_equiv_memory_loc.  */
-+static void
-+push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT push_size,
-+				    HOST_WIDE_INT boundary)
-+{
-+  int i;
-+  extern rtx *reg_equiv_memory_loc;
-+
-+  /* This function is processed if the push_frame is called from 
-+     global_alloc (or reload) function.  */
-+  if (reg_equiv_memory_loc == 0)
-+    return;
-+
-+  for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
-+    if (reg_equiv_memory_loc[i])
-+      {
-+	rtx x = reg_equiv_memory_loc[i];
-+	int offset;
-+
-+	if (GET_CODE (x) == MEM
-+	    && GET_CODE (XEXP (x, 0)) == PLUS
-+	    && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx)
-+	  {
-+	    offset = AUTO_OFFSET(XEXP (x, 0));
-+	    
-+	    if (! XEXP (x, 0)->used
-+		&& offset >= boundary)
-+	      {
-+		offset += push_size;
-+		XEXP (XEXP (x, 0), 1) = gen_rtx_CONST_INT (VOIDmode, offset);
-+
-+		/* mark */
-+		XEXP (x, 0)->used = 1;
-+	      }
-+	  }
-+	else if (GET_CODE (x) == MEM
-+		 && XEXP (x, 0) == frame_pointer_rtx
-+		 && boundary == 0)
-+	  {
-+	    XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
-+	    XEXP (x, 0)->used = 1; insn_pushed = TRUE;
-+	  }
-+      }
-+}
-+
-+
-+/* Change the location pointed in reg_equiv_constant.  */
-+static void
-+push_frame_of_reg_equiv_constant (HOST_WIDE_INT push_size,
-+				  HOST_WIDE_INT boundary)
-+{
-+  int i;
-+  extern rtx *reg_equiv_constant;
-+
-+  /* This function is processed if the push_frame is called from 
-+     global_alloc (or reload) function.  */
-+  if (reg_equiv_constant == 0)
-+    return;
-+
-+  for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++)
-+    if (reg_equiv_constant[i])
-+      {
-+	rtx x = reg_equiv_constant[i];
-+	int offset;
-+
-+	if (GET_CODE (x) == PLUS
-+	    && XEXP (x, 0) == frame_pointer_rtx)
-+	  {
-+	    offset = AUTO_OFFSET(x);
-+	    
-+	    if (! x->used
-+		&& offset >= boundary)
-+	      {
-+		offset += push_size;
-+		XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
-+
-+		/* mark */
-+		x->used = 1;
-+	      }
-+	  }
-+	else if (x == frame_pointer_rtx
-+		 && boundary == 0)
-+	  {
-+	    reg_equiv_constant[i]
-+	      = plus_constant (frame_pointer_rtx, push_size);
-+	    reg_equiv_constant[i]->used = 1; insn_pushed = TRUE;
-+	  }
-+      }
-+}
-+
-+
-+/* Check every instructions if insn's memory reference is out of frame.  */
-+static int
-+check_out_of_frame_access (rtx insn, HOST_WIDE_INT boundary)
-+{
-+  for (; insn; insn = NEXT_INSN (insn))
-+    if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
-+	|| GET_CODE (insn) == CALL_INSN)
-+      {
-+	if (check_out_of_frame_access_in_operand (PATTERN (insn), boundary))
-+	  return TRUE;
-+      }
-+  return FALSE;
-+}
-+
-+
-+/* Check every operands if the reference is out of frame.  */
-+static int
-+check_out_of_frame_access_in_operand (rtx orig, HOST_WIDE_INT boundary)
-+{
-+  rtx x = orig;
-+  enum rtx_code code;
-+  int i, j;
-+  const char *fmt;
-+
-+  if (x == 0)
-+    return FALSE;
-+
-+  code = GET_CODE (x);
-+
-+  switch (code)
-+    {
-+    case CONST_INT:
-+    case CONST_DOUBLE:
-+    case CONST:
-+    case SYMBOL_REF:
-+    case CODE_LABEL:
-+    case PC:
-+    case CC0:
-+    case ASM_INPUT:
-+    case ADDR_VEC:
-+    case ADDR_DIFF_VEC:
-+    case RETURN:
-+    case REG:
-+    case ADDRESSOF:
-+      return FALSE;
-+	    
-+    case MEM:
-+      if (XEXP (x, 0) == frame_pointer_rtx)
-+	if (0 < boundary)
-+	  return TRUE;
-+      break;
-+      
-+    case PLUS:
-+      /* Handle special case of frame register plus constant.  */
-+      if (GET_CODE (XEXP (x, 1)) == CONST_INT
-+	  && XEXP (x, 0) == frame_pointer_rtx)
-+	{
-+	  if (0 <= AUTO_OFFSET(x)
-+	      && AUTO_OFFSET(x) < boundary)
-+	    return TRUE;
-+	  return FALSE;
-+	}
-+      /*
-+	Process further subtree:
-+	Example:  (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
-+	(const_int 5))
-+      */
-+      break;
-+
-+    case CALL_PLACEHOLDER:
-+      if (check_out_of_frame_access (XEXP (x, 0), boundary))
-+	return TRUE;
-+      if (check_out_of_frame_access (XEXP (x, 1), boundary))
-+	return TRUE;
-+      if (check_out_of_frame_access (XEXP (x, 2), boundary))
-+	return TRUE;
-+      break;
-+
-+    default:
-+      break;
-+    }
-+
-+  /* Scan all subexpressions.  */
-+  fmt = GET_RTX_FORMAT (code);
-+  for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
-+    if (*fmt == 'e')
-+      {
-+	if (check_out_of_frame_access_in_operand (XEXP (x, i), boundary))
-+	  return TRUE;
-+      }
-+    else if (*fmt == 'E')
-+      for (j = 0; j < XVECLEN (x, i); j++)
-+	if (check_out_of_frame_access_in_operand (XVECEXP (x, i, j), boundary))
-+	  return TRUE;
-+
-+  return FALSE;
-+}
-+#endif
-diff -Naur gcc-3.4.0.orig/gcc/protector.h gcc-3.4.0.ssp/gcc/protector.h
---- gcc-3.4.0.orig/gcc/protector.h	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/protector.h	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,55 @@
-+/* RTL buffer overflow protection function for GNU C compiler
-+   Copyright (C) 2003 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC 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.
-+
-+GCC 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 GCC; see the file COPYING.  If not, write to the Free
-+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-+02111-1307, USA.  */
-+
-+
-+/* Declare GUARD variable.  */
-+#define GUARD_m		Pmode
-+#define UNITS_PER_GUARD						\
-+  MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
-+
-+#ifndef L_stack_smash_handler
-+
-+/* Insert a guard variable before a character buffer and change the order
-+ of pointer variables, character buffers and pointer arguments.  */
-+
-+extern void prepare_stack_protection  (int);
-+
-+#ifdef TREE_CODE
-+/* Search a character array from the specified type tree.  */
-+
-+extern int search_string_def (tree);
-+#endif
-+
-+/* Examine whether the input contains frame pointer addressing.  */
-+
-+extern int contains_fp (rtx);
-+
-+/* Return size that is not allocated for stack frame. It will be allocated
-+   to modify the home of pseudo registers called from global_alloc.  */
-+
-+extern HOST_WIDE_INT get_frame_free_size (void);
-+
-+/* Allocate a local variable in the stack area before character buffers
-+   to avoid the corruption of it.  */
-+
-+extern rtx assign_stack_local_for_pseudo_reg (enum machine_mode,
-+					      HOST_WIDE_INT, int);
-+
-+#endif
-diff -Naur gcc-3.4.0.orig/gcc/reload1.c gcc-3.4.0.ssp/gcc/reload1.c
---- gcc-3.4.0.orig/gcc/reload1.c	2004-03-25 16:44:42.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/reload1.c	2004-11-08 01:51:38.000000000 +0000
-@@ -43,6 +43,7 @@
- #include "toplev.h"
- #include "except.h"
- #include "tree.h"
-+#include "protector.h"
- 
- /* This file contains the reload pass of the compiler, which is
-    run after register allocation has been done.  It checks that
-@@ -881,7 +882,7 @@
-       if (cfun->stack_alignment_needed)
-         assign_stack_local (BLKmode, 0, cfun->stack_alignment_needed);
- 
--      starting_frame_size = get_frame_size ();
-+      starting_frame_size = get_frame_size () - get_frame_free_size ();
- 
-       set_initial_elim_offsets ();
-       set_initial_label_offsets ();
-@@ -945,7 +946,7 @@
- 	setup_save_areas ();
- 
-       /* If we allocated another stack slot, redo elimination bookkeeping.  */
--      if (starting_frame_size != get_frame_size ())
-+      if (starting_frame_size != get_frame_size () - get_frame_free_size ())
- 	continue;
- 
-       if (caller_save_needed)
-@@ -964,7 +965,7 @@
- 
-       /* If we allocated any new memory locations, make another pass
- 	 since it might have changed elimination offsets.  */
--      if (starting_frame_size != get_frame_size ())
-+      if (starting_frame_size != get_frame_size () - get_frame_free_size ())
- 	something_changed = 1;
- 
-       {
-@@ -1056,11 +1057,11 @@
-   if (insns_need_reload != 0 || something_needs_elimination
-       || something_needs_operands_changed)
-     {
--      HOST_WIDE_INT old_frame_size = get_frame_size ();
-+      HOST_WIDE_INT old_frame_size = get_frame_size () - get_frame_free_size ();
- 
-       reload_as_needed (global);
- 
--      if (old_frame_size != get_frame_size ())
-+      if (old_frame_size != get_frame_size () - get_frame_free_size ())
- 	abort ();
- 
-       if (num_eliminable)
-@@ -1947,8 +1948,10 @@
- 	 inherent space, and no less total space, then the previous slot.  */
-       if (from_reg == -1)
- 	{
--	  /* No known place to spill from => no slot to reuse.  */
--	  x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size,
-+	  /* No known place to spill from => no slot to reuse.
-+	     For the stack protection, an allocated slot should be placed in
-+	     the safe region from the stack smaching attack.  */
-+	  x = assign_stack_local_for_pseudo_reg (GET_MODE (regno_reg_rtx[i]), total_size,
- 				  inherent_size == total_size ? 0 : -1);
- 	  if (BYTES_BIG_ENDIAN)
- 	    /* Cancel the  big-endian correction done in assign_stack_local.
-diff -Naur gcc-3.4.0.orig/gcc/rtl.h gcc-3.4.0.ssp/gcc/rtl.h
---- gcc-3.4.0.orig/gcc/rtl.h	2004-03-25 16:44:43.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/rtl.h	2004-11-08 01:51:38.000000000 +0000
-@@ -473,6 +473,18 @@
- 			     __FUNCTION__);				\
-    _rtx; })
- 
-+#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9)	\
-+  __extension__								\
-+({ rtx const _rtx = (RTX);						\
-+   if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2			\
-+       && GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4			\
-+       && GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6			\
-+       && GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8			\
-+       && GET_CODE(_rtx) != C9)						\
-+     rtl_check_failed_flag  (NAME, _rtx, __FILE__, __LINE__,		\
-+			     __FUNCTION__);				\
-+   _rtx; })
-+
- extern void rtl_check_failed_flag (const char *, rtx, const char *,
- 				   int, const char *)
-     ATTRIBUTE_NORETURN
-@@ -488,6 +500,7 @@
- #define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6)		(RTX)
- #define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7)		(RTX)
- #define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8)	(RTX)
-+#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9)	(RTX)
- #endif
- 
- #define CLEAR_RTX_FLAGS(RTX)	\
-@@ -583,9 +596,9 @@
- #define LOG_LINKS(INSN)	XEXP(INSN, 7)
- 
- #define RTX_INTEGRATED_P(RTX)						\
--  (RTL_FLAG_CHECK8("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN,		\
-+  (RTL_FLAG_CHECK9("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN,		\
- 		   JUMP_INSN, INSN_LIST, BARRIER, CODE_LABEL, CONST,	\
--		   NOTE)->integrated)
-+		   PLUS, NOTE)->integrated)
- #define RTX_UNCHANGING_P(RTX)						\
-   (RTL_FLAG_CHECK3("RTX_UNCHANGING_P", (RTX), REG, MEM, CONCAT)->unchanging)
- #define RTX_FRAME_RELATED_P(RTX)					\
-@@ -1125,6 +1138,10 @@
-   (RTL_FLAG_CHECK3("MEM_VOLATILE_P", (RTX), MEM, ASM_OPERANDS,		\
- 		   ASM_INPUT)->volatil)
- 
-+/* 1 if RTX is an SET rtx that is not eliminated for the stack protection.  */
-+#define SET_VOLATILE_P(RTX)					\
-+  (RTL_FLAG_CHECK1("SET_VOLATILE_P", (RTX), SET)->volatil)
-+
- /* 1 if RTX is a mem that refers to an aggregate, either to the
-    aggregate itself of to a field of the aggregate.  If zero, RTX may
-    or may not be such a reference.  */
-diff -Naur gcc-3.4.0.orig/gcc/simplify-rtx.c gcc-3.4.0.ssp/gcc/simplify-rtx.c
---- gcc-3.4.0.orig/gcc/simplify-rtx.c	2004-01-24 11:05:08.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/simplify-rtx.c	2004-11-08 01:51:38.000000000 +0000
-@@ -2252,6 +2252,7 @@
-   int n_ops = 2, input_ops = 2, input_consts = 0, n_consts;
-   int first, changed;
-   int i, j;
-+  HOST_WIDE_INT fp_offset = 0;
- 
-   memset (ops, 0, sizeof ops);
- 
-@@ -2277,6 +2278,10 @@
- 	  switch (this_code)
- 	    {
- 	    case PLUS:
-+	    if (flag_propolice_protection
-+		&& XEXP (this_op, 0) == virtual_stack_vars_rtx
-+		&& GET_CODE (XEXP (this_op, 1)) == CONST_INT)
-+	      fp_offset = INTVAL (XEXP (this_op, 1));
- 	    case MINUS:
- 	      if (n_ops == 7)
- 		return NULL_RTX;
-@@ -2438,11 +2443,24 @@
-       && GET_CODE (ops[n_ops - 1].op) == CONST_INT
-       && CONSTANT_P (ops[n_ops - 2].op))
-     {
--      rtx value = ops[n_ops - 1].op;
--      if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
--	value = neg_const_int (mode, value);
--      ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
--      n_ops--;
-+      if (!flag_propolice_protection)
-+	{
-+	  rtx value = ops[n_ops - 1].op;
-+	  if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
-+	    value = neg_const_int (mode, value);
-+	  ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
-+	  n_ops--;
-+	}
-+      /* The stack protector keeps the addressing style of a local variable,
-+	 so it doesn't use neg_const_int function not to change
-+	 the offset value.  */
-+      else {
-+	HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
-+	if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
-+	  value = -value;
-+	ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, value);
-+	n_ops--;
-+      }
-     }
- 
-   /* Count the number of CONSTs that we generated.  */
-@@ -2460,6 +2478,59 @@
- 	  || (n_ops + n_consts == input_ops && n_consts <= input_consts)))
-     return NULL_RTX;
- 
-+  if (flag_propolice_protection)
-+    {
-+      /* keep the addressing style of local variables
-+	 as (plus (virtual_stack_vars_rtx) (CONST_int x)).
-+	 For the case array[r-1],
-+	 converts from (+ (+VFP c1) (+r -1)) to (SET R (+VFP c1)) (+ R (+r -1)).
-+
-+	 This loop finds ops[i] which is the register for the frame
-+	 addressing, Then, makes the frame addressing using the register and
-+	 the constant of ops[n_ops - 1].  */
-+      for (i = 0; i < n_ops; i++)
-+#ifdef FRAME_GROWS_DOWNWARD
-+	if (ops[i].op == virtual_stack_vars_rtx)
-+#else
-+	if (ops[i].op == virtual_stack_vars_rtx
-+	    || ops[i].op == frame_pointer_rtx)
-+#endif
-+	  {
-+	    if (GET_CODE (ops[n_ops - 1].op) == CONST_INT)
-+	      {
-+		HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
-+		if (value >= fp_offset)
-+		  {
-+		    ops[i].op = plus_constant (ops[i].op, value);
-+		    n_ops--;
-+		  }
-+		else
-+		  {
-+		    if (!force
-+			&& (n_ops + 1 + n_consts > input_ops
-+			    || (n_ops + 1 + n_consts == input_ops
-+				&& n_consts <= input_consts)))
-+		      return NULL_RTX;
-+		    ops[n_ops - 1].op = GEN_INT (value-fp_offset);
-+		    ops[i].op = plus_constant (ops[i].op, fp_offset);
-+		  }
-+	      }
-+	    /* keep the following address pattern;
-+	       (1) buf[BUFSIZE] is the first assigned variable.
-+	       (+ (+ fp -BUFSIZE) BUFSIZE)
-+	       (2) ((+ (+ fp 1) r) -1).  */
-+	    else if (fp_offset != 0)
-+	      return NULL_RTX;
-+	    /* keep the (+ fp 0) pattern for the following case;
-+	       (1) buf[i]: i: REG, buf: (+ fp 0) in !FRAME_GROWS_DOWNWARD
-+	       (2) argument: the address is (+ fp 0).  */
-+	    else if (fp_offset == 0)
-+	      return NULL_RTX;
-+
-+	    break;
-+	  }
-+    }
-+
-   /* Put a non-negated operand first, if possible.  */
- 
-   for (i = 0; i < n_ops && ops[i].neg; i++)
-diff -Naur gcc-3.4.0.orig/gcc/testsuite/gcc.dg/ssp-warn.c gcc-3.4.0.ssp/gcc/testsuite/gcc.dg/ssp-warn.c
---- gcc-3.4.0.orig/gcc/testsuite/gcc.dg/ssp-warn.c	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/testsuite/gcc.dg/ssp-warn.c	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,32 @@
-+/* { dg-do compile } */
-+/* { dg-options "-fstack-protector" } */
-+void
-+test1()
-+{
-+  void intest1(int *a)
-+    {
-+      *a ++;
-+    }
-+  
-+  char buf[80];
-+
-+  buf[0] = 0;
-+} /* { dg-bogus "not protecting function: it contains functions" } */
-+
-+void
-+test2(int n)
-+{
-+  char buf[80];
-+  char vbuf[n];
-+
-+  buf[0] = 0;
-+  vbuf[0] = 0;
-+} /* { dg-bogus "not protecting variables: it has a variable length buffer" } */
-+
-+void
-+test3()
-+{
-+  char buf[5];
-+
-+  buf[0] = 0;
-+} /* { dg-bogus "not protecting function: buffer is less than 8 bytes long" } */
-diff -Naur gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute.exp
---- gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute.exp	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,35 @@
-+#   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-+
-+# This program 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 of the License, or
-+# (at your option) any later version.
-+# 
-+# This program 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 program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
-+
-+if $tracelevel then {
-+    strace $tracelevel
-+}
-+
-+# Load support procs.
-+load_lib c-torture.exp
-+
-+#
-+# main test loop
-+#
-+
-+foreach src [lsort [glob -nocomplain $srcdir/$subdir/ssp-execute*.c]] {
-+    # If we're only testing specific files and this isn't one of them, skip it.
-+    if ![runtest_file_p $runtests $src] then {
-+	continue
-+    }
-+
-+    c-torture-execute $src -fstack-protector
-+}
-diff -Naur gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute1.c
---- gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute1.c	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,54 @@
-+/* Test location changes of character array.  */
-+
-+void
-+test(int i)
-+{
-+  int  ibuf1[10];
-+  char buf[50];
-+  int  ibuf2[10];
-+  char buf2[50000];
-+  int  ibuf3[10];
-+  char *p;
-+
-+  /* c1: the frame offset of buf[0]
-+     c2: the frame offset of buf2[0]
-+  */
-+  p= &buf[0]; *p=1;		/* expected rtl: (+ fp -c1) */
-+  if (*p != buf[0])
-+    abort();
-+  p= &buf[5]; *p=2;		/* expected rtl: (+ fp -c1+5) */
-+  if (*p != buf[5])
-+    abort();
-+  p= &buf[-1]; *p=3;		/* expected rtl: (+ (+ fp -c1) -1) */
-+  if (*p != buf[-1])
-+    abort();
-+  p= &buf[49]; *p=4;		/* expected rtl: (+ fp -c1+49) */
-+  if (*p != buf[49])
-+    abort();
-+  p = &buf[i+5]; *p=5;		/* expected rtl: (+ (+ fp -c1) (+ i 5)) */
-+  if (*p != buf[i+5])
-+    abort ();
-+  p = buf - 1; *p=6;		/* expected rtl: (+ (+ fp -c1) -1) */
-+  if (*p != buf[-1])
-+    abort ();
-+  p = 1 + buf; *p=7;		/* expected rtl: (+ (+ fp -c1) 1) */
-+  if (*p != buf[1])
-+    abort ();
-+  p = &buf[1] - 1; *p=8;	/* expected rtl: (+ (+ fp -c1+1) -1) */
-+  if (*p != buf[0])
-+    abort ();
-+
-+  /* test big offset which is greater than the max value of signed 16 bit integer.  */
-+  p = &buf2[45555]; *p=9;	/* expected rtl: (+ fp -c2+45555) */
-+  if (*p != buf2[45555])
-+    abort ();
-+}
-+
-+int main()
-+{
-+  test(10);
-+  exit(0);
-+}
-+
-+
-+  
-diff -Naur gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute2.c
---- gcc-3.4.0.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/testsuite/gcc.misc-tests/ssp-execute2.c	2004-11-08 01:51:38.000000000 +0000
-@@ -0,0 +1,49 @@
-+void
-+test(int i, char *j, int k)
-+{
-+  int  a[10];
-+  char b;
-+  int  c;
-+  long *d;
-+  char buf[50];
-+  long e[10];
-+  int  n;
-+
-+  a[0] = 4;
-+  b = 5;
-+  c = 6;
-+  d = (long*)7;
-+  e[0] = 8;
-+
-+  /* overflow buffer */
-+  for (n = 0; n < 120; n++)
-+    buf[n] = 0;
-+  
-+  if (j == 0 || *j != 2)
-+    abort ();
-+  if (a[0] == 0)
-+    abort ();
-+  if (b == 0)
-+    abort ();
-+  if (c == 0)
-+    abort ();
-+  if (d == 0)
-+    abort ();
-+  if (e[0] == 0)
-+    abort ();
-+
-+  exit (0);
-+}
-+
-+int main()
-+{
-+  int i, k;
-+  int j[40];
-+  i = 1;
-+  j[39] = 2;
-+  k = 3;
-+  test(i, &j[39], k);
-+}
-+
-+
-+  
-diff -Naur gcc-3.4.0.orig/gcc/toplev.c gcc-3.4.0.ssp/gcc/toplev.c
---- gcc-3.4.0.orig/gcc/toplev.c	2004-02-20 08:40:49.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/toplev.c	2004-11-08 01:51:38.000000000 +0000
-@@ -79,6 +79,7 @@
- #include "coverage.h"
- #include "value-prof.h"
- #include "alloc-pool.h"
-+#include "protector.h"
- 
- #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
- #include "dwarf2out.h"
-@@ -97,6 +98,10 @@
- 				   declarations for e.g. AIX 4.x.  */
- #endif
- 
-+#ifdef STACK_PROTECTOR
-+#include "protector.h"
-+#endif
-+
- #ifndef HAVE_conditional_execution
- #define HAVE_conditional_execution 0
- #endif
-@@ -979,6 +984,15 @@
-    minimum function alignment.  Zero means no alignment is forced.  */
- int force_align_functions_log;
- 
-+#if defined(STACK_PROTECTOR) && defined(STACK_GROWS_DOWNWARD)
-+/* Nonzero means use propolice as a stack protection method */
-+int flag_propolice_protection = 1;
-+int flag_stack_protection = 0;
-+#else
-+int flag_propolice_protection = 0;
-+int flag_stack_protection = 0;
-+#endif
-+
- typedef struct
- {
-   const char *const string;
-@@ -1154,7 +1168,9 @@
-   {"mem-report", &mem_report, 1 },
-   { "trapv", &flag_trapv, 1 },
-   { "wrapv", &flag_wrapv, 1 },
--  { "new-ra", &flag_new_regalloc, 1 }
-+  { "new-ra", &flag_new_regalloc, 1 },
-+  {"stack-protector", &flag_propolice_protection, 1 },
-+  {"stack-protector-all", &flag_stack_protection, 1 }
- };
- 
- /* Here is a table, controlled by the tm.h file, listing each -m switch
-@@ -2687,6 +2703,9 @@
- 
-   insns = get_insns ();
- 
-+  if (flag_propolice_protection)
-+    prepare_stack_protection (inlinable);
-+
-   /* Dump the rtl code if we are dumping rtl.  */
- 
-   if (open_dump_file (DFI_rtl, decl))
-@@ -4482,6 +4501,12 @@
-     /* The presence of IEEE signaling NaNs, implies all math can trap.  */
-     if (flag_signaling_nans)
-       flag_trapping_math = 1;
-+
-+  /* This combination makes optimized frame addressings and causes
-+    a internal compilation error at prepare_stack_protection.
-+    so don't allow it.  */
-+  if (flag_stack_protection && !flag_propolice_protection)
-+    flag_propolice_protection = TRUE;
- }
- 
- /* Initialize the compiler back end.  */
-diff -Naur gcc-3.4.0.orig/gcc/tree.h gcc-3.4.0.ssp/gcc/tree.h
---- gcc-3.4.0.orig/gcc/tree.h	2004-02-08 01:52:43.000000000 +0000
-+++ gcc-3.4.0.ssp/gcc/tree.h	2004-11-08 01:51:38.000000000 +0000
-@@ -1489,6 +1489,10 @@
-    where it is called.  */
- #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
- 
-+/* In a VAR_DECL, nonzero if the declaration is copied for inlining.
-+   The stack protector should keep its location in the stack.  */
-+#define DECL_COPIED(NODE) (VAR_DECL_CHECK (NODE)->decl.inline_flag)
-+
- /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
-    such as via the `inline' keyword in C/C++.  This flag controls the linkage
-    semantics of 'inline'; whether or not the function is inlined is

Deleted: trunk/hlfs/gcc-3.4.3-uClibc_conf-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-uClibc_conf-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-uClibc_conf-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,99 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2004-11-14
-Initial Package Version: 3.4.3
-Upstream Status: Not submitted - Hack
-ORIGIN: http://www.uclibc.org/cgi-bin/cvsweb/buildroot/toolchain/\
-        gcc/3.4.2/100-uclibc-conf.patch
-Description: This adds --target=*-*-linux-uclibc* needed for building a
-uClibc toolchain. All specs hunks and non-i386 hunks were removed from
-the original patch. Use this with the gcc-specs_conf patch.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-http://www.uclibc.org/
-
-diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
---- gcc-3.4.1-dist/gcc/config/t-linux-uclibc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.1/gcc/config/t-linux-uclibc	2004-08-12 15:54:43.000000000 -0500
-@@ -0,0 +1,15 @@
-+T_CFLAGS = -DUSE_UCLIBC
-+
-+# Compile crtbeginS.o and crtendS.o with pic.
-+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
-+# Compile libgcc2.a with pic.
-+TARGET_LIBGCC2_CFLAGS = -fPIC
-+
-+# Override t-slibgcc-elf-ver to export some libgcc symbols with
-+# the symbol versions that glibc used.
-+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
-+
-+# Use unwind-dw2-fde
-+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
-+  $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
-+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
-diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
---- gcc-3.4.1-dist/gcc/config.gcc	2004-04-21 10:12:35.000000000 -0500
-+++ gcc-3.4.1/gcc/config.gcc	2004-08-12 15:59:46.000000000 -0500
-@@ -988,6 +998,11 @@
- 		thread_file='single'
- 	fi
- 	;;
-+i[34567]86-*-linux*uclibc*)	# Intel 80386's running GNU/Linux
-+				# with ELF format using uClibc
-+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
-+	tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
-+	;;
- i[34567]86-*-linux*)	# Intel 80386's running GNU/Linux
- 			# with ELF format using glibc 2
- 			# aka GNU/Linux C library 6
-diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
---- gcc-3.4.1-dist/libtool.m4	2004-05-18 04:08:37.000000000 -0500
-+++ gcc-3.4.1/libtool.m4	2004-08-12 15:54:43.000000000 -0500
-@@ -689,6 +689,11 @@
-   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-   ;;
- 
-+linux-uclibc*)
-+  lt_cv_deplibs_check_method=pass_all
-+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+  ;;
-+
- netbsd*)
-   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
-diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
---- gcc-3.4.1-dist/ltconfig	2004-03-05 15:05:41.000000000 -0600
-+++ gcc-3.4.1/ltconfig	2004-08-12 15:55:48.000000000 -0500
-@@ -602,6 +602,7 @@
- 
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
-+linux-uclibc*) ;;
- linux-gnu*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-@@ -1262,6 +1263,24 @@
-   dynamic_linker='GNU/Linux ld.so'
-   ;;
- 
-+linux-uclibc*)
-+  version_type=linux
-+  need_lib_prefix=no
-+  need_version=no
-+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-+  soname_spec='${libname}${release}.so$major'
-+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-+  shlibpath_var=LD_LIBRARY_PATH
-+  shlibpath_overrides_runpath=no
-+  # This implies no fast_install, which is unacceptable.
-+  # Some rework will be needed to allow for fast_install
-+  # before this can be enabled.
-+  # Note: copied from linux-gnu, and may not be appropriate.
-+  hardcode_into_libs=yes
-+  # Assume using the uClibc dynamic linker.
-+  dynamic_linker="uClibc ld.so"
-+  ;;
-+
- netbsd*)
-   need_lib_prefix=no
-   need_version=no

Deleted: trunk/hlfs/gcc-3.4.3-uClibc_libstdc++-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-uClibc_libstdc++-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-uClibc_libstdc++-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,59 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2004-11-14
-Initial Package Version: 3.4.3
-Upstream Status: Not submitted - Hack
-ORIGIN: http://www.uclibc.org/cgi-bin/cvsweb/buildroot/toolchain/\
-	gcc/3.4.2/300-libstdc++-pic.patch
-Description: This installs libstdc++_pic.a for uclibc.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-http://www.uclibc.org/
-
-# DP: Build and install libstdc++_pic.a library.
-
---- gcc/libstdc++-v3/src/Makefile.am~	2003-02-28 09:21:05.000000000 +0100
-+++ gcc/libstdc++-v3/src/Makefile.am	2003-02-28 09:28:50.000000000 +0100
-@@ -224,6 +224,10 @@
- 	  @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
- 
- 
-+install-exec-local:
-+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
-+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
-+
- # Added bits to build debug library.
- if GLIBCPP_BUILD_DEBUG
- all-local: build_debug
-
---- gcc/libstdc++-v3/src/Makefile.in~	2004-02-21 09:55:48.000000000 +0100
-+++ gcc/libstdc++-v3/src/Makefile.in	2004-02-21 09:59:34.000000000 +0100
-@@ -585,7 +585,7 @@
- 
- install-data-am: install-data-local
- 
--install-exec-am: install-toolexeclibLTLIBRARIES
-+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
- 
- install-info: install-info-am
- 
-@@ -618,6 +618,7 @@
- 	distclean-tags distdir dvi dvi-am info info-am install \
- 	install-am install-data install-data-am install-data-local \
- 	install-exec install-exec-am install-info install-info-am \
-+	install-exec-local \
- 	install-man install-strip install-toolexeclibLTLIBRARIES \
- 	installcheck installcheck-am installdirs maintainer-clean \
- 	maintainer-clean-generic mostlyclean mostlyclean-compile \
-@@ -707,6 +708,11 @@
- install_debug:
- 	(cd ${debugdir} && $(MAKE) \
- 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
-+
-+install-exec-local:
-+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
-+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
-+
- # 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:

Deleted: trunk/hlfs/gcc-3.4.3-uClibc_locale-1.patch
===================================================================
--- trunk/hlfs/gcc-3.4.3-uClibc_locale-1.patch	2005-06-08 16:25:15 UTC (rev 964)
+++ trunk/hlfs/gcc-3.4.3-uClibc_locale-1.patch	2005-06-08 16:28:00 UTC (rev 965)
@@ -1,3258 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2004-11-14
-Initial Package Version: 3.4.3
-Upstream Status: Not submitted - Hack
-ORIGIN: http://www.uclibc.org/cgi-bin/cvsweb/buildroot/toolchain/\
-	gcc/3.4.2/200-uclibc-locale.patch
-Description: This adds uclibc c++ locale definitions to GCC.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-http://www.uclibc.org/
-
-diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4
---- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4	2004-07-15 12:42:45.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/acinclude.m4	2004-09-10 10:47:40.000000000 -0500
-@@ -996,7 +996,7 @@
-   AC_MSG_CHECKING([for C locale to use])
-   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
-     [use MODEL for target locale package],
--    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
-+    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
-   
-   # If they didn't use this option switch, or if they specified --enable
-   # with no specific model, we'll have to look for one.  If they
-@@ -1012,6 +1012,9 @@
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case x${target_os} in
-+      x*-uclibc*)
-+        enable_clocale_flag=uclibc
-+        ;;
-       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
-         AC_EGREP_CPP([_GLIBCXX_ok], [
-         #include <features.h>
-@@ -1138,6 +1141,41 @@
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      AC_MSG_RESULT(uclibc)
-+
-+      # 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"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+      AC_SUBST(glibcxx_MOFILES)
-+      AC_SUBST(glibcxx_POFILES)
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4
---- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4	2004-08-13 15:44:03.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/aclocal.m4	2004-09-10 10:47:40.000000000 -0500
-@@ -1025,6 +1025,9 @@
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case x${target_os} in
-+      x*-uclibc*)
-+	enable_clocale_flag=uclibc
-+	;;
-       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
-         AC_EGREP_CPP([_GLIBCXX_ok], [
-         #include <features.h>
-@@ -1151,6 +1154,41 @@
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      AC_MSG_RESULT(uclibc)
-+
-+      # 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"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+      AC_SUBST(glibcxx_MOFILES)
-+      AC_SUBST(glibcxx_POFILES)
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,59 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004 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.
-+
-+// Written by Jakub Jelinek <jakub at redhat.com>
-+
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+                                                  
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#endif // GLIBC 2.3 and later
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 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 at redhat.com>
-+
-+#include <cerrno>  // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L)         strtof((S), (E))
-+#define __strtod_l(S, E, L)         strtod((S), (E))
-+#define __strtold_l(S, E, L)        strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c)        NULL
-+#define __freelocale(a)             ((void)0)
-+#define __duplocale(a)              __c_locale()
-+#endif
-+
-+namespace std 
-+{
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  float __f = __strtof_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __f;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  double __d = __strtod_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __d;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __ld;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  void
-+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
-+				    __c_locale __old)
-+  {
-+    __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    if (!__cloc)
-+      {
-+	// This named locale is not supported by the underlying OS.
-+	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+			      "name not valid"));
-+      }
-+#endif
-+  }
-+  
-+  void
-+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+  {
-+    if (_S_get_c_locale() != __cloc)
-+      __freelocale(__cloc); 
-+  }
-+
-+  __c_locale
-+  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+  { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+    {
-+      "LC_CTYPE", 
-+      "LC_NUMERIC",
-+      "LC_TIME", 
-+      "LC_COLLATE", 
-+      "LC_MONETARY",
-+      "LC_MESSAGES", 
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+      "LC_PAPER", 
-+      "LC_NAME", 
-+      "LC_ADDRESS",
-+      "LC_TELEPHONE", 
-+      "LC_MEASUREMENT", 
-+      "LC_IDENTIFICATION" 
-+#endif
-+    };
-+}
-+
-+namespace std
-+{
-+  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+}  // namespace std
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h	2004-09-10 10:48:08.000000000 -0500
-@@ -0,0 +1,115 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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 at redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring>              // get std::strlen
-+#include <cstdio>               // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h>		// For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h>		// For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> 		// For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+ 
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+  extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+  typedef __locale_t		__c_locale;
-+#else
-+  typedef int*			__c_locale;
-+#endif
-+
-+  // Convert numeric value of type _Tv to string and return length of
-+  // string.  If snprintf is available use it, otherwise fall back to
-+  // the unsafe sprintf which, in general, can be dangerous and should
-+  // be avoided.
-+  template<typename _Tv>
-+    int
-+    __convert_from_v(char* __out, const int __size, const char* __fmt,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+		     _Tv __v, const __c_locale& __cloc, int __prec)
-+    {
-+      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+		     _Tv __v, const __c_locale&, int __prec)
-+    {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+      char* __old = std::setlocale(LC_ALL, NULL);
-+      char* __sav = new char[std::strlen(__old) + 1];
-+      std::strcpy(__sav, __old);
-+      std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      std::setlocale(LC_ALL, __sav);
-+      delete [] __sav;
-+#endif
-+      return __ret;
-+    }
-+}
-+
-+#endif
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,306 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 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
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+  // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  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 = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+    // in case we fall back to wcrtomb and then continue, in a loop.
-+    // NB: wcsnrtombs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+						      __from_end - __from_next);
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+					 __from_chunk_end - __from_next,
-+					 __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // wcrtomb.
-+	    for (; __from < __from_next; ++__from)
-+	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+	    __state = __tmp_state;
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    extern_type __buf[MB_LEN_MAX];
-+	    __tmp_state = __state;
-+	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+	    if (__conv > static_cast<size_t>(__to_end - __to_next))
-+	      __ret = partial;
-+	    else
-+	      {
-+		memcpy(__to_next, __buf, __conv);
-+		__state = __tmp_state;
-+		__to_next += __conv;
-+		++__from_next;
-+	      }
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret; 
-+  }
-+  
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  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 = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we store a L'\0' and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+								  __from_end
-+								  - __from_next));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+				   __from_chunk_end - __from_next,
-+				   __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (;; ++__to_next, __from += __conv)
-+	      {
-+		__conv = mbrtowc(__to_next, __from, __from_end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __from_next = __from;
-+	    __state = __tmp_state;	    
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    // It is unclear what to return in this case (see DR 382). 
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    if (__to_next < __to_end)
-+	      {
-+		// XXX Probably wrong for stateful encodings
-+		__tmp_state = __state;		
-+		++__from_next;
-+		*__to_next++ = L'\0';
-+	      }
-+	    else
-+	      __ret = partial;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret; 
-+  }
-+
-+  int 
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_encoding() const throw()
-+  {
-+    // XXX This implementation assumes that the encoding is
-+    // stateless and is either single-byte or variable-width.
-+    int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    if (MB_CUR_MAX == 1)
-+      __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }  
-+
-+  int 
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_max_length() const throw()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    // XXX Probably wrong for stateful encodings.
-+    int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }
-+  
-+  int 
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_length(state_type& __state, const extern_type* __from,
-+	    const extern_type* __end, size_t __max) const
-+  {
-+    int __ret = 0;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we advance past it and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+  
-+    // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+    // its fourth parameter (it wouldn't with NULL as first parameter).
-+    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
-+							   * __max));
-+    while (__from < __end && __max)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+								  __end
-+								  - __from));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __end;
-+
-+	const extern_type* __tmp_from = __from;
-+	size_t __conv = mbsnrtowcs(__to, &__from,
-+				   __from_chunk_end - __from,
-+				   __max, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (__from = __tmp_from;; __from += __conv)
-+	      {
-+		__conv = mbrtowc(NULL, __from, __end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __state = __tmp_state;
-+	    __ret += __from - __tmp_from;
-+	    break;
-+	  }
-+	if (!__from)
-+	  __from = __from_chunk_end;
-+	
-+	__ret += __from - __tmp_from;
-+	__max -= __conv;
-+
-+	if (__from < __end && __max)
-+	  {
-+	    // XXX Probably wrong for stateful encodings
-+	    __tmp_state = __state;
-+	    ++__from;
-+	    ++__ret;
-+	    --__max;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret; 
-+  }
-+#endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 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.4.1.2  collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+  // These are basically extensions to char_traits, and perhaps should
-+  // be put there instead of here.
-+  template<>
-+    int 
-+    collate<char>::_M_compare(const char* __one, const char* __two) const
-+    { 
-+      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+  
-+  template<>
-+    size_t
-+    collate<char>::_M_transform(char* __to, const char* __from, 
-+				size_t __n) const 
-+    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    int 
-+    collate<wchar_t>::_M_compare(const wchar_t* __one, 
-+				 const wchar_t* __two) const
-+    {
-+      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+  
-+  template<>
-+    size_t
-+    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+				   size_t __n) const
-+    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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.1.2  ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L)           wctype((S))
-+#define __towupper_l(C, L)         towupper((C))
-+#define __towlower_l(C, L)         towlower((C))
-+#define __iswctype_l(C, M, L)      iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+  // NB: The other ctype<char> specializations are in src/locale.cc and
-+  // various /config/os/* files.
-+  template<>
-+    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+    : ctype<char>(0, false, __refs) 
-+    { 		
-+      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	{
-+	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T  
-+  ctype<wchar_t>::__wmask_type
-+  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+  {
-+    __wmask_type __ret;
-+    switch (__m)
-+      {
-+      case space:
-+	__ret = __wctype_l("space", _M_c_locale_ctype);
-+	break;
-+      case print:
-+	__ret = __wctype_l("print", _M_c_locale_ctype);
-+	break;
-+      case cntrl:
-+	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+	break;
-+      case upper:
-+	__ret = __wctype_l("upper", _M_c_locale_ctype);
-+	break;
-+      case lower:
-+	__ret = __wctype_l("lower", _M_c_locale_ctype);
-+	break;
-+      case alpha:
-+	__ret = __wctype_l("alpha", _M_c_locale_ctype);
-+	break;
-+      case digit:
-+	__ret = __wctype_l("digit", _M_c_locale_ctype);
-+	break;
-+      case punct:
-+	__ret = __wctype_l("punct", _M_c_locale_ctype);
-+	break;
-+      case xdigit:
-+	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+	break;
-+      case alnum:
-+	__ret = __wctype_l("alnum", _M_c_locale_ctype);
-+	break;
-+      case graph:
-+	__ret = __wctype_l("graph", _M_c_locale_ctype);
-+	break;
-+      default:
-+	__ret = 0;
-+      }
-+    return __ret;
-+  }
-+  
-+  wchar_t
-+  ctype<wchar_t>::do_toupper(wchar_t __c) const
-+  { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+  
-+  wchar_t
-+  ctype<wchar_t>::do_tolower(wchar_t __c) const
-+  { return __towlower_l(__c, _M_c_locale_ctype); }
-+  
-+  const wchar_t*
-+  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+
-+  bool
-+  ctype<wchar_t>::
-+  do_is(mask __m, wchar_t __c) const
-+  { 
-+    // Highest bitmask in ctype_base == 10, but extra in "C"
-+    // library for blank.
-+    bool __ret = false;
-+    const size_t __bitmasksize = 11; 
-+    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+      if (__m & _M_bit[__bitcur]
-+	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	{
-+	  __ret = true;
-+	  break;
-+	}
-+    return __ret;    
-+  }
-+  
-+  const wchar_t* 
-+  ctype<wchar_t>::
-+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+  {
-+    for (; __lo < __hi; ++__vec, ++__lo)
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11; 
-+	mask __m = 0;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	    __m |= _M_bit[__bitcur];
-+	*__vec = __m;
-+      }
-+    return __hi;
-+  }
-+  
-+  const wchar_t* 
-+  ctype<wchar_t>::
-+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi && !this->do_is(__m, *__lo))
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+  {
-+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::
-+  do_widen(char __c) const
-+  { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+  const char* 
-+  ctype<wchar_t>::
-+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+  {
-+    while (__lo < __hi)
-+      {
-+	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+	++__lo;
-+	++__dest;
-+      }
-+    return __hi;
-+  }
-+
-+  char
-+  ctype<wchar_t>::
-+  do_narrow(wchar_t __wc, char __dfault) const
-+  {
-+    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+      return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
-+	    char* __dest) const
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    if (_M_narrow_ok)
-+      while (__lo < __hi)
-+	{
-+	  if (*__lo >= 0 && *__lo < 128)
-+	    *__dest = _M_narrow[*__lo];
-+	  else
-+	    {
-+	      const int __c = wctob(*__lo);
-+	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	    }
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+    else
-+      while (__lo < __hi)
-+	{
-+	  const int __c = wctob(*__lo);
-+	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __hi;
-+  }
-+
-+  void
-+  ctype<wchar_t>::_M_initialize_ctype()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    wint_t __i;
-+    for (__i = 0; __i < 128; ++__i)
-+      {
-+	const int __c = wctob(__i);
-+	if (__c == EOF)
-+	  break;
-+	else
-+	  _M_narrow[__i] = static_cast<char>(__c);
-+      }
-+    if (__i == 128)
-+      _M_narrow_ok = true;
-+    else
-+      _M_narrow_ok = false;
-+    for (size_t __j = 0;
-+	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+      _M_widen[__j] = btowc(__j);
-+
-+    for (size_t __k = 0; __k <= 11; ++__k)
-+      { 
-+	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+      }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+  }
-+#endif //  _GLIBCXX_USE_WCHAR_T
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 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 at redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+			     const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+  // Specializations.
-+  template<>
-+    string
-+    messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+      __uselocale(__old);
-+      return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      const char* __msg = gettext(__dfault.c_str());
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return string(__msg);
-+#else
-+      const char* __msg = gettext(__dfault.c_str());
-+      return string(__msg);
-+#endif
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    wstring
-+    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+    {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      __uselocale(__old);
-+      return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return _M_convert_from_char(__msg);
-+# else
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      return _M_convert_from_char(__msg);
-+# endif
-+    }
-+#endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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 functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+				  const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D)           ((void)0)
-+#define __bindtextdomain(D,P)     ((void)0)
-+#endif
-+
-+  // Non-virtual member functions.
-+  template<typename _CharT>
-+     messages<_CharT>::messages(size_t __refs)
-+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
-+     _M_name_messages(_S_get_c_name())
-+     { }
-+
-+  template<typename _CharT>
-+     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
-+				size_t __refs) 
-+     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+     _M_name_messages(__s)
-+     {
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       _M_name_messages = __tmp;
-+     }
-+
-+  template<typename _CharT>
-+    typename 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_name_messages != _S_get_c_name())
-+	delete [] _M_name_messages;
-+      _S_destroy_c_locale(_M_c_locale_messages); 
-+    }
-+
-+  template<typename _CharT>
-+    typename 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>
-+    void    
-+    messages<_CharT>::do_close(catalog) const 
-+    { }
-+
-+   // messages_byname
-+   template<typename _CharT>
-+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+     : messages<_CharT>(__refs) 
-+     { 
-+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+	 delete [] this->_M_name_messages;
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       this->_M_name_messages = __tmp;
-+
-+       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	 {
-+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
-+	 }
-+     }
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,698 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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.6.3.2  moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  // Construct and return valid pattern consisting of some combination of:
-+  // space none symbol sign value
-+  money_base::pattern
-+  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+  { 
-+    pattern __ret;
-+
-+    // This insanely complicated routine attempts to construct a valid
-+    // pattern for use with monyepunct. A couple of invariants:
-+
-+    // if (__precedes) symbol -> value
-+    // else value -> symbol
-+    
-+    // if (__space) space
-+    // else none
-+
-+    // none == never first
-+    // space never first or last
-+
-+    // Any elegant implementations of this are welcome.
-+    switch (__posn)
-+      {
-+      case 0:
-+      case 1:
-+	// 1 The sign precedes the value and symbol.
-+	__ret.field[0] = sign;
-+	if (__space)
-+	  {
-+	    // Pattern starts with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[3] = symbol;
-+	      }
-+	    __ret.field[2] = space;
-+	  }
-+	else
-+	  {
-+	    // Pattern starts with sign and ends with none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 2:
-+	// 2 The sign follows the value and symbol.
-+	if (__space)
-+	  {
-+	    // Pattern either ends with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[1] = space;
-+	    __ret.field[3] = sign;
-+	  }
-+	else
-+	  {
-+	    // Pattern ends with sign then none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[1] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[1] = symbol;
-+	      }
-+	    __ret.field[2] = sign;
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 3:
-+	// 3 The sign immediately precedes the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = sign;
-+	    __ret.field[1] = symbol;	    
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;		
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = symbol;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = sign;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      case 4:
-+	// 4 The sign immediately follows the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = symbol;
-+	    __ret.field[1] = sign;
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = sign;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      default:
-+	;
-+      }
-+    return __ret;
-+  }
-+
-+  template<> 
-+    void
-+    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
-+						     const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == true
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
-+							__nposn);
-+	}
-+    }
-+
-+  template<> 
-+    void
-+    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
-+						      const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, false>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == false
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
-+							__nposn);
-+	}
-+    }
-+
-+  template<> 
-+    moneypunct<char, true>::~moneypunct()
-+    { delete _M_data; }
-+
-+  template<> 
-+    moneypunct<char, false>::~moneypunct()
-+    { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<> 
-+    void
-+    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+							const char*)
-+#else
-+							const char* __name)
-+#endif
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  unsigned char uc;
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    {
-+	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-+	      _M_data->_M_atoms[__i] = btowc(uc);
-+	    }
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  try
-+	    {
-+	      mbstate_t __state;
-+	      size_t __len = strlen(__cpossign);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+	      
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{ 
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+	      
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+	  catch (...)
-+	    {
-+	      delete _M_data;
-+	      _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;	      
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+	      __throw_exception_again;
-+	    } 
-+	  
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
-+							__nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<> 
-+  void
-+  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+						       const char*)
-+#else
-+                                                       const char* __name)
-+#endif
-+  {
-+    if (!_M_data)
-+      _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+    if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+          _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  unsigned char uc;
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    {
-+	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-+	      _M_data->_M_atoms[__i] = btowc(uc);
-+	    }
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  try
-+            {
-+              mbstate_t __state;
-+              size_t __len;
-+              __len = strlen(__cpossign);
-+              if (__len)
-+                {
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+	      
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{ 
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+          catch (...)
-+	    {
-+	      delete _M_data;
-+              _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;	      
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+              __throw_exception_again;
-+	    }
-+
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
-+	                                                __pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
-+	                                                __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<> 
-+    moneypunct<wchar_t, true>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+
-+  template<> 
-+    moneypunct<wchar_t, false>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+#endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,183 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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.3.1.2  numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<> 
-+    void
-+    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
-+							__cloc));
-+
-+	  // Check for NULL, which implies no grouping.
-+	  if (_M_data->_M_thousands_sep == '\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = "true";
-+      _M_data->_M_truename_size = strlen(_M_data->_M_truename);
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = "false";
-+      _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
-+    }
-+ 
-+  template<> 
-+    numpunct<char>::~numpunct()
-+    { delete _M_data; }
-+   
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<> 
-+    void
-+    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<wchar_t>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(_S_get_c_locale());
-+#endif
-+	  // Use ctype::widen code without the facet...
-+	  unsigned char uc;
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    {
-+	      uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
-+	      _M_data->_M_atoms_out[__i] = btowc(uc);
-+	    }
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    {
-+	      uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
-+	      _M_data->_M_atoms_in[__j] = btowc(uc);
-+	    }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#endif
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
-+
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
-+#endif
-+
-+	  if (_M_data->_M_thousands_sep == L'\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = L"true";
-+      _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = L"false";
-+      _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
-+    }
-+
-+  template<> 
-+    numpunct<wchar_t>::~numpunct()
-+    { delete _M_data; }
-+ #endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc	2004-09-10 10:48:00.000000000 -0500
-@@ -0,0 +1,356 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    __timepunct<char>::
-+    _M_put(char* __s, size_t __maxlen, const char* __format, 
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = '\0';
-+    }
-+
-+  template<> 
-+    void
-+    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = "%m/%d/%y";
-+	  _M_data->_M_date_era_format = "%m/%d/%y";
-+	  _M_data->_M_time_format = "%H:%M:%S";
-+	  _M_data->_M_time_era_format = "%H:%M:%S";
-+	  _M_data->_M_date_time_format = "";
-+	  _M_data->_M_date_time_era_format = "";
-+	  _M_data->_M_am = "AM";
-+	  _M_data->_M_pm = "PM";
-+	  _M_data->_M_am_pm_format = "";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = "Sunday";
-+	  _M_data->_M_day2 = "Monday";
-+	  _M_data->_M_day3 = "Tuesday";
-+	  _M_data->_M_day4 = "Wednesday";
-+	  _M_data->_M_day5 = "Thursday";
-+	  _M_data->_M_day6 = "Friday";
-+	  _M_data->_M_day7 = "Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = "Sun";
-+	  _M_data->_M_aday2 = "Mon";
-+	  _M_data->_M_aday3 = "Tue";
-+	  _M_data->_M_aday4 = "Wed";
-+	  _M_data->_M_aday5 = "Thu";
-+	  _M_data->_M_aday6 = "Fri";
-+	  _M_data->_M_aday7 = "Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = "January";
-+	  _M_data->_M_month02 = "February";
-+	  _M_data->_M_month03 = "March";
-+	  _M_data->_M_month04 = "April";
-+	  _M_data->_M_month05 = "May";
-+	  _M_data->_M_month06 = "June";
-+	  _M_data->_M_month07 = "July";
-+	  _M_data->_M_month08 = "August";
-+	  _M_data->_M_month09 = "September";
-+	  _M_data->_M_month10 = "October";
-+	  _M_data->_M_month11 = "November";
-+	  _M_data->_M_month12 = "December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = "Jan";
-+	  _M_data->_M_amonth02 = "Feb";
-+	  _M_data->_M_amonth03 = "Mar";
-+	  _M_data->_M_amonth04 = "Apr";
-+	  _M_data->_M_amonth05 = "May";
-+	  _M_data->_M_amonth06 = "Jun";
-+	  _M_data->_M_amonth07 = "Jul";
-+	  _M_data->_M_amonth08 = "Aug";
-+	  _M_data->_M_amonth09 = "Sep";
-+	  _M_data->_M_amonth10 = "Oct";
-+	  _M_data->_M_amonth11 = "Nov";
-+	  _M_data->_M_amonth12 = "Dec";
-+	}
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
-+
-+	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
-+	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    __timepunct<wchar_t>::
-+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = L'\0';
-+    }
-+
-+  template<> 
-+    void
-+    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+//       if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = L"%m/%d/%y";
-+	  _M_data->_M_date_era_format = L"%m/%d/%y";
-+	  _M_data->_M_time_format = L"%H:%M:%S";
-+	  _M_data->_M_time_era_format = L"%H:%M:%S";
-+	  _M_data->_M_date_time_format = L"";
-+	  _M_data->_M_date_time_era_format = L"";
-+	  _M_data->_M_am = L"AM";
-+	  _M_data->_M_pm = L"PM";
-+	  _M_data->_M_am_pm_format = L"";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = L"Sunday";
-+	  _M_data->_M_day2 = L"Monday";
-+	  _M_data->_M_day3 = L"Tuesday";
-+	  _M_data->_M_day4 = L"Wednesday";
-+	  _M_data->_M_day5 = L"Thursday";
-+	  _M_data->_M_day6 = L"Friday";
-+	  _M_data->_M_day7 = L"Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = L"Sun";
-+	  _M_data->_M_aday2 = L"Mon";
-+	  _M_data->_M_aday3 = L"Tue";
-+	  _M_data->_M_aday4 = L"Wed";
-+	  _M_data->_M_aday5 = L"Thu";
-+	  _M_data->_M_aday6 = L"Fri";
-+	  _M_data->_M_aday7 = L"Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = L"January";
-+	  _M_data->_M_month02 = L"February";
-+	  _M_data->_M_month03 = L"March";
-+	  _M_data->_M_month04 = L"April";
-+	  _M_data->_M_month05 = L"May";
-+	  _M_data->_M_month06 = L"June";
-+	  _M_data->_M_month07 = L"July";
-+	  _M_data->_M_month08 = L"August";
-+	  _M_data->_M_month09 = L"September";
-+	  _M_data->_M_month10 = L"October";
-+	  _M_data->_M_month11 = L"November";
-+	  _M_data->_M_month12 = L"December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = L"Jan";
-+	  _M_data->_M_amonth02 = L"Feb";
-+	  _M_data->_M_amonth03 = L"Mar";
-+	  _M_data->_M_amonth04 = L"Apr";
-+	  _M_data->_M_amonth05 = L"May";
-+	  _M_data->_M_amonth06 = L"Jun";
-+	  _M_data->_M_amonth07 = L"Jul";
-+	  _M_data->_M_amonth08 = L"Aug";
-+	  _M_data->_M_amonth09 = L"Sep";
-+	  _M_data->_M_amonth10 = L"Oct";
-+	  _M_data->_M_amonth11 = L"Nov";
-+	  _M_data->_M_amonth12 = L"Dec";
-+	}
-+#if 0
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
-+
-+	  _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
-+	  _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
-+	  _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
-+	  _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
-+	  _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
-+	  _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
-+	  _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
-+	  _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
-+	  _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
-+	  _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
-+	  _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
-+	  _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
-+	  _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
-+	  _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
-+	  _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
-+	  _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
-+	  _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
-+	  _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
-+	  _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
-+	  _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
-+	  _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
-+	  _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
-+	  _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
-+	  _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
-+	  _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
-+	  _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
-+	  _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
-+	  _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
-+	  _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
-+	  _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
-+	  _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
-+	  _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
-+	  _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
-+	  _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
-+	  _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
-+	  _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
-+	  _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
-+	  _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
-+	  _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
-+	  _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
-+	  _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
-+	  _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
-+	  _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
-+	}
-+#endif // 0
-+    }
-+#endif
-+}
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h
---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 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.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz at redhat.com>
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(size_t __refs) 
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
-+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+				     size_t __refs) 
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
-+    _M_name_timepunct(__s)
-+    { 
-+      char* __tmp = new char[std::strlen(__s) + 1];
-+      std::strcpy(__tmp, __s);
-+      _M_name_timepunct = __tmp;
-+      _M_initialize_timepunct(__cloc); 
-+    }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::~__timepunct()
-+    { 
-+      if (_M_name_timepunct != _S_get_c_name())
-+	delete [] _M_name_timepunct;
-+      delete _M_data; 
-+      _S_destroy_c_locale(_M_c_locale_timepunct); 
-+    }
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h
---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,58 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
-+// 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.1  Locales
-+//
-+  
-+// Information as gleaned from /usr/include/ctype.h
-+  
-+  struct ctype_base
-+  {
-+    // Note: In uClibc, the following two types depend on configuration.
-+ 
-+    // Non-standard typedefs.
-+    typedef const __ctype_touplow_t* __to_type;
-+
-+    // NB: Offsets into ctype<char>::_M_table force a particular size
-+    // on the mask type. Because of this, we don't use an enum.
-+    typedef __ctype_mask_t	mask;   
-+    static const mask upper    	= _ISupper;
-+    static const mask lower 	= _ISlower;
-+    static const mask alpha 	= _ISalpha;
-+    static const mask digit 	= _ISdigit;
-+    static const mask xdigit 	= _ISxdigit;
-+    static const mask space 	= _ISspace;
-+    static const mask print 	= _ISprint;
-+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
-+    static const mask cntrl 	= _IScntrl;
-+    static const mask punct 	= _ISpunct;
-+    static const mask alnum 	= _ISalpha | _ISdigit;
-+  };
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h
---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,69 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 2000, 2002 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.1  Locales
-+//
-+  
-+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
-+// functions go in ctype.cc
-+  
-+  bool
-+  ctype<char>::
-+  is(mask __m, char __c) const
-+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
-+
-+  const char*
-+  ctype<char>::
-+  is(const char* __low, const char* __high, mask* __vec) const
-+  {
-+    while (__low < __high)
-+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
-+    return __high;
-+  }
-+
-+  const char*
-+  ctype<char>::
-+  scan_is(mask __m, const char* __low, const char* __high) const
-+  {
-+    while (__low < __high 
-+	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
-+      ++__low;
-+    return __low;
-+  }
-+
-+  const char*
-+  ctype<char>::
-+  scan_not(mask __m, const char* __low, const char* __high) const
-+  {
-+    while (__low < __high 
-+	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
-+      ++__low;
-+    return __low;
-+  }
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h
---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,92 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
-+// 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.1  Locales
-+//
-+  
-+// Information as gleaned from /usr/include/ctype.h
-+
-+  const ctype_base::mask*
-+  ctype<char>::classic_table() throw()
-+  { return __C_ctype_b; }
-+
-+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
-+		     size_t __refs) 
-+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
-+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
-+  {
-+    _M_toupper = __C_ctype_toupper;
-+    _M_tolower = __C_ctype_tolower;
-+    _M_table = __table ? __table : __C_ctype_b;
-+    memset(_M_widen, 0, sizeof(_M_widen));
-+    memset(_M_narrow, 0, sizeof(_M_narrow));
-+  }
-+
-+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
-+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
-+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
-+  {
-+    _M_toupper = __C_ctype_toupper;
-+    _M_tolower = __C_ctype_tolower;
-+    _M_table = __table ? __table : __C_ctype_b;
-+    memset(_M_widen, 0, sizeof(_M_widen));
-+    memset(_M_narrow, 0, sizeof(_M_narrow));
-+  }
-+
-+  char
-+  ctype<char>::do_toupper(char __c) const
-+  { return _M_toupper[static_cast<unsigned char>(__c)]; }
-+
-+  const char*
-+  ctype<char>::do_toupper(char* __low, const char* __high) const
-+  {
-+    while (__low < __high)
-+      {
-+	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
-+	++__low;
-+      }
-+    return __high;
-+  }
-+
-+  char
-+  ctype<char>::do_tolower(char __c) const
-+  { return _M_tolower[static_cast<unsigned char>(__c)]; }
-+
-+  const char* 
-+  ctype<char>::do_tolower(char* __low, const char* __high) const
-+  {
-+    while (__low < __high)
-+      {
-+	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
-+	++__low;
-+      }
-+    return __high;
-+  }
-diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h
---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 18:00:00.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h	2004-09-10 10:47:40.000000000 -0500
-@@ -0,0 +1,44 @@
-+// Specific definitions for GNU/Linux  -*- C++ -*-
-+
-+// Copyright (C) 2000, 2001, 2002, 2003 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.
-+
-+#ifndef _GLIBCXX_OS_DEFINES
-+#define _GLIBCXX_OS_DEFINES 1
-+
-+// System-specific #define, typedefs, corrections, etc, go here.  This
-+// file will come before all others.
-+
-+// This keeps isanum, et al from being propagated as macros.
-+#define __NO_CTYPE 1
-+
-+#include <features.h>
-+
-+// We must not see the optimized string functions GNU libc defines.
-+#define __NO_STRING_INLINES
-+
-+#endif
-diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure
---- gcc-3.4.2-dist/libstdc++-v3/configure	2004-08-13 15:44:04.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/configure	2004-09-10 10:47:40.000000000 -0500
-@@ -3878,6 +3878,11 @@
-   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-   ;;
- 
-+linux-uclibc*)
-+  lt_cv_deplibs_check_method=pass_all
-+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+  ;;
-+
- netbsd*)
-   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-@@ -5545,6 +5550,9 @@
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case x${target_os} in
-+      xlinux-uclibc*)
-+	enable_clocale_flag=uclibc
-+	;;
-       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
-         cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
-@@ -5759,6 +5767,77 @@
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      echo "$as_me:$LINENO: result: uclibc" >&5
-+echo "${ECHO_T}uclibc" >&6
-+
-+      # 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"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+  if test -n "$check_msgfmt"; then
-+  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+  for ac_exec_ext in '' $ac_executable_extensions; do
-+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+    ac_cv_prog_check_msgfmt="yes"
-+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+done
-+
-+  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
-+echo "${ECHO_T}$check_msgfmt" >&6
-+else
-+  echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+
-+
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host
---- gcc-3.4.2-dist/libstdc++-v3/configure.host	2004-08-27 14:52:30.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/configure.host	2004-09-10 10:47:40.000000000 -0500
-@@ -217,6 +217,12 @@
-     ;;
- esac
- 
-+# Override for uClibc since linux-uclibc gets mishandled above.
-+case "${host_os}" in
-+  *-uclibc*)
-+    os_include_dir="os/uclibc"
-+    ;;
-+esac
- 
- # Set any OS-dependent and CPU-dependent bits.
- # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
-diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4
---- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4	2004-07-06 20:23:49.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/crossconfig.m4	2004-09-10 10:47:40.000000000 -0500
-@@ -138,6 +138,99 @@
- 	;;
-     esac
-     ;;
-+  *-uclibc*)
-+# Temporary hack until we implement the float versions of the libm funcs
-+    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
-+      machine/endian.h machine/param.h sys/machine.h sys/types.h \
-+      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
-+    SECTION_FLAGS='-ffunction-sections -fdata-sections'
-+    AC_SUBST(SECTION_FLAGS)
-+    GLIBCXX_CHECK_LINKER_FEATURES
-+    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
-+    GLIBCXX_CHECK_WCHAR_T_SUPPORT
-+
-+    # For LFS.
-+    AC_DEFINE(HAVE_INT64_T)
-+    case "$target" in
-+      *-uclinux*)
-+        # Don't enable LFS with uClinux
-+        ;;
-+      *)
-+        AC_DEFINE(_GLIBCXX_USE_LFS)
-+    esac
-+
-+    # For showmanyc_helper().
-+    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
-+    GLIBCXX_CHECK_POLL
-+    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
-+
-+    # For xsputn_2().
-+    AC_CHECK_HEADERS(sys/uio.h)
-+    GLIBCXX_CHECK_WRITEV
-+
-+#     AC_DEFINE(HAVE_ACOSF)
-+#     AC_DEFINE(HAVE_ASINF)
-+#     AC_DEFINE(HAVE_ATANF)
-+#     AC_DEFINE(HAVE_ATAN2F)
-+    AC_DEFINE(HAVE_CEILF)
-+    AC_DEFINE(HAVE_COPYSIGN)
-+#     AC_DEFINE(HAVE_COPYSIGNF)
-+#     AC_DEFINE(HAVE_COSF)
-+#     AC_DEFINE(HAVE_COSHF)
-+#     AC_DEFINE(HAVE_EXPF)
-+#     AC_DEFINE(HAVE_FABSF)
-+    AC_DEFINE(HAVE_FINITE)
-+    AC_DEFINE(HAVE_FINITEF)
-+    AC_DEFINE(HAVE_FLOORF)
-+#     AC_DEFINE(HAVE_FMODF)
-+#     AC_DEFINE(HAVE_FREXPF)
-+    AC_DEFINE(HAVE_HYPOT)
-+#     AC_DEFINE(HAVE_HYPOTF)
-+    AC_DEFINE(HAVE_ISINF)
-+    AC_DEFINE(HAVE_ISINFF)
-+    AC_DEFINE(HAVE_ISNAN)
-+    AC_DEFINE(HAVE_ISNANF)
-+#     AC_DEFINE(HAVE_LOGF)
-+#     AC_DEFINE(HAVE_LOG10F)
-+#     AC_DEFINE(HAVE_MODFF)
-+#     AC_DEFINE(HAVE_SINF)
-+#     AC_DEFINE(HAVE_SINHF)
-+#     AC_DEFINE(HAVE_SINCOS)
-+#     AC_DEFINE(HAVE_SINCOSF)
-+    AC_DEFINE(HAVE_SQRTF)
-+#     AC_DEFINE(HAVE_TANF)
-+#     AC_DEFINE(HAVE_TANHF)
-+    if test x"long_double_math_on_this_cpu" = x"yes"; then
-+      AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
-+#       AC_DEFINE(HAVE_ACOSL)
-+#       AC_DEFINE(HAVE_ASINL)
-+#       AC_DEFINE(HAVE_ATANL)
-+#       AC_DEFINE(HAVE_ATAN2L)
-+#       AC_DEFINE(HAVE_CEILL)
-+#       AC_DEFINE(HAVE_COPYSIGNL)
-+#       AC_DEFINE(HAVE_COSL)
-+#       AC_DEFINE(HAVE_COSHL)
-+#       AC_DEFINE(HAVE_EXPL)
-+#       AC_DEFINE(HAVE_FABSL)
-+#       AC_DEFINE(HAVE_FINITEL)
-+#       AC_DEFINE(HAVE_FLOORL)
-+#       AC_DEFINE(HAVE_FMODL)
-+#       AC_DEFINE(HAVE_FREXPL)
-+#       AC_DEFINE(HAVE_HYPOTL)
-+#       AC_DEFINE(HAVE_ISINFL)
-+#       AC_DEFINE(HAVE_ISNANL)
-+#       AC_DEFINE(HAVE_LOGL)
-+#       AC_DEFINE(HAVE_LOG10L)
-+#       AC_DEFINE(HAVE_MODFL)
-+#       AC_DEFINE(HAVE_POWL)
-+#       AC_DEFINE(HAVE_SINL)
-+#       AC_DEFINE(HAVE_SINHL)
-+#       AC_DEFINE(HAVE_SINCOSL)
-+#       AC_DEFINE(HAVE_SQRTL)
-+#       AC_DEFINE(HAVE_TANL)
-+#       AC_DEFINE(HAVE_TANHL)
-+    fi
-+    ;;
-   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
-     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
-       machine/endian.h machine/param.h sys/machine.h sys/types.h \
-@@ -152,7 +245,7 @@
-     AC_DEFINE(HAVE_INT64_T)
-     case "$target" in
-       *-uclinux*)
--        # Don't enable LFS with uClibc
-+        # Don't enable LFS with uClinux
-         ;;
-       *)
-         AC_DEFINE(_GLIBCXX_USE_LFS)
-diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h
---- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h	2003-12-08 21:51:45.000000000 -0600
-+++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h	2004-09-10 10:47:40.000000000 -0500
-@@ -101,7 +101,9 @@
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
- 
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h
---- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h	2004-07-20 03:52:12.000000000 -0500
-+++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h	2004-09-10 10:47:40.000000000 -0500
-@@ -179,7 +179,9 @@
-   using ::wcscoll;
-   using ::wcscpy;
-   using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
-   using ::wcsftime;
-+#endif
-   using ::wcslen;
-   using ::wcsncat;
-   using ::wcsncmp;




More information about the patches mailing list