From d636e5e3a6ffb6cdd659c0d997c7bd2986f754a0 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 12 Sep 2005 08:58:24 +0000 Subject: packages/libschedule/libschedule_0.15.bb: switch back to .gz since the libschedule.pc in the .bz2 seems to be broken --- packages/libschedule/libschedule_0.15.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/libschedule/libschedule_0.15.bb b/packages/libschedule/libschedule_0.15.bb index 65ab15bc13..e53fd44e85 100644 --- a/packages/libschedule/libschedule_0.15.bb +++ b/packages/libschedule/libschedule_0.15.bb @@ -1,11 +1,11 @@ LICENSE = "LGPL" -PR = "r2" +PR = "r3" DESCRIPTION = "RTC alarm handling library for GPE" SECTION = "gpe/libs" PRIORITY = "optional" MAINTAINER = "Philip Blundell " DEPENDS = "glib-2.0 sqlite" -GPE_TARBALL_SUFFIX = "bz2" +GPE_TARBALL_SUFFIX = "gz" inherit autotools libtool pkgconfig gpe -- cgit v1.2.3 From d39d6f16bc063a02bc53b4c493358ae2e2025159 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 12 Sep 2005 09:27:15 +0000 Subject: packages/abiword/ : add abiword 2.3.6 and patches --- packages/abiword/abiword-2.3.6/.mtn2git_empty | 0 packages/abiword/abiword-2.3.6/cdump-hack.patch | 11 ++++++ packages/abiword/abiword_2.3.6.bb | 52 +++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 packages/abiword/abiword-2.3.6/.mtn2git_empty create mode 100644 packages/abiword/abiword-2.3.6/cdump-hack.patch create mode 100644 packages/abiword/abiword_2.3.6.bb diff --git a/packages/abiword/abiword-2.3.6/.mtn2git_empty b/packages/abiword/abiword-2.3.6/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/abiword/abiword-2.3.6/cdump-hack.patch b/packages/abiword/abiword-2.3.6/cdump-hack.patch new file mode 100644 index 0000000000..afe75287e5 --- /dev/null +++ b/packages/abiword/abiword-2.3.6/cdump-hack.patch @@ -0,0 +1,11 @@ +--- abi/src/wp/ap/xp/GNUmakefile.am.orig 2005-05-09 21:33:34.915201456 +0000 ++++ abi/src/wp/ap/xp/GNUmakefile.am 2005-05-09 21:33:49.341008400 +0000 +@@ -107,7 +107,7 @@ + ap_wp_sidebar.cpp + + CDUMP=$(top_srcdir)/src/tools/cdump/xp/cdump.c +-CDUMPAPP=$(top_builddir)/src/tools/cdump/xp/cdump ++CDUMPAPP=cdump + + ap_wp_splash.cpp: $(CDUMP) $(srcdir)/splash.png + $(CDUMPAPP) $(srcdir)/splash.png g_pngSplash > ap_wp_splash.cpp diff --git a/packages/abiword/abiword_2.3.6.bb b/packages/abiword/abiword_2.3.6.bb new file mode 100644 index 0000000000..76b569db29 --- /dev/null +++ b/packages/abiword/abiword_2.3.6.bb @@ -0,0 +1,52 @@ +DESCRIPTION ="AbiWord is free word processing program similar to Microsoft(r) Word"" +HOMEPAGE="http://www.abiword.org"" +MAINTAINER="Koen Kooi " +LICENSE="GPLv2" + +DEPENDS = "cdump-native libgsf libgnomeprint libgnomeprintui libglade libfribidi enchant jpeg libpng perl glibc libxml2" +RDEPENDS = "enchant glibc-gconv-ibm850 glibc-gconv-cp1252 \ + glibc-gconv-iso8859-15 glibc-gconv-iso8859-1" +PR="r4" + +SRC_URI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz \ + file://cdump-hack.patch;patch=1" +S = "${WORKDIR}/abiword-${PV}/abi" + +FILES_${PN} += " ${datadir}/icons/* \ +${datadir}/AbiSuite-2.2/AbiWord/glade \ +${datadir}/AbiSuite-2.2/AbiWord/scripts \ +${datadir}/AbiSuite-2.2/AbiWord/system.profile-en \ +${datadir}/AbiSuite-2.2/AbiWord/system.profile-en_GB \ +#${datadir}/AbiSuite-2.2/templates/A4.awt \ +#${datadir}/AbiSuite-2.2/templates/US-Letter.awt \ +${datadir}/AbiSuite-2.2/templates/normal.awt \ +${datadir}/AbiSuite-2.2/templates/normal.awt-en_GB \ +${datadir}/AbiSuite-2.2/templates/Employee-Directory.awt \ +${datadir}/AbiSuite-2.2/templates/Business-Report.awt \ +${datadir}/AbiSuite-2.2/templates/Fax-Coversheet.awt \ +${datadir}/AbiSuite-2.2/templates/Resume.awt \ +${datadir}/AbiSuite-2.2/templates/Two-Columns.awt \ +${datadir}/AbiSuite-2.2/templates/Memo.awt \ +${datadir}/AbiSuite-2.2/templates/Press-Release.awt " + +inherit autotools + +#abiword needs this native tool +export BUILD_CDUMPTOOL="${STAGING_BINDIR}/cdump" + +PARALLEL_MAKE="" + +do_configure () { + cd ${S} + ./autogen.sh + ./configure --prefix=/usr --host=${TARGET_SYS} --disable-pspell --enable-enchant +# --enable-debug + cp -f ${STAGING_BINDIR}/cdump src/tools/cdump/xp/ +} + +do_install_append() { + install -d ${D}${datadir}/pixmaps/ + mv ${D}${datadir}/icons/* ${D}${datadir}/pixmaps/ +} + + -- cgit v1.2.3 From 4d1ff99b4ce88be90171e9f62066a4d09ef7bafc Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 12 Sep 2005 10:04:26 +0000 Subject: gcc-csl/, gcc-snapshot/: remove unused gcc cruft. All necessary gcc metadate already is in gcc/ --- packages/gcc-csl/.mtn2git_empty | 0 packages/gcc-csl/gcc-csl-2004-q1a/.mtn2git_empty | 0 .../gcc-csl-2004-q1a/gcc-3.4.0-arm-lib1asm.patch | 24 - .../gcc-3.4.0-arm-nolibfloat.patch | 16 - .../gcc-uclibc-3.4.0-100-conf.patch | 550 ---- .../gcc-uclibc-3.4.0-120-softfloat.patch | 14 - .../gcc-uclibc-3.4.0-200-code.patch | 3078 -------------------- .../gcc-csl/gcc-csl-2004-q1a/gcc34-15089.patch | 19 - .../gcc-csl/gcc-csl-2004-q1a/gcc34-15666.patch | 23 - .../gcc-csl-2004-q1a/gcc34-arm-ldm-peephole.patch | 79 - .../gcc-csl/gcc-csl-2004-q1a/gcc34-arm-ldm.patch | 119 - .../gcc-csl/gcc-csl-2004-q1a/gcc34-arm-tune.patch | 9 - .../gcc-csl-2004-q1a/gcc34-pre-modify.patch | 11 - .../gcc-csl-2004-q1a/gcc34-reverse-compare.patch | 32 - packages/gcc-csl/gcc-csl-cross-initial_2004-q1a.bb | 28 - packages/gcc-csl/gcc-csl-cross_2004-q1a.bb | 93 - packages/gcc-csl/gcc-csl_2004-q1a.bb | 230 -- packages/gcc-snapshot/.mtn2git_empty | 0 .../gcc-snapshot/gcc-snapshot-cross-initial_cvs.bb | 28 - packages/gcc-snapshot/gcc-snapshot-cross_cvs.bb | 93 - packages/gcc-snapshot/gcc-snapshot_cvs.bb | 209 -- 21 files changed, 4655 deletions(-) delete mode 100644 packages/gcc-csl/.mtn2git_empty delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/.mtn2git_empty delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-lib1asm.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-nolibfloat.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-100-conf.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-120-softfloat.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-200-code.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-15089.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-15666.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-arm-ldm-peephole.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-arm-ldm.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-arm-tune.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-pre-modify.patch delete mode 100644 packages/gcc-csl/gcc-csl-2004-q1a/gcc34-reverse-compare.patch delete mode 100644 packages/gcc-csl/gcc-csl-cross-initial_2004-q1a.bb delete mode 100644 packages/gcc-csl/gcc-csl-cross_2004-q1a.bb delete mode 100644 packages/gcc-csl/gcc-csl_2004-q1a.bb delete mode 100644 packages/gcc-snapshot/.mtn2git_empty delete mode 100644 packages/gcc-snapshot/gcc-snapshot-cross-initial_cvs.bb delete mode 100644 packages/gcc-snapshot/gcc-snapshot-cross_cvs.bb delete mode 100644 packages/gcc-snapshot/gcc-snapshot_cvs.bb diff --git a/packages/gcc-csl/.mtn2git_empty b/packages/gcc-csl/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/.mtn2git_empty b/packages/gcc-csl/gcc-csl-2004-q1a/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-lib1asm.patch b/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-lib1asm.patch deleted file mode 100644 index ca42bfbc0a..0000000000 --- a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-lib1asm.patch +++ /dev/null @@ -1,24 +0,0 @@ -# Fixes errors like the following when building glibc (or any other executable -# or shared library) when using gcc 3.4.0 for ARM with softfloat: -# -# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3' -# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3' -# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3' -# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2' -# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi' - -diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux ---- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200 -+++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200 -@@ -4,7 +4,10 @@ - LIBGCC2_DEBUG_CFLAGS = -g0 - - LIB1ASMSRC = arm/lib1funcs.asm --LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx -+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _fixsfsi _fixunssfsi - - # MULTILIB_OPTIONS = mhard-float/msoft-float - # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-nolibfloat.patch b/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-nolibfloat.patch deleted file mode 100644 index a2bf0d97c9..0000000000 --- a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-3.4.0-arm-nolibfloat.patch +++ /dev/null @@ -1,16 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- gcc-2004-q1a/gcc/config/arm/linux-elf.h~gcc-3.4.0-arm-nolibfloat -+++ gcc-2004-q1a/gcc/config/arm/linux-elf.h -@@ -55,7 +55,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add - the GNU/Linux magical crtbegin.o file (see crtstuff.c) which diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-100-conf.patch b/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-100-conf.patch deleted file mode 100644 index 38a28bfb22..0000000000 --- a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-100-conf.patch +++ /dev/null @@ -1,550 +0,0 @@ ---- gcc-3.4.0/gcc/config/arm/linux-elf.h~gcc-uclibc-3.4.0-100-conf.patch 2004-01-31 01:18:11.000000000 -0500 -+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-23 20:48:46.000000000 -0400 -@@ -81,6 +81,7 @@ - "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" - - #undef LINK_SPEC -+#ifndef USE_UCLIBC - #define LINK_SPEC "%{h*} %{version:-v} \ - %{b} %{Wl,*:%*} \ - %{static:-Bstatic} \ -@@ -91,6 +92,18 @@ - -X \ - %{mbig-endian:-EB}" \ - SUBTARGET_EXTRA_LINK_SPEC -+#else -+#define LINK_SPEC "%{h*} %{version:-v} \ -+ %{b} %{Wl,*:%*} \ -+ %{static:-Bstatic} \ -+ %{shared:-shared} \ -+ %{symbolic:-Bsymbolic} \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \ -+ -X \ -+ %{mbig-endian:-EB}" \ -+ SUBTARGET_EXTRA_LINK_SPEC -+#endif - - #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() - ---- gcc-3.4.0/gcc/config/cris/linux.h~gcc-uclibc-3.4.0-100-conf.patch 2003-11-28 22:08:09.000000000 -0500 -+++ gcc-3.4.0/gcc/config/cris/linux.h 2004-04-23 20:48:46.000000000 -0400 -@@ -79,6 +79,25 @@ - #undef CRIS_DEFAULT_CPU_VERSION - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - -+#ifdef USE_UCLIBC -+ -+#undef CRIS_SUBTARGET_VERSION -+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" -+ -+#undef CRIS_LINK_SUBTARGET_SPEC -+#define CRIS_LINK_SUBTARGET_SPEC \ -+ "-mcrislinux\ -+ -rpath-link include/asm/../..%s\ -+ %{shared} %{static}\ -+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ -+ %{!shared: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ -+ %{!r:%{O2|O3: --gc-sections}}" -+ -+#else /* USE_UCLIBC */ -+ - #undef CRIS_SUBTARGET_VERSION - #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" - -@@ -93,6 +112,8 @@ - %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ - %{!r:%{O2|O3: --gc-sections}}" - -+#endif /* USE_UCLIBC */ -+ - - /* Node: Run-time Target */ - ---- gcc-3.4.0/gcc/config/i386/linux.h~gcc-uclibc-3.4.0-100-conf.patch 2003-11-28 22:08:10.000000000 -0500 -+++ gcc-3.4.0/gcc/config/i386/linux.h 2004-04-23 20:48:46.000000000 -0400 -@@ -118,6 +118,7 @@ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ - %{static:-static}}}" - #else -+#ifndef USE_UCLIBC - #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ -@@ -125,6 +126,15 @@ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{static:-static}}}" -+#else -+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ -+ %{!shared: \ -+ %{!ibcs: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}}}" -+#endif - #endif - - /* A C statement (sans semicolon) to output to the stdio stream ---- gcc-3.4.0/gcc/config/mips/linux.h~gcc-uclibc-3.4.0-100-conf.patch 2004-02-19 16:45:21.000000000 -0500 -+++ gcc-3.4.0/gcc/config/mips/linux.h 2004-04-23 20:48:46.000000000 -0400 -@@ -109,6 +109,7 @@ - - /* Borrowed from sparc/linux.h */ - #undef LINK_SPEC -+#ifndef USE_UCLIBC - #define LINK_SPEC \ - "%(endian_spec) \ - %{shared:-shared} \ -@@ -118,6 +119,17 @@ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ - %{static:-static}}}" -+#else -+#define LINK_SPEC \ -+ "%(endian_spec) \ -+ %{shared:-shared} \ -+ %{!shared: \ -+ %{!ibcs: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}}}" -+#endif - - #undef SUBTARGET_ASM_SPEC - #define SUBTARGET_ASM_SPEC "\ ---- gcc-3.4.0/gcc/config/rs6000/linux.h~gcc-uclibc-3.4.0-100-conf.patch 2004-02-25 10:11:19.000000000 -0500 -+++ gcc-3.4.0/gcc/config/rs6000/linux.h 2004-04-23 20:48:46.000000000 -0400 -@@ -61,7 +61,11 @@ - #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" - - #undef LINK_OS_DEFAULT_SPEC -+#ifdef USE_UCLIBC -+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" -+#else - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" -+#endif - - #define LINK_GCC_C_SEQUENCE_SPEC \ - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" ---- gcc-3.4.0/gcc/config/rs6000/sysv4.h~gcc-uclibc-3.4.0-100-conf.patch 2004-03-02 17:34:58.000000000 -0500 -+++ gcc-3.4.0/gcc/config/rs6000/sysv4.h 2004-04-23 20:48:46.000000000 -0400 -@@ -949,6 +949,7 @@ - msim : %(link_os_sim) ; \ - mwindiss : %(link_os_windiss) ; \ - mcall-freebsd: %(link_os_freebsd) ; \ -+ mcall-uclibc : %(link_os_linux_uclibc); \ - mcall-linux : %(link_os_linux) ; \ - mcall-gnu : %(link_os_gnu) ; \ - mcall-netbsd : %(link_os_netbsd) ; \ -@@ -1235,6 +1236,12 @@ - - #define LINK_OS_WINDISS_SPEC "" - -+/* uClibc support for Linux. */ -+ -+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" -+ - /* Define any extra SPECS that the compiler needs to generate. */ - /* Override rs6000.h definition. */ - #undef SUBTARGET_EXTRA_SPECS -@@ -1299,6 +1306,7 @@ - { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_windiss", LINK_OS_WINDISS_SPEC }, \ -+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \ - { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ ---- gcc-3.4.0/gcc/config/sh/linux.h~gcc-uclibc-3.4.0-100-conf.patch 2004-01-11 21:29:13.000000000 -0500 -+++ gcc-3.4.0/gcc/config/sh/linux.h 2004-04-23 20:48:46.000000000 -0400 -@@ -73,12 +73,21 @@ - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" - #undef SUBTARGET_LINK_SPEC -+#ifndef USE_UCLIBC - #define SUBTARGET_LINK_SPEC \ - "%{shared:-shared} \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{static:-static}" -+#else -+#define SUBTARGET_LINK_SPEC \ -+ "%{shared:-shared} \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}" -+#endif - - #undef LIB_SPEC - #define LIB_SPEC \ ---- gcc-3.4.0/gcc/config.gcc~gcc-uclibc-3.4.0-100-conf.patch 2004-04-16 22:28:24.000000000 -0400 -+++ gcc-3.4.0/gcc/config.gcc 2004-04-23 20:48:46.000000000 -0400 -@@ -664,6 +664,17 @@ - extra_parts="" - use_collect2=yes - ;; -+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc -+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" -+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" -+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" -+ gnu_ld=yes -+ case x${enable_threads} in -+ x | xyes | xpthreads | xposix) -+ thread_file='posix' -+ ;; -+ esac -+ ;; - arm*-*-linux*) # ARM GNU/Linux with ELF - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" - tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" -@@ -725,6 +736,10 @@ - tmake_file="cris/t-cris cris/t-elfmulti" - gas=yes - ;; -+cris-*-linux-uclibc*) -+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" -+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc" -+ ;; - cris-*-linux*) - tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" - tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" -@@ -988,6 +1003,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 -@@ -1547,6 +1567,16 @@ - gnu_ld=yes - gas=yes - ;; -+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc -+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" -+ case ${target} in -+ mipsisa32*-*) -+ target_cpu_default="MASK_SOFT_FLOAT" -+ tm_defines="MIPS_ISA_DEFAULT=32" -+ ;; -+ esac -+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux" -+ ;; - mips*-*-linux*) # Linux MIPS, either endian. - tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" - case ${target} in -@@ -1764,6 +1794,11 @@ - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h" - tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" - ;; -+powerpc-*-linux-uclibc*) -+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" -+ out_file=rs6000/rs6000.c -+ tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm" -+ ;; - powerpc-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" - tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" -@@ -1924,9 +1959,17 @@ - tmake_file="${tmake_file} sh/t-le" - ;; - esac -- tmake_file="${tmake_file} sh/t-linux" -+ case ${target} in -+ *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;; -+ *) tmake_file="${tmake_file} sh/t-linux" ;; -+ esac - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h" - case ${target} in -+ sh64*-*-linux-uclibc*) -+ tmake_file="${tmake_file} sh/t-sh64-uclibc" -+ tm_file="${tm_file} sh/sh64.h" -+ extra_headers="shmedia.h ushmedia.h sshmedia.h" -+ ;; - sh64*) - tmake_file="${tmake_file} sh/t-sh64" - tm_file="${tm_file} sh/sh64.h" ---- gcc-3.4.0/libstdc++-v3/include/c_std/std_cwchar.h~gcc-uclibc-3.4.0-100-conf.patch 2003-12-08 22:44:35.000000000 -0500 -+++ gcc-3.4.0/libstdc++-v3/include/c_std/std_cwchar.h 2004-04-23 20:48:46.000000000 -0400 -@@ -179,7 +179,9 @@ - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#ifdef HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; ---- gcc-3.4.0/libstdc++-v3/aclocal.m4~gcc-uclibc-3.4.0-100-conf.patch 2004-03-18 12:35:23.000000000 -0500 -+++ gcc-3.4.0/libstdc++-v3/aclocal.m4 2004-04-23 21:36:59.000000000 -0400 -@@ -1024,6 +1024,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) - AC_EGREP_CPP([_GLIBCXX_ok], [ - #include -@@ -1133,6 +1136,41 @@ - CTIME_CC=config/locale/gnu/time_members.cc - CLOCALE_INTERNAL_H=config/locale/gnu/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/uclibc/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 -+ ;; - ieee_1003.1-2001) - AC_MSG_RESULT(IEEE 1003.1) - ---- gcc-3.4.0/libstdc++-v3/configure~gcc-uclibc-3.4.0-100-conf.patch 2004-03-18 12:35:25.000000000 -0500 -+++ gcc-3.4.0/libstdc++-v3/configure 2004-04-23 21:37:24.000000000 -0400 -@@ -5545,6 +5545,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" -@@ -5741,6 +5744,77 @@ - CTIME_CC=config/locale/gnu/time_members.cc - CLOCALE_INTERNAL_H=config/locale/gnu/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/uclibc/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 -+ ;; - ieee_1003.1-2001) - echo "$as_me:$LINENO: result: IEEE 1003.1" >&5 - echo "${ECHO_T}IEEE 1003.1" >&6 ---- gcc-3.4.0/libstdc++-v3/configure.host~gcc-uclibc-3.4.0-100-conf.patch 2004-03-18 12:36:12.000000000 -0500 -+++ gcc-3.4.0/libstdc++-v3/configure.host 2004-04-23 20:48:46.000000000 -0400 -@@ -161,6 +161,9 @@ - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-uclibc*) -+ os_include_dir="os/uclibc" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - os_include_dir="os/gnu-linux" - ;; ---- gcc-3.4.0/ltconfig~gcc-uclibc-3.4.0-100-conf.patch 2004-03-05 16:05:41.000000000 -0500 -+++ gcc-3.4.0/ltconfig 2004-04-23 20:48:46.000000000 -0400 -@@ -603,6 +603,7 @@ - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in - linux-gnu*) ;; -+linux-uclibc*) ;; - 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 ---- /dev/null 2003-09-15 09:40:47.000000000 -0400 -+++ gcc-3.4.0/gcc/config/cris/t-linux-uclibc 2004-04-22 20:00:41.000000000 -0400 -@@ -0,0 +1,3 @@ -+T_CFLAGS = -DUSE_UCLIBC -+TARGET_LIBGCC2_CFLAGS += -fPIC -+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS) ---- /dev/null 2003-09-15 09:40:47.000000000 -0400 -+++ gcc-3.4.0/gcc/config/sh/t-linux-uclibc 2004-04-22 20:00:41.000000000 -0400 -@@ -0,0 +1,16 @@ -+T_CFLAGS = -DUSE_UCLIBC -+ -+# Don't run fixproto -+STMP_FIXPROTO = -+ -+TARGET_LIBGCC2_CFLAGS = -fpic -+LIB1ASMFUNCS_CACHE = _ic_invalidate -+ -+LIB2FUNCS_EXTRA= -+ -+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4 -+MULTILIB_DIRNAMES= -+MULTILIB_MATCHES = -+MULTILIB_EXCEPTIONS= -+ -+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o ---- /dev/null 2003-09-15 09:40:47.000000000 -0400 -+++ gcc-3.4.0/gcc/config/sh/t-sh64-uclibc 2004-04-22 20:00:41.000000000 -0400 -@@ -0,0 +1,13 @@ -+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o -+ -+LIB1ASMFUNCS = \ -+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ -+ _shcompact_call_trampoline _shcompact_return_trampoline \ -+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \ -+ _push_pop_shmedia_regs \ -+ _udivdi3 _divdi3 _umoddi3 _moddi3 -+ -+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu -+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64 -+MULTILIB_MATCHES= -+MULTILIB_EXCEPTIONS= ---- /dev/null 2003-09-15 09:40:47.000000000 -0400 -+++ gcc-3.4.0/gcc/config/t-linux-uclibc 2004-04-22 20:00:41.000000000 -0400 -@@ -0,0 +1,23 @@ -+T_CFLAGS = -DUSE_UCLIBC -+ -+# Don't run fixproto -+STMP_FIXPROTO = -+ -+# 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-glibc -+#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ -+# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -+#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c -+ -+# Use unwind-dw2-fde -+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ -+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-120-softfloat.patch b/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-120-softfloat.patch deleted file mode 100644 index f2431896cf..0000000000 --- a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-120-softfloat.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500 -+++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600 -@@ -1418,6 +1418,11 @@ - fi - - FLAGS_FOR_TARGET= -+case " $targargs " in -+ *" --nfp "* | *" --without-float "*) -+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float' -+ ;; -+esac - case " $target_configdirs " in - *" newlib "*) - case " $targargs " in diff --git a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-200-code.patch b/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-200-code.patch deleted file mode 100644 index e9bec3cf60..0000000000 --- a/packages/gcc-csl/gcc-csl-2004-q1a/gcc-uclibc-3.4.0-200-code.patch +++ /dev/null @@ -1,3078 +0,0 @@ -Warning! This patch is not finished. The wide char time-related stuff -is broken or non-functional. But it serves as a starting point to get -things building while I continue to work on the uClibc locale internals. -diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ---- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2004-01-09 07:55:02.000000000 -0600 -@@ -0,0 +1,63 @@ -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- -+ -+// Copyright (C) 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. -+ -+// Written by Jakub Jelinek -+ -+#include -+ -+#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(strtol_l) __strtol_l; -+extern "C" __typeof(strtoll_l) __strtoll_l; -+extern "C" __typeof(strtoul_l) __strtoul_l; -+extern "C" __typeof(strtoull_l) __strtoull_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.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.cc ---- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2004-01-09 08:37:55.000000000 -0600 -@@ -0,0 +1,166 @@ -+// 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 -+ -+#include -+#include -+#include -+#include -+#include -+ -+#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)) -+#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 && *__sanity == '\0' && 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 && *__sanity == '\0' && 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 && *__sanity == '\0' && 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) -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __cloc = __newlocale(1 << LC_ALL, __s, __old); -+ if (!__cloc) -+ { -+ // This named locale is not supported by the underlying OS. -+ __throw_runtime_error("attempt to create locale from unknown name"); -+ } -+#else -+ __cloc = NULL; -+#endif -+ } -+ -+ void -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); -+#else -+ __cloc = NULL; -+#endif -+ } -+ -+ __c_locale -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc) -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ { return __duplocale(__cloc); } -+#else -+ { return __c_locale(); } -+#endif -+} // namespace std -+ -+namespace __uclibc_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 = __uclibc_cxx::category_names; -+} // namespace std -diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.h ---- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.h 2004-01-09 07:51:06.000000000 -0600 -@@ -0,0 +1,118 @@ -+// 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 -+ -+#ifndef _CXX_BITS_C_LOCALE_H -+#define _CXX_BITS_C_LOCALE_H 1 -+ -+#pragma GCC system_header -+ -+#include -+#include // For codecvt -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this -+#endif -+#ifdef __UCLIBC_HAS_LOCALE__ -+#include // For codecvt using iconv, iconv_t -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#include // 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 -+ int -+ __convert_from_v(char* __out, const int __size, const char* __fmt, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ _Tv __v, const __c_locale& __cloc, int __prec = -1) -+ { -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc); -+#else -+ _Tv __v, const __c_locale&, int __prec = -1) -+ { -+# ifdef __UCLIBC_HAS_LOCALE__ -+ char* __old = setlocale(LC_ALL, NULL); -+ char* __sav = static_cast(malloc(strlen(__old) + 1)); -+ if (__sav) -+ strcpy(__sav, __old); -+ setlocale(LC_ALL, "C"); -+# endif -+#endif -+ -+ int __ret; -+ if (__prec >= 0) -+ __ret = snprintf(__out, __size, __fmt, __prec, __v); -+ else -+ __ret = snprintf(__out, __size, __fmt, __v); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __gnu_cxx::__uselocale(__old); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ setlocale(LC_ALL, __sav); -+ free(__sav); -+#endif -+ return __ret; -+ } -+} -+ -+#endif -diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ---- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2004-01-09 04:04:34.000000000 -0600 -@@ -0,0 +1,113 @@ -+// 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 -+ -+#include -+#include -+ -+namespace std -+{ -+ // Specializations. -+#ifdef _GLIBCXX_USE_WCHAR_T -+ codecvt_base::result -+ codecvt:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = error; -+ size_t __len = min(__from_end - __from, __to_end - __to); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_S_get_c_locale()); -+#endif -+ size_t __conv = wcsrtombs(__to, &__from, __len, &__state); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ if (__conv == __len) -+ { -+ __from_next = __from; -+ __to_next = __to + __conv; -+ __ret = ok; -+ } -+ else if (__conv > 0 && __conv < __len) -+ { -+ __from_next = __from; -+ __to_next = __to + __conv; -+ __ret = partial; -+ } -+ else -+ __ret = error; -+ -+ return __ret; -+ } -+ -+ codecvt_base::result -+ codecvt:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = error; -+ size_t __len = min(__from_end - __from, __to_end - __to); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_S_get_c_locale()); -+#endif -+ size_t __conv = mbsrtowcs(__to, &__from, __len, &__state); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ if (__conv == __len) -+ { -+ __from_next = __from; -+ __to_next = __to + __conv; -+ __ret = ok; -+ } -+ else if (__conv > 0 && __conv < __len) -+ { -+ __from_next = __from; -+ __to_next = __to + __conv; -+ __ret = partial; -+ } -+ else -+ __ret = error; -+ -+ return __ret; -+ } -+#endif -+} -diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h ---- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h 2004-01-09 01:53:51.000000000 -0600 -@@ -0,0 +1,461 @@ -+// Locale support (codecvt) -*- C++ -*- -+ -+// Copyright (C) 2000, 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.1.5 Template class codecvt -+// -+ -+// Warning: this file is not meant for user inclusion. Use . -+ -+// Written by Benjamin Kosnik -+ -+ // XXX -+ // Define this here to codecvt.cc can have _S_max_size definition. -+#define _GLIBCXX_USE___ENC_TRAITS 1 -+ -+ // Extension to use icov for dealing with character encodings, -+ // including conversions and comparisons between various character -+ // sets. This object encapsulates data that may need to be shared between -+ // char_traits, codecvt and ctype. -+ class __enc_traits -+ { -+ public: -+ // Types: -+ // NB: A conversion descriptor subsumes and enhances the -+ // functionality of a simple state type such as mbstate_t. -+ typedef iconv_t __desc_type; -+ -+ protected: -+ // Data Members: -+ // Max size of charset encoding name -+ static const int _S_max_size = 32; -+ // Name of internal character set encoding. -+ char _M_int_enc[_S_max_size]; -+ // Name of external character set encoding. -+ char _M_ext_enc[_S_max_size]; -+ -+ // Conversion descriptor between external encoding to internal encoding. -+ __desc_type _M_in_desc; -+ // Conversion descriptor between internal encoding to external encoding. -+ __desc_type _M_out_desc; -+ -+ // Details the byte-order marker for the external encoding, if necessary. -+ int _M_ext_bom; -+ -+ // Details the byte-order marker for the internal encoding, if necessary. -+ int _M_int_bom; -+ -+ public: -+ explicit __enc_traits() -+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0) -+ { -+ memset(_M_int_enc, 0, _S_max_size); -+ memset(_M_ext_enc, 0, _S_max_size); -+ } -+ -+ explicit __enc_traits(const char* __int, const char* __ext, -+ int __ibom = 0, int __ebom = 0) -+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0) -+ { -+ strncpy(_M_int_enc, __int, _S_max_size); -+ strncpy(_M_ext_enc, __ext, _S_max_size); -+ } -+ -+ // 21.1.2 traits typedefs -+ // p4 -+ // typedef STATE_T state_type -+ // requires: state_type shall meet the requirements of -+ // CopyConstructible types (20.1.3) -+ __enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0) -+ { -+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size); -+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size); -+ _M_ext_bom = __obj._M_ext_bom; -+ _M_int_bom = __obj._M_int_bom; -+ } -+ -+ // Need assignment operator as well. -+ __enc_traits& -+ operator=(const __enc_traits& __obj) -+ { -+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size); -+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size); -+ _M_in_desc = 0; -+ _M_out_desc = 0; -+ _M_ext_bom = __obj._M_ext_bom; -+ _M_int_bom = __obj._M_int_bom; -+ return *this; -+ } -+ -+ ~__enc_traits() -+ { -+ __desc_type __err = reinterpret_cast(-1); -+ if (_M_in_desc && _M_in_desc != __err) -+ iconv_close(_M_in_desc); -+ if (_M_out_desc && _M_out_desc != __err) -+ iconv_close(_M_out_desc); -+ } -+ -+ void -+ _M_init() -+ { -+ const __desc_type __err = reinterpret_cast(-1); -+ if (!_M_in_desc) -+ { -+ _M_in_desc = iconv_open(_M_int_enc, _M_ext_enc); -+ if (_M_in_desc == __err) -+ __throw_runtime_error("creating iconv input descriptor failed."); -+ } -+ if (!_M_out_desc) -+ { -+ _M_out_desc = iconv_open(_M_ext_enc, _M_int_enc); -+ if (_M_out_desc == __err) -+ __throw_runtime_error("creating iconv output descriptor failed."); -+ } -+ } -+ -+ bool -+ _M_good() -+ { -+ const __desc_type __err = reinterpret_cast(-1); -+ bool __test = _M_in_desc && _M_in_desc != __err; -+ __test &= _M_out_desc && _M_out_desc != __err; -+ return __test; -+ } -+ -+ const __desc_type* -+ _M_get_in_descriptor() -+ { return &_M_in_desc; } -+ -+ const __desc_type* -+ _M_get_out_descriptor() -+ { return &_M_out_desc; } -+ -+ int -+ _M_get_external_bom() -+ { return _M_ext_bom; } -+ -+ int -+ _M_get_internal_bom() -+ { return _M_int_bom; } -+ -+ const char* -+ _M_get_internal_enc() -+ { return _M_int_enc; } -+ -+ const char* -+ _M_get_external_enc() -+ { return _M_ext_enc; } -+ }; -+ -+ // Partial specialization -+ // This specialization takes advantage of iconv to provide code -+ // conversions between a large number of character encodings. -+ template -+ class codecvt<_InternT, _ExternT, __enc_traits> -+ : public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits> -+ { -+ public: -+ // Types: -+ typedef codecvt_base::result result; -+ typedef _InternT intern_type; -+ typedef _ExternT extern_type; -+ typedef __enc_traits state_type; -+ typedef __enc_traits::__desc_type __desc_type; -+ typedef __enc_traits __enc_type; -+ -+ // Data Members: -+ static locale::id id; -+ -+ explicit -+ codecvt(size_t __refs = 0) -+ : __codecvt_abstract_base(__refs) -+ { } -+ -+ explicit -+ codecvt(__enc_type* __enc, size_t __refs = 0) -+ : __codecvt_abstract_base(__refs) -+ { } -+ -+ protected: -+ virtual -+ ~codecvt() { } -+ -+ virtual result -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const; -+ -+ virtual result -+ do_unshift(state_type& __state, extern_type* __to, -+ extern_type* __to_end, extern_type*& __to_next) const; -+ -+ virtual result -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const; -+ -+ virtual int -+ do_encoding() const throw(); -+ -+ virtual bool -+ do_always_noconv() const throw(); -+ -+ virtual int -+ do_length(const state_type&, const extern_type* __from, -+ const extern_type* __end, size_t __max) const; -+ -+ virtual int -+ do_max_length() const throw(); -+ }; -+ -+ template -+ locale::id -+ codecvt<_InternT, _ExternT, __enc_traits>::id; -+ -+ // This adaptor works around the signature problems of the second -+ // argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2 -+ // uses 'char**', which matches the POSIX 1003.1-2001 standard. -+ // Using this adaptor, g++ will do the work for us. -+ template -+ inline size_t -+ __iconv_adaptor(size_t(*__func)(iconv_t, _T, size_t*, char**, size_t*), -+ iconv_t __cd, char** __inbuf, size_t* __inbytes, -+ char** __outbuf, size_t* __outbytes) -+ { return __func(__cd, (_T)__inbuf, __inbytes, __outbuf, __outbytes); } -+ -+ template -+ codecvt_base::result -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = codecvt_base::error; -+ if (__state._M_good()) -+ { -+ typedef state_type::__desc_type __desc_type; -+ const __desc_type* __desc = __state._M_get_out_descriptor(); -+ const size_t __fmultiple = sizeof(intern_type); -+ size_t __fbytes = __fmultiple * (__from_end - __from); -+ const size_t __tmultiple = sizeof(extern_type); -+ size_t __tbytes = __tmultiple * (__to_end - __to); -+ -+ // Argument list for iconv specifies a byte sequence. Thus, -+ // all to/from arrays must be brutally casted to char*. -+ char* __cto = reinterpret_cast(__to); -+ char* __cfrom; -+ size_t __conv; -+ -+ // Some encodings need a byte order marker as the first item -+ // in the byte stream, to designate endian-ness. The default -+ // value for the byte order marker is NULL, so if this is -+ // the case, it's not necessary and we can just go on our -+ // merry way. -+ int __int_bom = __state._M_get_internal_bom(); -+ if (__int_bom) -+ { -+ size_t __size = __from_end - __from; -+ intern_type* __cfixed = static_cast(__builtin_alloca(sizeof(intern_type) * (__size + 1))); -+ __cfixed[0] = static_cast(__int_bom); -+ char_traits::copy(__cfixed + 1, __from, __size); -+ __cfrom = reinterpret_cast(__cfixed); -+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, -+ &__fbytes, &__cto, &__tbytes); -+ } -+ else -+ { -+ intern_type* __cfixed = const_cast(__from); -+ __cfrom = reinterpret_cast(__cfixed); -+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, &__fbytes, -+ &__cto, &__tbytes); -+ } -+ -+ if (__conv != size_t(-1)) -+ { -+ __from_next = reinterpret_cast(__cfrom); -+ __to_next = reinterpret_cast(__cto); -+ __ret = codecvt_base::ok; -+ } -+ else -+ { -+ if (__fbytes < __fmultiple * (__from_end - __from)) -+ { -+ __from_next = reinterpret_cast(__cfrom); -+ __to_next = reinterpret_cast(__cto); -+ __ret = codecvt_base::partial; -+ } -+ else -+ __ret = codecvt_base::error; -+ } -+ } -+ return __ret; -+ } -+ -+ template -+ codecvt_base::result -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_unshift(state_type& __state, extern_type* __to, -+ extern_type* __to_end, extern_type*& __to_next) const -+ { -+ result __ret = codecvt_base::error; -+ if (__state._M_good()) -+ { -+ typedef state_type::__desc_type __desc_type; -+ const __desc_type* __desc = __state._M_get_in_descriptor(); -+ const size_t __tmultiple = sizeof(intern_type); -+ size_t __tlen = __tmultiple * (__to_end - __to); -+ -+ // Argument list for iconv specifies a byte sequence. Thus, -+ // all to/from arrays must be brutally casted to char*. -+ char* __cto = reinterpret_cast(__to); -+ size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL, -+ &__cto, &__tlen); -+ -+ if (__conv != size_t(-1)) -+ { -+ __to_next = reinterpret_cast(__cto); -+ if (__tlen == __tmultiple * (__to_end - __to)) -+ __ret = codecvt_base::noconv; -+ else if (__tlen == 0) -+ __ret = codecvt_base::ok; -+ else -+ __ret = codecvt_base::partial; -+ } -+ else -+ __ret = codecvt_base::error; -+ } -+ return __ret; -+ } -+ -+ template -+ codecvt_base::result -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = codecvt_base::error; -+ if (__state._M_good()) -+ { -+ typedef state_type::__desc_type __desc_type; -+ const __desc_type* __desc = __state._M_get_in_descriptor(); -+ const size_t __fmultiple = sizeof(extern_type); -+ size_t __flen = __fmultiple * (__from_end - __from); -+ const size_t __tmultiple = sizeof(intern_type); -+ size_t __tlen = __tmultiple * (__to_end - __to); -+ -+ // Argument list for iconv specifies a byte sequence. Thus, -+ // all to/from arrays must be brutally casted to char*. -+ char* __cto = reinterpret_cast(__to); -+ char* __cfrom; -+ size_t __conv; -+ -+ // Some encodings need a byte order marker as the first item -+ // in the byte stream, to designate endian-ness. The default -+ // value for the byte order marker is NULL, so if this is -+ // the case, it's not necessary and we can just go on our -+ // merry way. -+ int __ext_bom = __state._M_get_external_bom(); -+ if (__ext_bom) -+ { -+ size_t __size = __from_end - __from; -+ extern_type* __cfixed = static_cast(__builtin_alloca(sizeof(extern_type) * (__size + 1))); -+ __cfixed[0] = static_cast(__ext_bom); -+ char_traits::copy(__cfixed + 1, __from, __size); -+ __cfrom = reinterpret_cast(__cfixed); -+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, -+ &__flen, &__cto, &__tlen); -+ } -+ else -+ { -+ extern_type* __cfixed = const_cast(__from); -+ __cfrom = reinterpret_cast(__cfixed); -+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, -+ &__flen, &__cto, &__tlen); -+ } -+ -+ -+ if (__conv != size_t(-1)) -+ { -+ __from_next = reinterpret_cast(__cfrom); -+ __to_next = reinterpret_cast(__cto); -+ __ret = codecvt_base::ok; -+ } -+ else -+ { -+ if (__flen < static_cast(__from_end - __from)) -+ { -+ __from_next = reinterpret_cast(__cfrom); -+ __to_next = reinterpret_cast(__cto); -+ __ret = codecvt_base::partial; -+ } -+ else -+ __ret = codecvt_base::error; -+ } -+ } -+ return __ret; -+ } -+ -+ template -+ int -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_encoding() const throw() -+ { -+ int __ret = 0; -+ if (sizeof(_ExternT) <= sizeof(_InternT)) -+ __ret = sizeof(_InternT)/sizeof(_ExternT); -+ return __ret; -+ } -+ -+ template -+ bool -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_always_noconv() const throw() -+ { return false; } -+ -+ template -+ int -+ codecvt<_InternT, _ExternT, __enc_traits>:: -+ do_length(const state_type&, const extern_type* __from, -+ const extern_type* __end, size_t __max) const -+ { return min(__max, static_cast(__end - __from)); } -+ -+