[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r16584 - in /fsf/trunk/libc: ./ elf/ iconv/ libio/ localedata/ localedata/locales/ manual/ nptl/ nptl/sysdeps/ia64/ nptl/sys...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r16584 - in /fsf/trunk/libc: ./ elf/ iconv/ libio/ localedata/ localedata/locales/ manual/ nptl/ nptl/sysdeps/ia64/ nptl/sys...
- From: eglibc@xxxxxxxxxx
- Date: Sun, 08 Jan 2012 00:02:07 -0000
Author: eglibc
Date: Sun Jan 8 00:02:04 2012
New Revision: 16584
Log:
Import glibc-mainline for 2012-01-08
Added:
fsf/trunk/libc/wcsmbs/tst-c16c32-1.c
Removed:
fsf/trunk/libc/nptl/sysdeps/ia64/
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/
fsf/trunk/libc/sysdeps/ia64/
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/FAQ
fsf/trunk/libc/FAQ.in
fsf/trunk/libc/INSTALL
fsf/trunk/libc/Makeconfig
fsf/trunk/libc/NEWS
fsf/trunk/libc/config.make.in
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/elf/stackguard-macros.h
fsf/trunk/libc/elf/tls-macros.h
fsf/trunk/libc/elf/tst-auditmod1.c
fsf/trunk/libc/elf/tst-unique3.cc
fsf/trunk/libc/elf/tst-unique3lib.cc
fsf/trunk/libc/elf/tst-unique3lib2.cc
fsf/trunk/libc/elf/tst-unique4.cc
fsf/trunk/libc/iconv/gconv_builtin.h
fsf/trunk/libc/iconv/gconv_int.h
fsf/trunk/libc/iconv/gconv_simple.c
fsf/trunk/libc/iconv/iconv_prog.c
fsf/trunk/libc/libio/stdio.h
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/hu_HU
fsf/trunk/libc/manual/install.texi
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/shlib-versions
fsf/trunk/libc/shlib-versions
fsf/trunk/libc/string/test-strcpy.c
fsf/trunk/libc/sysdeps/generic/ldsodefs.h
fsf/trunk/libc/sysdeps/sh/backtrace.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
fsf/trunk/libc/sysdeps/x86_64/backtrace.c
fsf/trunk/libc/wcsmbs/Makefile
fsf/trunk/libc/wcsmbs/c16rtomb.c
fsf/trunk/libc/wcsmbs/mbrtoc16.c
fsf/trunk/libc/wcsmbs/wcrtomb.c
fsf/trunk/libc/wcsmbs/wcsmbsload.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Jan 8 00:02:04 2012
@@ -1,3 +1,62 @@
+2012-01-07 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/configure.in: Remove m68k support.
+
+ * sysdeps/generic/ldsodefs.h: Remove Alpha support.
+
+ * shlib-versions: Remove entries for ports architectures.
+
+ * elf/tls-macros.h: Remove support for Alpha and IA-64. Should be in
+ files in ports.
+ * elf/stackguard-macros.h: Remove support for IA-64.
+ * elf/tst-auditmod1.c: Likewise.
+ * sysdeps/generic/ldsodefs.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/configure.in: Ports should define
+ libc_cv_gcc_unwind_find_fde and arch_minimum_kernel in their
+ configure files.
+
+ [BZ #13552]
+ * configure.in: Remove --enable-omitfp support.
+ * FAQ.in: Adjust.
+ * config.make.in: Likewise.
+ * Makeconfig: Likewise.
+ * manual/install.texi: Likewise.
+
+ In case anyone cares, the IA-64 architecture could move to ports.
+ * sysdeps/ia64/*: Removed.
+ * sysdeps/unix/sysv/linux/ia64/*: Removed.
+ * sysdeps/unix/sysv/linux/kernel-features.h: Remove IA-64 support.
+
+ [BZ #13555]
+ * configure.in: Remove entries for unsupported architectures.
+
+ [BZ #13533]
+ * iconv/gconv_builtin.h: Use CHAR16 for the char16_t conversions.
+ * iconv/gconv_simple.c: Rename char16_t routines. Add char16_t<->utf8
+ routines.
+ * iconv/gconv_int.h: Adjust prototypes for char16_t routines.
+ * iconv/iconv_prog.c: Recognize CHAR16 as internal name.
+ * wcsmbs/c16rtomb.c: Fix a few problems. Disable all the code and
+ fall back to using wcrtomb.
+ * wcsmbs/mbrtoc16.: Fix implementation to handle real conversions.
+ * wcsmbs/wcsmbsload.c: Make char16 routines optional. Adjust for
+ renaming.
+ * wcsmbs/Makefile (tests): Add tst-c16c32-1:
+ * wcsmbs/tst-c16c32-1.c: New file.
+
+ * wcsmbs/wcrtomb.c: Use MB_LEN_MAX instead of MB_CUR_MAX for sizing
+ local variable.
+
+ * libio/stdio.h: Do not declare gets at all for _GNU_SOURCE.
+
+ * elf/tst-unique3.cc: Add explicit declaration of gets.
+ * elf/tst-unique3lib.cc: Likewise.
+ * elf/tst-unique3lib2.cc: Likewise.
+ * elf/tst-unique4.cc: Likewise.
+
+ * string/test-strcpy.c (do_one_test): Fix format string for WIDE use.
+
2012-01-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
[BZ #13566]
@@ -42,6 +101,7 @@
2011-12-24 Ulrich Drepper <drepper@xxxxxxxxx>
+ [BZ #13533]
* iconv/gconv_simple.c: Add ASCII<->UTF-16 transformations.
* iconv/gconv_builtin.h: Add entries for internal ASCII<->UTF-16
transformations.
Modified: fsf/trunk/libc/FAQ
==============================================================================
--- fsf/trunk/libc/FAQ (original)
+++ fsf/trunk/libc/FAQ Sun Jan 8 00:02:04 2012
@@ -464,21 +464,7 @@
1.15. What's the problem with configure --enable-omitfp?
-{AJ} When --enable-omitfp is set the libraries are built without frame
-pointers. Some compilers produce buggy code for this model and therefore we
-don't advise using it at the moment.
-
-If you use --enable-omitfp, you're on your own. If you encounter problems
-with a library that was build this way, we advise you to rebuild the library
-without --enable-omitfp. If the problem vanishes consider tracking the
-problem down and report it as compiler failure.
-
-Since a library built with --enable-omitfp is undebuggable on most systems,
-debuggable libraries are also built - you can use them by appending "_g" to
-the library names.
-
-The compilation of these extra libraries and the compiler optimizations slow
-down the build process and need more disk space.
+{} Removed. Does not apply anymore.
1.16. I get failures during `make check'. What should I do?
Modified: fsf/trunk/libc/FAQ.in
==============================================================================
--- fsf/trunk/libc/FAQ.in (original)
+++ fsf/trunk/libc/FAQ.in Sun Jan 8 00:02:04 2012
@@ -265,21 +265,7 @@
?? What's the problem with configure --enable-omitfp?
-{AJ} When --enable-omitfp is set the libraries are built without frame
-pointers. Some compilers produce buggy code for this model and therefore we
-don't advise using it at the moment.
-
-If you use --enable-omitfp, you're on your own. If you encounter problems
-with a library that was build this way, we advise you to rebuild the library
-without --enable-omitfp. If the problem vanishes consider tracking the
-problem down and report it as compiler failure.
-
-Since a library built with --enable-omitfp is undebuggable on most systems,
-debuggable libraries are also built - you can use them by appending "_g" to
-the library names.
-
-The compilation of these extra libraries and the compiler optimizations slow
-down the build process and need more disk space.
+{} Removed. Does not apply anymore.
?? I get failures during `make check'. What should I do?
Modified: fsf/trunk/libc/INSTALL
==============================================================================
--- fsf/trunk/libc/INSTALL (original)
+++ fsf/trunk/libc/INSTALL Sun Jan 8 00:02:04 2012
@@ -113,14 +113,6 @@
Don't build libraries with profiling information. You may want to
use this option if you don't plan to do profiling.
-`--enable-omitfp'
- Use maximum optimization for the normal (static and shared)
- libraries, and compile separate static libraries with debugging
- information and no optimization. We recommend not doing this.
- The extra optimization doesn't gain you much, it may provoke
- compiler bugs, and you won't be able to trace bugs through the C
- library.
-
`--disable-versioning'
Don't compile the shared libraries with symbol version information.
Doing this will make the resulting library incompatible with old
@@ -204,9 +196,9 @@
important to use this same `CC' value when running `configure', like
this: `CC=TARGET-gcc configure TARGET'. Set `BUILD_CC' to the compiler
to use for programs run on the build system as part of compiling the
-library. You may need to set `AR' and `RANLIB' to cross-compiling
-versions of `ar' and `ranlib' if the native tools are not configured to
-work with object files for the target you configured for.
+library. You may need to set `AR' to cross-compiling versions of `ar'
+if the native tools are not configured to work with object files for
+the target you configured for.
Installing the C Library
========================
@@ -317,12 +309,11 @@
Check the FAQ for any special compiler issues on particular
platforms.
- * GNU `binutils'
+ * GNU `binutils' 2.15 or later
You must use GNU `binutils' (as and ld) to build the GNU C library.
No other assembler or linker has the necessary functionality at the
- moment. The configure scripts checks for the appropriate version
- for the platform. Too-old versions will prevent building glibc.
+ moment.
* GNU `texinfo' 3.12f
Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Sun Jan 8 00:02:04 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010,2011
+# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010,2011,2012
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -761,17 +761,6 @@
CPPFLAGS-.op = -DPROF $(pic-default)
CFLAGS-.op = -pg
libtype.op = lib%_p.a
-endif
-ifeq (yes,$(build-omitfp))
-# Under --enable-omitfp, we build the library optimized without
-# debugging information using -fomit-frame-pointer, and build an extra
-# library with debugging information. The debuggable objects are named foo.og.
-object-suffixes += .og
-CPPFLAGS-.og = $(pic-default)
-CFLAGS-.og = -g
-CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
-CFLAGS-.os += -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
-libtype.og = lib%_g.a
endif
bppfx = BP-
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Jan 8 00:02:04 2012
@@ -1,5 +1,5 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-12-23
-Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
+GNU C Library NEWS -- history of user-visible changes. 2012-1-7
+Copyright (C) 1992-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
@@ -9,7 +9,7 @@
* The following bugs are resolved with this release:
- 13526, 13527, 13528, 13529, 13531, 13532
+ 13526, 13527, 13528, 13529, 13531, 13532, 13533, 13547, 13552, 13555
* ISO C11 support:
@@ -25,6 +25,10 @@
implementation.
+ timespec_get added
+
+ + uchar.h support added
+
+* Support for the IA-64 is removed and could live in ports.
Version 2.15
Modified: fsf/trunk/libc/config.make.in
==============================================================================
--- fsf/trunk/libc/config.make.in (original)
+++ fsf/trunk/libc/config.make.in Sun Jan 8 00:02:04 2012
@@ -93,7 +93,6 @@
build-shared = @shared@
build-pic-default= @libc_cv_pic_default@
build-profile = @profile@
-build-omitfp = @omitfp@
build-bounded = @bounded@
build-static-nss = @static_nss@
add-ons = @add_ons@
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun Jan 8 00:02:04 2012
@@ -612,7 +612,6 @@
nopic_initfini
static_nss
bounded
-omitfp
profile
libc_cv_pic_default
shared
@@ -777,7 +776,6 @@
enable_check_abi
enable_shared
enable_profile
-enable_omitfp
enable_bounded
enable_versioning
enable_oldest_abi
@@ -1427,7 +1425,6 @@
[default=no]
--enable-shared build shared library [default=yes if GNU ld & ELF]
--enable-profile build profiled library [default=no]
- --enable-omitfp build undebuggable optimized library [default=no]
--enable-bounded build with runtime bounds checking [default=no]
--disable-versioning do not include versioning information in the library
objects [default=yes if supported]
@@ -3605,13 +3602,6 @@
enableval=$enable_profile; profile=$enableval
else
profile=no
-fi
-
-# Check whether --enable-omitfp was given.
-if test "${enable_omitfp+set}" = set; then :
- enableval=$enable_omitfp; omitfp=$enableval
-else
- omitfp=no
fi
# Check whether --enable-bounded was given.
@@ -4045,13 +4035,8 @@
# type and particular chip. If an add-on configure fragment already set
# base_machine, we don't change it.
test -n "$base_machine" || case "$machine" in
-a29k | am29000) base_machine=a29k machine=a29k ;;
-c3[012]) base_machine=cx0 machine=cx0/c30 ;;
-c4[04]) base_machine=cx0 machine=cx0/c40 ;;
i[34567]86) base_machine=i386 machine=i386/$machine ;;
ia64) base_machine=ia64 machine=ia64 ;;
-m88???) base_machine=m88k machine=m88k/$machine ;;
-m88k) base_machine=m88k machine=m88k/m88100 ;;
powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
s390) base_machine=s390 machine=s390/s390-32 ;;
@@ -7978,7 +7963,6 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_pic_default" >&5
$as_echo "$libc_cv_pic_default" >&6; }
-
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun Jan 8 00:02:04 2012
@@ -142,11 +142,6 @@
[build profiled library @<:@default=no@:>@]),
[profile=$enableval],
[profile=no])
-AC_ARG_ENABLE([omitfp],
- AC_HELP_STRING([--enable-omitfp],
- [build undebuggable optimized library @<:@default=no@:>@]),
- [omitfp=$enableval],
- [omitfp=no])
AC_ARG_ENABLE([bounded],
AC_HELP_STRING([--enable-bounded],
[build with runtime bounds checking @<:@default=no@:>@]),
@@ -532,13 +527,8 @@
# type and particular chip. If an add-on configure fragment already set
# base_machine, we don't change it.
test -n "$base_machine" || case "$machine" in
-a29k | am29000) base_machine=a29k machine=a29k ;;
-c3[012]) base_machine=cx0 machine=cx0/c30 ;;
-c4[04]) base_machine=cx0 machine=cx0/c40 ;;
i[34567]86) base_machine=i386 machine=i386/$machine ;;
ia64) base_machine=ia64 machine=ia64 ;;
-m88???) base_machine=m88k machine=m88k/$machine ;;
-m88k) base_machine=m88k machine=m88k/m88100 ;;
powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
s390) base_machine=s390 machine=s390/s390-32 ;;
@@ -2372,7 +2362,6 @@
AC_SUBST(libc_cv_pic_default)
AC_SUBST(profile)
-AC_SUBST(omitfp)
AC_SUBST(bounded)
AC_SUBST(static_nss)
AC_SUBST(nopic_initfini)
Modified: fsf/trunk/libc/elf/stackguard-macros.h
==============================================================================
--- fsf/trunk/libc/elf/stackguard-macros.h (original)
+++ fsf/trunk/libc/elf/stackguard-macros.h Sun Jan 8 00:02:04 2012
@@ -24,10 +24,7 @@
#elif defined __s390__
# define STACK_CHK_GUARD \
({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
-#elif defined __ia64__
-# define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
-#else
+#elif !defined STACK_CHK_GUARD
extern uintptr_t __stack_chk_guard;
# define STACK_CHK_GUARD __stack_chk_guard
#endif
Modified: fsf/trunk/libc/elf/tls-macros.h
==============================================================================
--- fsf/trunk/libc/elf/tls-macros.h (original)
+++ fsf/trunk/libc/elf/tls-macros.h Sun Jan 8 00:02:04 2012
@@ -278,99 +278,6 @@
"pr", "t"); \
__l; })
#endif
-
-#elif defined __alpha__
-
-register void *__gp __asm__("$29");
-
-# define TLS_LE(x) \
- ({ int *__l; \
- asm ("call_pal 158\n\tlda $0," #x "($0)\t\t!tprel" : "=v"(__l)); \
- __l; })
-
-# define TLS_IE(x) \
- ({ char *__tp; unsigned long __o; \
- asm ("call_pal 158\n\tldq %1," #x "($gp)\t\t!gottprel" \
- : "=v"(__tp), "=r"(__o) : "r"(__gp)); \
- (int *)(__tp + __o); })
-
-# define TLS_LD(x) \
- ({ extern void *__tls_get_addr(void *); int *__l; void *__i; \
- asm ("lda %0," #x "($gp)\t\t!tlsldm" : "=r" (__i) : "r"(__gp)); \
- __i = __tls_get_addr(__i); \
- asm ("lda %0, " #x "(%1)\t\t!dtprel" : "=r"(__l) : "r"(__i)); \
- __l; })
-
-# define TLS_GD(x) \
- ({ extern void *__tls_get_addr(void *); void *__i; \
- asm ("lda %0," #x "($gp)\t\t!tlsgd" : "=r" (__i) : "r"(__gp)); \
- (int *) __tls_get_addr(__i); })
-
-
-#elif defined __ia64__
-
-# define TLS_LE(x) \
- ({ void *__l; \
- asm ("mov r2=r13\n\t" \
- ";;\n\t" \
- "addl %0=@tprel(" #x "),r2\n\t" \
- : "=r" (__l) : : "r2" ); __l; })
-
-# define TLS_IE(x) \
- ({ void *__l; \
- register long __gp asm ("gp"); \
- asm (";;\n\t" \
- "addl r16=@ltoff(@tprel(" #x ")),gp\n\t" \
- ";;\n\t" \
- "ld8 r17=[r16]\n\t" \
- ";;\n\t" \
- "add %0=r13,r17\n\t" \
- ";;\n\t" \
- : "=r" (__l) : "r" (__gp) : "r16", "r17" ); __l; })
-
-# define __TLS_CALL_CLOBBERS \
- "r2", "r3", "r8", "r9", "r10", "r11", "r14", "r15", "r16", "r17", \
- "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", \
- "r27", "r28", "r29", "r30", "r31", \
- "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \
- "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "b6", "b7", \
- "out0", "out1", "out2", "out3", "out4", "out5", "out6", "out7"
-
-# define TLS_LD(x) \
- ({ void *__l; \
- register long __gp asm ("gp"); \
- asm (";;\n\t" \
- "mov loc0=gp\n\t" \
- "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \
- "addl out1=@dtprel(" #x "),r0\n\t" \
- ";;\n\t" \
- "ld8 out0=[r16]\n\t" \
- "br.call.sptk.many b0=__tls_get_addr" \
- ";;\n\t" \
- "mov gp=loc0\n\t" \
- "mov %0=r8\n\t" \
- ";;\n\t" \
- : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \
- __l; })
-
-# define TLS_GD(x) \
- ({ void *__l; \
- register long __gp asm ("gp"); \
- asm (";;\n\t" \
- "mov loc0=gp\n\t" \
- "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \
- "addl r17=@ltoff(@dtprel(" #x ")),gp\n\t" \
- ";;\n\t" \
- "ld8 out0=[r16]\n\t" \
- "ld8 out1=[r17]\n\t" \
- "br.call.sptk.many b0=__tls_get_addr" \
- ";;\n\t" \
- "mov gp=loc0\n\t" \
- "mov %0=r8\n\t" \
- ";;\n\t" \
- : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \
- __l; })
#elif defined __sparc__ && !defined __arch64__
@@ -546,14 +453,14 @@
"0:\t.quad " #x "@tlsldm\n\t" \
".quad " #x "@dtpoff\n" \
"1:\tlgr %1,%%r12\n\t" \
- "larl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
- "lg %%r2,0(%0)\n\t" \
+ "larl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
+ "lg %%r2,0(%0)\n\t" \
"brasl %%r14,__tls_get_offset@plt:tls_ldcall:" #x "\n\t" \
"lg %0,8(%0)\n\t" \
"algr %0,%%r2\n\t" \
- "lgr %%r12,%1" \
+ "lgr %%r12,%1" \
: "=&a" (__offset), "=&a" (__save12) \
- : : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
+ : : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
(int *) (__builtin_thread_pointer() + __offset); })
# else
# define TLS_LD(x) \
@@ -562,7 +469,7 @@
"0:\t.quad " #x "@tlsldm\n\t" \
".quad " #x "@dtpoff\n" \
"1:\tlarl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
- "lg %%r2,0(%0)\n\t" \
+ "lg %%r2,0(%0)\n\t" \
"brasl %%r14,__tls_get_offset@plt:tls_ldcall:" #x "\n\t" \
"lg %0,8(%0)\n\t" \
"algr %0,%%r2" \
@@ -578,12 +485,12 @@
"0:\t.quad " #x "@tlsgd\n" \
"1:\tlgr %1,%%r12\n\t" \
"larl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
- "lg %%r2,0(%0)\n\t" \
+ "lg %%r2,0(%0)\n\t" \
"brasl %%r14,__tls_get_offset@plt:tls_gdcall:" #x "\n\t" \
- "lgr %0,%%r2\n\t" \
- "lgr %%r12,%1" \
+ "lgr %0,%%r2\n\t" \
+ "lgr %%r12,%1" \
: "=&a" (__offset), "=&a" (__save12) \
- : : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
+ : : "cc", "0", "1", "2", "3", "4", "5", "14" ); \
(int *) (__builtin_thread_pointer() + __offset); })
# else
# define TLS_GD(x) \
@@ -593,7 +500,7 @@
"1:\tlarl %%r12,_GLOBAL_OFFSET_TABLE_\n\t" \
"lg %%r2,0(%0)\n\t" \
"brasl %%r14,__tls_get_offset@plt:tls_gdcall:" #x "\n\t" \
- "lgr %0,%%r2" \
+ "lgr %0,%%r2" \
: "=&a" (__offset) \
: : "cc", "0", "1", "2", "3", "4", "5", "12", "14" ); \
(int *) (__builtin_thread_pointer() + __offset); })
@@ -638,16 +545,16 @@
".long " #x "@tlsldm\n\t" \
".long " #x "@dtpoff\n" \
"1:\tlr %1,%%r12\n\t" \
- "l %%r12,0(%0)\n\t" \
- "la %%r12,0(%%r12,%0)\n\t" \
+ "l %%r12,0(%0)\n\t" \
+ "la %%r12,0(%%r12,%0)\n\t" \
"l %%r1,4(%0)\n\t" \
"l %%r2,8(%0)\n\t" \
"bas %%r14,0(%%r1,%0):tls_ldcall:" #x "\n\t" \
"l %0,12(%0)\n\t" \
"alr %0,%%r2\n\t" \
- "lr %%r12,%1" \
+ "lr %%r12,%1" \
: "=&a" (__offset), "=&a" (__save12) \
- : : "cc", "0", "1", "2", "3", "4", "5" ); \
+ : : "cc", "0", "1", "2", "3", "4", "5" ); \
(int *) (__builtin_thread_pointer() + __offset); })
# else
# define TLS_LD(x) \
@@ -675,15 +582,15 @@
".long __tls_get_offset@plt-0b\n\t" \
".long " #x "@tlsgd\n" \
"1:\tlr %1,%%r12\n\t" \
- "l %%r12,0(%0)\n\t" \
- "la %%r12,0(%%r12,%0)\n\t" \
+ "l %%r12,0(%0)\n\t" \
+ "la %%r12,0(%%r12,%0)\n\t" \
"l %%r1,4(%0)\n\t" \
"l %%r2,8(%0)\n\t" \
"bas %%r14,0(%%r1,%0):tls_gdcall:" #x "\n\t" \
- "lr %0,%%r2\n\t" \
- "lr %%r12,%1" \
+ "lr %0,%%r2\n\t" \
+ "lr %%r12,%1" \
: "=&a" (__offset), "=&a" (__save12) \
- : : "cc", "0", "1", "2", "3", "4", "5" ); \
+ : : "cc", "0", "1", "2", "3", "4", "5" ); \
(int *) (__builtin_thread_pointer() + __offset); })
# else
# define TLS_GD(x) \
@@ -696,7 +603,7 @@
"l %%r1,4(%0)\n\t" \
"l %%r2,8(%0)\n\t" \
"bas %%r14,0(%%r1):tls_gdcall:" #x "\n\t" \
- "lr %0,%%r2" \
+ "lr %0,%%r2" \
: "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \
(int *) (__builtin_thread_pointer() + __offset); })
# endif
Modified: fsf/trunk/libc/elf/tst-auditmod1.c
==============================================================================
--- fsf/trunk/libc/elf/tst-auditmod1.c (original)
+++ fsf/trunk/libc/elf/tst-auditmod1.c Sun Jan 8 00:02:04 2012
@@ -150,12 +150,6 @@
# define La_regs La_s390_64_regs
# define La_retval La_s390_64_retval
# define int_retval lrv_r2
-#elif defined __ia64__
-# define pltenter la_ia64_gnu_pltenter
-# define pltexit la_ia64_gnu_pltexit
-# define La_regs La_ia64_regs
-# define La_retval La_ia64_retval
-# define int_retval lrv_r8
#elif defined __sparc__ && __WORDSIZE == 32
# define pltenter la_sparc32_gnu_pltenter
# define pltexit la_sparc32_gnu_pltexit
Modified: fsf/trunk/libc/elf/tst-unique3.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3.cc Sun Jan 8 00:02:04 2012
@@ -1,4 +1,6 @@
#include "tst-unique3.h"
+extern char *gets (char *);
+
#include <cstdio>
#include "../dlfcn/dlfcn.h"
Modified: fsf/trunk/libc/elf/tst-unique3lib.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3lib.cc Sun Jan 8 00:02:04 2012
@@ -1,3 +1,5 @@
+extern char *gets (char *);
+
#include <cstdio>
#include "tst-unique3.h"
template<typename T> int S<T>::i = 1;
Modified: fsf/trunk/libc/elf/tst-unique3lib2.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib2.cc (original)
+++ fsf/trunk/libc/elf/tst-unique3lib2.cc Sun Jan 8 00:02:04 2012
@@ -1,3 +1,5 @@
+extern char *gets (char *);
+
#include <cstdio>
#include "tst-unique3.h"
Modified: fsf/trunk/libc/elf/tst-unique4.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique4.cc (original)
+++ fsf/trunk/libc/elf/tst-unique4.cc Sun Jan 8 00:02:04 2012
@@ -1,5 +1,7 @@
// BZ 12511
#include "tst-unique4.h"
+extern char *gets (char *);
+
#include <cstdio>
static int a[24] =
Modified: fsf/trunk/libc/iconv/gconv_builtin.h
==============================================================================
--- fsf/trunk/libc/iconv/gconv_builtin.h (original)
+++ fsf/trunk/libc/iconv/gconv_builtin.h Sun Jan 8 00:02:04 2012
@@ -1,5 +1,5 @@
/* Builtin transformations.
- Copyright (C) 1997-1999, 2000-2002, 2006, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2000-2002, 2006, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -124,22 +124,15 @@
#endif
-BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16//", 1, "=ascii->UTF-16",
- __gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
+BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "CHAR16", 1, "=ascii->CHAR16",
+ __gconv_transform_ascii_char16, NULL, 1, 1, 2, 4)
-BUILTIN_TRANSFORMATION ("UTF-16//", "ANSI_X3.4-1968//", 1, "=UTF-16->ascii",
- __gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
+BUILTIN_TRANSFORMATION ("CHAR16", "ANSI_X3.4-1968//", 1, "=CHAR16->ascii",
+ __gconv_transform_char16_ascii, NULL, 2, 4, 1, 1)
-#if BYTE_ORDER == BIG_ENDIAN
-BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16BE//", 1, "=ascii->UTF-16BE",
- __gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
-BUILTIN_TRANSFORMATION ("UTF-16BE//", "ANSI_X3.4-1968//", 1, "=UTF-16BE->ascii",
- __gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
-#else
-BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "UTF-16LE//", 1, "=ascii->UTF-16LE",
- __gconv_transform_ascii_utf16, NULL, 2, 2, 1, 1)
+BUILTIN_TRANSFORMATION ("ISO-10646/UTF8/", "CHAR16", 1, "=utf8->CHAR16",
+ __gconv_transform_utf8_char16, NULL, 1, 6, 2, 4)
-BUILTIN_TRANSFORMATION ("UTF-16LE//", "ANSI_X3.4-1968//", 1, "=UTF-16LE->ascii",
- __gconv_transform_utf16_ascii, NULL, 2, 2, 1, 1)
-#endif
+BUILTIN_TRANSFORMATION ("CHAR16", "ISO-10646/UTF8/", 1, "=CHAR16->utf8",
+ __gconv_transform_char16_utf8, NULL, 2, 4, 1, 6)
Modified: fsf/trunk/libc/iconv/gconv_int.h
==============================================================================
--- fsf/trunk/libc/iconv/gconv_int.h (original)
+++ fsf/trunk/libc/iconv/gconv_int.h Sun Jan 8 00:02:04 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2005, 2006, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2005, 2006, 2007, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -303,8 +303,10 @@
__BUILTIN_TRANSFORM (__gconv_transform_ucs4le_internal);
__BUILTIN_TRANSFORM (__gconv_transform_internal_utf16);
__BUILTIN_TRANSFORM (__gconv_transform_utf16_internal);
-__BUILTIN_TRANSFORM (__gconv_transform_ascii_utf16);
-__BUILTIN_TRANSFORM (__gconv_transform_utf16_ascii);
+__BUILTIN_TRANSFORM (__gconv_transform_ascii_char16);
+__BUILTIN_TRANSFORM (__gconv_transform_char16_ascii);
+__BUILTIN_TRANSFORM (__gconv_transform_utf8_char16);
+__BUILTIN_TRANSFORM (__gconv_transform_char16_utf8);
# undef __BUITLIN_TRANSFORM
/* Specialized conversion function for a single byte to INTERNAL, recognizing
Modified: fsf/trunk/libc/iconv/gconv_simple.c
==============================================================================
--- fsf/trunk/libc/iconv/gconv_simple.c (original)
+++ fsf/trunk/libc/iconv/gconv_simple.c Sun Jan 8 00:02:04 2012
@@ -1,5 +1,5 @@
/* Simple transformations functions.
- Copyright (C) 1997-2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2005, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -1065,6 +1065,7 @@
\
state->__count = inend - *inptrp; \
\
+ assert (ch != 0xc0 && ch != 0xc1); \
if (ch >= 0xc2 && ch < 0xe0) \
{ \
/* We expect two bytes. The first byte cannot be 0xc0 or \
@@ -1322,15 +1323,15 @@
#include <iconv/skeleton.c>
-/* Convert from ISO 646-IRV to UTF-16. */
+/* Convert from ISO 646-IRV to the char16_t format. */
#define DEFINE_INIT 0
#define DEFINE_FINI 0
#define MIN_NEEDED_FROM 1
#define MIN_NEEDED_TO 2
#define FROM_DIRECTION 1
-#define FROM_LOOP ascii_utf16_loop
-#define TO_LOOP ascii_utf16_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_ascii_utf16
+#define FROM_LOOP ascii_char16_loop
+#define TO_LOOP ascii_char16_loop /* This is not used. */
+#define FUNCTION_NAME __gconv_transform_ascii_char16
#define ONE_DIRECTION 1
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
@@ -1358,15 +1359,15 @@
#include <iconv/skeleton.c>
-/* Convert from UTF-16 to ISO 646-IRV. */
+/* Convert from the char16_t format to ISO 646-IRV. */
#define DEFINE_INIT 0
#define DEFINE_FINI 0
#define MIN_NEEDED_FROM 2
#define MIN_NEEDED_TO 1
#define FROM_DIRECTION 1
-#define FROM_LOOP utf16_ascii_loop
-#define TO_LOOP utf16_ascii_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_utf16_ascii
+#define FROM_LOOP char16_ascii_loop
+#define TO_LOOP char16_ascii_loop /* This is not used. */
+#define FUNCTION_NAME __gconv_transform_char16_ascii
#define ONE_DIRECTION 1
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
@@ -1383,9 +1384,328 @@
{ \
/* It's an one byte sequence. */ \
*outptr++ = *((const uint16_t *) inptr); \
- inptr += sizeof (uint16_t); \
+ inptr += 2; \
} \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
#include <iconv/skeleton.c>
+
+
+/* Convert from the char16_t format to UTF-8. */
+#define DEFINE_INIT 0
+#define DEFINE_FINI 0
+#define MIN_NEEDED_FROM 2
+#define MAX_NEEDED_FROM 4
+#define MIN_NEEDED_TO 1
+#define MAX_NEEDED_TO 6
+#define FROM_DIRECTION 1
+#define FROM_LOOP char16_utf8_loop
+#define TO_LOOP char16_utf8_loop /* This is not used. */
+#define FUNCTION_NAME __gconv_transform_char16_utf8
+#define ONE_DIRECTION 1
+
+#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO
+#define LOOPFCT FROM_LOOP
+#define BODY \
+ { \
+ /* Yes, reading a 16-bit number and storing it as 32-bit is correct. */ \
+ uint32_t wc = *((const uint16_t *) inptr); \
+ inptr += 2; \
+ \
+ if (__builtin_expect (wc < 0x80, 1)) \
+ /* It's an one byte sequence. */ \
+ *outptr++ = (unsigned char) wc; \
+ else \
+ { \
+ size_t step; \
+ \
+ if (__builtin_expect (wc < 0xd800 || wc > 0xdfff, 1)) \
+ step = wc < 0x800 ? 2 : 3; \
+ else \
+ { \
+ if (__builtin_expect (inptr + 2 > inend, 0)) \
+ { \
+ /* We don't have enough input for another complete input \
+ character. */ \
+ inptr -= 2; \
+ result = __GCONV_INCOMPLETE_INPUT; \
+ break; \
+ } \
+ \
+ uint32_t sec = *((const uint16_t *) inptr); \
+ if (__builtin_expect (sec < 0xdc00, 0) \
+ || __builtin_expect (sec > 0xdfff, 0)) \
+ { \
+ /* This is no valid second word for a surrogate. */ \
+ STANDARD_FROM_LOOP_ERR_HANDLER (2); \
+ } \
+ inptr += 2; \
+ wc = ((wc - 0xd7c0) << 10) + (sec - 0xdc00); \
+ \
+ step = wc < 0x200000 ? 4 : 5; \
+ } \
+ \
+ if (__builtin_expect (outptr + step > outend, 0)) \
+ { \
+ /* Too long. */ \
+ result = __GCONV_FULL_OUTPUT; \
+ inptr -= step >= 4 ? 4 : 2; \
+ break; \
+ } \
+ \
+ unsigned char *start = outptr; \
+ *outptr = (unsigned char) (~0xff >> step); \
+ outptr += step; \
+ do \
+ { \
+ start[--step] = 0x80 | (wc & 0x3f); \
+ wc >>= 6; \
+ } \
+ while (step > 1); \
+ start[0] |= wc; \
+ } \
+ }
+#define LOOP_NEED_FLAGS
+#include <iconv/loop.c>
+#include <iconv/skeleton.c>
+
+
+/* Convert from UTF-8 to the char16_t format. */
+#define DEFINE_INIT 0
+#define DEFINE_FINI 0
+#define MIN_NEEDED_FROM 1
+#define MAX_NEEDED_FROM 6
+#define MIN_NEEDED_TO 2
+#define MAX_NEEDED_TO 4
+#define FROM_DIRECTION 1
+#define FROM_LOOP utf8_char16_loop
+#define TO_LOOP utf8_char16_loop /* This is not used. */
+#define FUNCTION_NAME __gconv_transform_utf8_char16
+#define ONE_DIRECTION 1
+
+#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
+#define LOOPFCT FROM_LOOP
+#define BODY \
+ { \
+ /* Next input byte. */ \
+ uint32_t ch = *inptr; \
+ \
+ if (__builtin_expect (ch < 0x80, 1)) \
+ { \
+ /* One byte sequence. */ \
+ *((uint16_t *) outptr) = ch; \
+ outptr += 2; \
+ ++inptr; \
+ } \
+ else \
+ { \
+ uint_fast32_t cnt; \
+ uint_fast32_t i; \
+ \
+ if (ch >= 0xc2 && ch < 0xe0) \
+ { \
+ /* We expect two bytes. The first byte cannot be 0xc0 or 0xc1, \
+ otherwise the wide character could have been represented \
+ using a single byte. */ \
+ cnt = 2; \
+ ch &= 0x1f; \
+ } \
+ else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1)) \
+ { \
+ /* We expect three bytes. */ \
+ cnt = 3; \
+ ch &= 0x0f; \
+ } \
+ else if (__builtin_expect ((ch & 0xf8) == 0xf0, 1)) \
+ { \
+ /* We expect four bytes. */ \
+ cnt = 4; \
+ ch &= 0x07; \
+ } \
+ else if (__builtin_expect ((ch & 0xfc) == 0xf8, 1)) \
+ { \
+ /* We expect five bytes. */ \
+ cnt = 5; \
+ ch &= 0x03; \
+ } \
+ else if (__builtin_expect ((ch & 0xfe) == 0xfc, 1)) \
+ { \
+ /* We expect six bytes. */ \
+ cnt = 6; \
+ ch &= 0x01; \
+ } \
+ else \
+ { \
+ /* Search the end of this ill-formed UTF-8 character. This \
+ is the next byte with (x & 0xc0) != 0x80. */ \
+ i = 0; \
+ do \
+ ++i; \
+ while (inptr + i < inend \
+ && (*(inptr + i) & 0xc0) == 0x80 \
+ && i < 5); \
+ \
+ errout: \
+ STANDARD_FROM_LOOP_ERR_HANDLER (i); \
+ } \
+ \
+ if (__builtin_expect (inptr + cnt > inend, 0)) \
+ { \
+ /* We don't have enough input. But before we report that check \
+ that all the bytes are correct. */ \
+ for (i = 1; inptr + i < inend; ++i) \
+ if ((inptr[i] & 0xc0) != 0x80) \
+ break; \
+ \
+ if (__builtin_expect (inptr + i == inend, 1)) \
+ { \
+ result = __GCONV_INCOMPLETE_INPUT; \
+ break; \
+ } \
+ \
+ goto errout; \
+ } \
+ \
+ /* Read the possible remaining bytes. */ \
+ for (i = 1; i < cnt; ++i) \
+ { \
+ uint32_t byte = inptr[i]; \
+ \
+ if ((byte & 0xc0) != 0x80) \
+ /* This is an illegal encoding. */ \
+ break; \
+ \
+ ch <<= 6; \
+ ch |= byte & 0x3f; \
+ } \
+ \
+ /* If i < cnt, some trail byte was not >= 0x80, < 0xc0. \
+ If cnt > 2 and ch < 2^(5*cnt-4), the wide character ch could \
+ have been represented with fewer than cnt bytes. */ \
+ if (i < cnt || (cnt > 2 && (ch >> (5 * cnt - 4)) == 0) \
+ /* Do not accept UTF-16 surrogates. */ \
+ || (ch >= 0xd800 && ch <= 0xdfff)) \
+ { \
+ /* This is an illegal encoding. */ \
+ goto errout; \
+ } \
+ \
+ /* Now adjust the pointers and store the result. */ \
+ if (ch < 0x10000) \
+ *((uint16_t *) outptr) = ch; \
+ else \
+ { \
+ if (__builtin_expect (outptr + 4 > outend, 0)) \
+ { \
+ result = __GCONV_FULL_OUTPUT; \
+ break; \
+ } \
+ \
+ *((uint16_t *) outptr) = 0xd7c0 + (ch >> 10); \
+ outptr += 2; \
+ *((uint16_t *) outptr) = 0xdc00 + (ch & 0x3ff); \
+ } \
+ \
+ outptr += 2; \
+ inptr += cnt; \
+ } \
+ }
+#define LOOP_NEED_FLAGS
+
+#define STORE_REST \
+ { \
+ /* We store the remaining bytes while converting them into the UCS4 \
+ format. We can assume that the first byte in the buffer is \
+ correct and that it requires a larger number of bytes than there \
+ are in the input buffer. */ \
+ wint_t ch = **inptrp; \
+ size_t cnt, r; \
+ \
+ state->__count = inend - *inptrp; \
+ \
+ assert (ch != 0xc0 && ch != 0xc1); \
+ if (ch >= 0xc2 && ch < 0xe0) \
+ { \
+ /* We expect two bytes. The first byte cannot be 0xc0 or \
+ 0xc1, otherwise the wide character could have been \
+ represented using a single byte. */ \
+ cnt = 2; \
+ ch &= 0x1f; \
+ } \
+ else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1)) \
+ { \
+ /* We expect three bytes. */ \
+ cnt = 3; \
+ ch &= 0x0f; \
+ } \
+ else if (__builtin_expect ((ch & 0xf8) == 0xf0, 1)) \
+ { \
+ /* We expect four bytes. */ \
+ cnt = 4; \
+ ch &= 0x07; \
+ } \
+ else if (__builtin_expect ((ch & 0xfc) == 0xf8, 1)) \
+ { \
+ /* We expect five bytes. */ \
+ cnt = 5; \
+ ch &= 0x03; \
+ } \
+ else \
+ { \
+ /* We expect six bytes. */ \
+ cnt = 6; \
+ ch &= 0x01; \
+ } \
+ \
+ /* The first byte is already consumed. */ \
+ r = cnt - 1; \
+ while (++(*inptrp) < inend) \
+ { \
+ ch <<= 6; \
+ ch |= **inptrp & 0x3f; \
+ --r; \
+ } \
+ \
+ /* Shift for the so far missing bytes. */ \
+ ch <<= r * 6; \
+ \
+ /* Store the number of bytes expected for the entire sequence. */ \
+ state->__count |= cnt << 8; \
+ \
+ /* Store the value. */ \
+ state->__value.__wch = ch; \
+ }
+
+#define UNPACK_BYTES \
+ { \
+ static const unsigned char inmask[5] = { 0xc0, 0xe0, 0xf0, 0xf8, 0xfc }; \
+ wint_t wch = state->__value.__wch; \
+ size_t ntotal = state->__count >> 8; \
+ \
+ inlen = state->__count & 255; \
+ \
+ bytebuf[0] = inmask[ntotal - 2]; \
+ \
+ do \
+ { \
+ if (--ntotal < inlen) \
+ bytebuf[ntotal] = 0x80 | (wch & 0x3f); \
+ wch >>= 6; \
+ } \
+ while (ntotal > 1); \
+ \
+ bytebuf[0] |= wch; \
+ }
+
+#define CLEAR_STATE \
+ state->__count = 0
+
+
+#include <iconv/loop.c>
+#include <iconv/skeleton.c>
Modified: fsf/trunk/libc/iconv/iconv_prog.c
==============================================================================
--- fsf/trunk/libc/iconv/iconv_prog.c (original)
+++ fsf/trunk/libc/iconv/iconv_prog.c Sun Jan 8 00:02:04 2012
@@ -719,10 +719,12 @@
add_known_names (node->right);
do
{
- if (strcmp (node->from_string, "INTERNAL"))
+ if (strcmp (node->from_string, "INTERNAL") != 0
+ && strcmp (node->from_string, "CHAR16") != 0)
tsearch (node->from_string, &printlist,
(__compar_fn_t) strverscmp);
- if (strcmp (node->to_string, "INTERNAL") != 0)
+ if (strcmp (node->to_string, "INTERNAL") != 0
+ && strcmp (node->to_string, "CHAR16") != 0)
tsearch (node->to_string, &printlist, (__compar_fn_t) strverscmp);
node = node->same;
@@ -748,7 +750,8 @@
{
const char *str = strtab + hashtab[cnt].string_offset;
- if (strcmp (str, "INTERNAL") != 0)
+ if (strcmp (str, "INTERNAL") != 0
+ && strcmp (str, "CHAR16") != 0)
tsearch (str, &printlist, (__compar_fn_t) strverscmp);
}
}
Modified: fsf/trunk/libc/libio/stdio.h
==============================================================================
--- fsf/trunk/libc/libio/stdio.h (original)
+++ fsf/trunk/libc/libio/stdio.h Sun Jan 8 00:02:04 2012
@@ -629,7 +629,7 @@
__wur;
#if !defined __USE_ISOC11 \
- || (defined __cplusplus && __cplusplus <= 201103L)
+ || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
/* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Sun Jan 8 00:02:04 2012
@@ -1,3 +1,9 @@
+2012-01-07 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #13547]
+ * locales/hu_HU: Fix collation rules.
+ Patch by Egmont Koblinger <egmont@xxxxxxxxx>.
+
2011-12-23 Ulrich Drepper <drepper@xxxxxxxxx>
[BZ #12840]
Modified: fsf/trunk/libc/localedata/locales/hu_HU
==============================================================================
--- fsf/trunk/libc/localedata/locales/hu_HU (original)
+++ fsf/trunk/libc/localedata/locales/hu_HU Sun Jan 8 00:02:04 2012
@@ -15,11 +15,11 @@
% - made all days abbreviations same lenght by appending spaces
% Email: srtxg@xxxxxxxxxxxxxxxxxx
%
-% Further changes by Egmont Koblinger, 2002/Jan/06
+% Further changes by Egmont Koblinger, 2002/Jan/06, 2012/Jan/03
% - fixed tons of remaining bugs in alphabetical order
% - turned month names and similar stuff to lowercase
% - other small bugfixes
-% Email: egmont@xxxxxxxxxxxx
+% Email: egmont@xxxxxxxxx
%
% Language: hu
% Territory: HU
@@ -66,10 +66,21 @@
%%
%% a' e' i' o' u' are sorted as if they were unaccented
%% o" and u" are sorted as if they were o: and u:
+%%
+%% When a compound letter is pronounced long, only the first
+%% letter is duplicated in writing, e.g. cs+cs becomes ccs,
+%% dzs+dzs becomes ddzs, and so on.
+%% However, c+cs is also spelled as ccs, you need to speak
+%% the language to tell which one is the case.
+%% Tokenize ccs as <c_or_cs><cs>, and sort the tokens as
+%% a b c c_or_cs cs d... This effectively assumes cs+cs
+%% which is more frequent than c+cs, but guarantees that the
+%% strings ccs and cscs don't collate as equal.
collating-symbol <odouble>
collating-symbol <udouble>
+collating-symbol <c_or_cs>
collating-symbol <cs>
collating-element <C-S> from "<U0043><U0053>"
collating-element <C-s> from "<U0043><U0073>"
@@ -84,6 +95,7 @@
collating-element <c-c-S> from "<U0063><U0063><U0053>"
collating-element <c-c-s> from "<U0063><U0063><U0073>"
+collating-symbol <d_or_dz>
collating-symbol <dz>
collating-element <D-Z> from "<U0044><U005A>"
collating-element <D-z> from "<U0044><U007A>"
@@ -98,6 +110,7 @@
collating-element <d-d-Z> from "<U0064><U0064><U005A>"
collating-element <d-d-z> from "<U0064><U0064><U007A>"
+collating-symbol <d_or_dzs>
collating-symbol <dzs>
collating-element <D-Z-S> from "<U0044><U005A><U0053>"
collating-element <D-Z-s> from "<U0044><U005A><U0073>"
@@ -124,6 +137,7 @@
collating-element <d-d-z-S> from "<U0064><U0064><U007A><U0053>"
collating-element <d-d-z-s> from "<U0064><U0064><U007A><U0073>"
+collating-symbol <g_or_gy>
collating-symbol <gy>
collating-element <G-Y> from "<U0047><U0059>"
collating-element <G-y> from "<U0047><U0079>"
@@ -138,6 +152,7 @@
collating-element <g-g-Y> from "<U0067><U0067><U0059>"
collating-element <g-g-y> from "<U0067><U0067><U0079>"
+collating-symbol <l_or_ly>
collating-symbol <ly>
collating-element <L-Y> from "<U004C><U0059>"
collating-element <L-y> from "<U004C><U0079>"
@@ -152,6 +167,7 @@
collating-element <l-l-Y> from "<U006C><U006C><U0059>"
collating-element <l-l-y> from "<U006C><U006C><U0079>"
+collating-symbol <n_or_ny>
collating-symbol <ny>
collating-element <N-Y> from "<U004E><U0059>"
collating-element <N-y> from "<U004E><U0079>"
@@ -166,6 +182,7 @@
collating-element <n-n-Y> from "<U006E><U006E><U0059>"
collating-element <n-n-y> from "<U006E><U006E><U0079>"
+collating-symbol <s_or_sz>
collating-symbol <sz>
collating-element <S-Z> from "<U0053><U005A>"
collating-element <S-z> from "<U0053><U007A>"
@@ -180,6 +197,7 @@
collating-element <s-s-Z> from "<U0073><U0073><U005A>"
collating-element <s-s-z> from "<U0073><U0073><U007A>"
+collating-symbol <t_or_ty>
collating-symbol <ty>
collating-element <T-Y> from "<U0054><U0059>"
collating-element <T-y> from "<U0054><U0079>"
@@ -194,6 +212,7 @@
collating-element <t-t-Y> from "<U0074><U0074><U0059>"
collating-element <t-t-y> from "<U0074><U0074><U0079>"
+collating-symbol <z_or_zs>
collating-symbol <zs>
collating-element <Z-S> from "<U005A><U0053>"
collating-element <Z-s> from "<U005A><U0073>"
@@ -234,25 +253,34 @@
<CAP-CAP-CAP>
reorder-after <c>
+<c_or_cs>
<cs>
reorder-after <d>
+<d_or_dz>
+<d_or_dzs>
<dz>
<dzs>
reorder-after <g>
+<g_or_gy>
<gy>
reorder-after <l>
+<l_or_ly>
<ly>
reorder-after <n>
+<n_or_ny>
<ny>
reorder-after <o>
<odouble>
reorder-after <s>
+<s_or_sz>
<sz>
reorder-after <t>
+<t_or_ty>
<ty>
reorder-after <u>
<udouble>
reorder-after <z>
+<z_or_zs>
<zs>
reorder-after <o>
@@ -270,149 +298,149 @@
reorder-after <U0043>
<C-S> <cs>;<BAS>;<CAP>;IGNORE
<C-s> <cs>;<BAS>;<CAP-MIN>;IGNORE
-<C-C-S> "<cs><cs>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<C-C-s> "<cs><cs>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<C-c-S> "<cs><cs>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<C-c-s> "<cs><cs>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<C-C-S> "<c_or_cs><cs>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<C-C-s> "<c_or_cs><cs>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<C-c-S> "<c_or_cs><cs>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<C-c-s> "<c_or_cs><cs>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U0063>
<c-S> <cs>;<BAS>;<MIN-CAP>;IGNORE
<c-s> <cs>;<BAS>;<MIN>;IGNORE
-<c-C-S> "<cs><cs>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<c-C-s> "<cs><cs>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<c-c-S> "<cs><cs>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<c-c-s> "<cs><cs>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<c-C-S> "<c_or_cs><cs>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<c-C-s> "<c_or_cs><cs>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<c-c-S> "<c_or_cs><cs>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<c-c-s> "<c_or_cs><cs>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U0044>
<D-Z> <dz>;<BAS>;<CAP>;IGNORE
<D-z> <dz>;<BAS>;<CAP-MIN>;IGNORE
-<D-D-Z> "<dz><dz>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<D-D-z> "<dz><dz>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<D-d-Z> "<dz><dz>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<D-d-z> "<dz><dz>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<D-D-Z> "<d_or_dz><dz>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<D-D-z> "<d_or_dz><dz>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<D-d-Z> "<d_or_dz><dz>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<D-d-z> "<d_or_dz><dz>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U0064>
<d-Z> <dz>;<BAS>;<MIN-CAP>;IGNORE
<d-z> <dz>;<BAS>;<MIN>;IGNORE
-<d-D-Z> "<dz><dz>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<d-D-z> "<dz><dz>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<d-d-Z> "<dz><dz>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<d-d-z> "<dz><dz>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<d-D-Z> "<d_or_dz><dz>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<d-D-z> "<d_or_dz><dz>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<d-d-Z> "<d_or_dz><dz>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<d-d-z> "<d_or_dz><dz>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U0044>
<D-Z-S> <dzs>;<BAS>;<CAP-CAP-CAP>;IGNORE
<D-Z-s> <dzs>;<BAS>;<CAP-CAP-MIN>;IGNORE
<D-z-S> <dzs>;<BAS>;<CAP-MIN-CAP>;IGNORE
<D-z-s> <dzs>;<BAS>;<CAP-MIN-MIN>;IGNORE
-<D-D-Z-S> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-CAP>";IGNORE
-<D-D-Z-s> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-MIN>";IGNORE
-<D-D-z-S> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-CAP>";IGNORE
-<D-D-z-s> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-MIN>";IGNORE
-<D-d-Z-S> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-CAP>";IGNORE
-<D-d-Z-s> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-MIN>";IGNORE
-<D-d-z-S> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-CAP>";IGNORE
-<D-d-z-s> "<dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-MIN>";IGNORE
+<D-D-Z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-CAP>";IGNORE
+<D-D-Z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-MIN>";IGNORE
+<D-D-z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-CAP>";IGNORE
+<D-D-z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-MIN>";IGNORE
+<D-d-Z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-CAP>";IGNORE
+<D-d-Z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-CAP-MIN>";IGNORE
+<D-d-z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-CAP>";IGNORE
+<D-d-z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<CAP><CAP-MIN-MIN>";IGNORE
reorder-after <U0064>
<d-Z-S> <dzs>;<BAS>;<MIN-CAP-CAP>;IGNORE
<d-Z-s> <dzs>;<BAS>;<MIN-CAP-MIN>;IGNORE
<d-z-S> <dzs>;<BAS>;<MIN-MIN-CAP>;IGNORE
<d-z-s> <dzs>;<BAS>;<MIN-MIN-MIN>;IGNORE
-<d-D-Z-S> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-CAP>";IGNORE
-<d-D-Z-s> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-MIN>";IGNORE
-<d-D-z-S> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-CAP>";IGNORE
-<d-D-z-s> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-MIN>";IGNORE
-<d-d-Z-S> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-CAP>";IGNORE
-<d-d-Z-s> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-MIN>";IGNORE
-<d-d-z-S> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-CAP>";IGNORE
-<d-d-z-s> "<dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-MIN>";IGNORE
+<d-D-Z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-CAP>";IGNORE
+<d-D-Z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-MIN>";IGNORE
+<d-D-z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-CAP>";IGNORE
+<d-D-z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-MIN>";IGNORE
+<d-d-Z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-CAP>";IGNORE
+<d-d-Z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-CAP-MIN>";IGNORE
+<d-d-z-S> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-CAP>";IGNORE
+<d-d-z-s> "<d_or_dzs><dzs>";"<BAS><BAS>";"<MIN><CAP-MIN-MIN>";IGNORE
reorder-after <U0047>
<G-Y> <gy>;<BAS>;<CAP>;IGNORE
<G-y> <gy>;<BAS>;<CAP-MIN>;IGNORE
-<G-G-Y> "<gy><gy>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<G-G-y> "<gy><gy>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<G-g-Y> "<gy><gy>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<G-g-y> "<gy><gy>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<G-G-Y> "<g_or_gy><gy>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<G-G-y> "<g_or_gy><gy>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<G-g-Y> "<g_or_gy><gy>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<G-g-y> "<g_or_gy><gy>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U0067>
<g-y> <gy>;<BAS>;<MIN>;IGNORE
<g-Y> <gy>;<BAS>;<MIN-CAP>;IGNORE
-<g-G-Y> "<gy><gy>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<g-G-y> "<gy><gy>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<g-g-Y> "<gy><gy>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<g-g-y> "<gy><gy>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<g-G-Y> "<g_or_gy><gy>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<g-G-y> "<g_or_gy><gy>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<g-g-Y> "<g_or_gy><gy>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<g-g-y> "<g_or_gy><gy>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U004C>
<L-Y> <ly>;<BAS>;<CAP>;IGNORE
<L-y> <ly>;<BAS>;<CAP-MIN>;IGNORE
-<L-L-Y> "<ly><ly>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<L-L-y> "<ly><ly>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<L-l-Y> "<ly><ly>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<L-l-y> "<ly><ly>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<L-L-Y> "<l_or_ly><ly>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<L-L-y> "<l_or_ly><ly>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<L-l-Y> "<l_or_ly><ly>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<L-l-y> "<l_or_ly><ly>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U006C>
<l-y> <ly>;<BAS>;<MIN>;IGNORE
<l-Y> <ly>;<BAS>;<MIN-CAP>;IGNORE
-<l-L-Y> "<ly><ly>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<l-L-y> "<ly><ly>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<l-l-Y> "<ly><ly>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<l-l-y> "<ly><ly>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<l-L-Y> "<l_or_ly><ly>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<l-L-y> "<l_or_ly><ly>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<l-l-Y> "<l_or_ly><ly>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<l-l-y> "<l_or_ly><ly>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U004E>
<N-Y> <ny>;<BAS>;<CAP>;IGNORE
<N-y> <ny>;<BAS>;<CAP-MIN>;IGNORE
-<N-N-Y> "<ny><ny>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<N-N-y> "<ny><ny>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<N-n-Y> "<ny><ny>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<N-n-y> "<ny><ny>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<N-N-Y> "<n_or_ny><ny>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<N-N-y> "<n_or_ny><ny>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<N-n-Y> "<n_or_ny><ny>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<N-n-y> "<n_or_ny><ny>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U006E>
<n-y> <ny>;<BAS>;<MIN>;IGNORE
<n-Y> <ny>;<BAS>;<MIN-CAP>;IGNORE
-<n-N-Y> "<ny><ny>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<n-N-y> "<ny><ny>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<n-n-Y> "<ny><ny>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<n-n-y> "<ny><ny>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<n-N-Y> "<n_or_ny><ny>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<n-N-y> "<n_or_ny><ny>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<n-n-Y> "<n_or_ny><ny>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<n-n-y> "<n_or_ny><ny>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U0053>
<S-Z> <sz>;<BAS>;<CAP>;IGNORE
<S-z> <sz>;<BAS>;<CAP-MIN>;IGNORE
-<S-S-Z> "<sz><sz>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<S-S-z> "<sz><sz>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<S-s-Z> "<sz><sz>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<S-s-z> "<sz><sz>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<S-S-Z> "<s_or_sz><sz>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<S-S-z> "<s_or_sz><sz>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<S-s-Z> "<s_or_sz><sz>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<S-s-z> "<s_or_sz><sz>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U0073>
<s-Z> <sz>;<BAS>;<MIN-CAP>;IGNORE
<s-z> <sz>;<BAS>;<MIN>;IGNORE
-<s-S-Z> "<sz><sz>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<s-S-z> "<sz><sz>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<s-s-Z> "<sz><sz>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<s-s-z> "<sz><sz>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<s-S-Z> "<s_or_sz><sz>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<s-S-z> "<s_or_sz><sz>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<s-s-Z> "<s_or_sz><sz>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<s-s-z> "<s_or_sz><sz>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U0054>
<T-Y> <ty>;<BAS>;<CAP>;IGNORE
<T-y> <ty>;<BAS>;<CAP-MIN>;IGNORE
-<T-T-Y> "<ty><ty>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<T-T-y> "<ty><ty>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<T-t-Y> "<ty><ty>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<T-t-y> "<ty><ty>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<T-T-Y> "<t_or_ty><ty>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<T-T-y> "<t_or_ty><ty>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<T-t-Y> "<t_or_ty><ty>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<T-t-y> "<t_or_ty><ty>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U0074>
<t-Y> <ty>;<BAS>;<MIN-CAP>;IGNORE
<t-y> <ty>;<BAS>;<MIN>;IGNORE
-<t-T-Y> "<ty><ty>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<t-T-y> "<ty><ty>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<t-t-Y> "<ty><ty>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<t-t-y> "<ty><ty>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<t-T-Y> "<t_or_ty><ty>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<t-T-y> "<t_or_ty><ty>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<t-t-Y> "<t_or_ty><ty>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<t-t-y> "<t_or_ty><ty>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-after <U005A>
<Z-S> <zs>;<BAS>;<CAP>;IGNORE
<Z-s> <zs>;<BAS>;<CAP-MIN>;IGNORE
-<Z-Z-S> "<zs><zs>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
-<Z-Z-s> "<zs><zs>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
-<Z-z-S> "<zs><zs>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
-<Z-z-s> "<zs><zs>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
+<Z-Z-S> "<z_or_zs><zs>";"<BAS><BAS>";"<CAP><CAP>";IGNORE
+<Z-Z-s> "<z_or_zs><zs>";"<BAS><BAS>";"<CAP><CAP-MIN>";IGNORE
+<Z-z-S> "<z_or_zs><zs>";"<BAS><BAS>";"<CAP><MIN-CAP>";IGNORE
+<Z-z-s> "<z_or_zs><zs>";"<BAS><BAS>";"<CAP><MIN>";IGNORE
reorder-after <U007A>
<z-S> <zs>;<BAS>;<MIN-CAP>;IGNORE
<z-s> <zs>;<BAS>;<MIN>;IGNORE
-<z-Z-S> "<zs><zs>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
-<z-Z-s> "<zs><zs>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
-<z-z-S> "<zs><zs>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
-<z-z-s> "<zs><zs>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
+<z-Z-S> "<z_or_zs><zs>";"<BAS><BAS>";"<MIN><CAP>";IGNORE
+<z-Z-s> "<z_or_zs><zs>";"<BAS><BAS>";"<MIN><CAP-MIN>";IGNORE
+<z-z-S> "<z_or_zs><zs>";"<BAS><BAS>";"<MIN><MIN-CAP>";IGNORE
+<z-z-s> "<z_or_zs><zs>";"<BAS><BAS>";"<MIN><MIN>";IGNORE
reorder-end
Modified: fsf/trunk/libc/manual/install.texi
==============================================================================
--- fsf/trunk/libc/manual/install.texi (original)
+++ fsf/trunk/libc/manual/install.texi Sun Jan 8 00:02:04 2012
@@ -135,13 +135,6 @@
@item --disable-profile
Don't build libraries with profiling information. You may want to use
this option if you don't plan to do profiling.
-
-@item --enable-omitfp
-Use maximum optimization for the normal (static and shared)
-libraries, and compile separate static libraries with debugging
-information and no optimization. We recommend not doing this. The extra
-optimization doesn't gain you much, it may provoke compiler bugs, and you
-won't be able to trace bugs through the C library.
@item --disable-versioning
Don't compile the shared libraries with symbol version information.
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sun Jan 8 00:02:04 2012
@@ -1,3 +1,11 @@
+2012-01-07 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * shlib-versions: Remove entries for ports architectures.
+
+ In case anyone cares, the IA-64 architecture could move to ports.
+ * sysdeps/ia64/*: Removed.
+ * sysdeps/unix/sysv/linux/ia64/*: Removed.
+
2011-12-22 Ulrich Drepper <drepper@xxxxxxxxx>
* sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
Modified: fsf/trunk/libc/nptl/shlib-versions
==============================================================================
--- fsf/trunk/libc/nptl/shlib-versions (original)
+++ fsf/trunk/libc/nptl/shlib-versions Sun Jan 8 00:02:04 2012
@@ -1,10 +1,6 @@
-mips.*-.*-linux.* libpthread=0 GLIBC_2.0 GLIBC_2.2
sparc64.*-.*-linux.* libpthread=0 GLIBC_2.2
sh.*-.*-linux.* libpthread=0 GLIBC_2.2
-ia64.*-.*-linux.* libpthread=0 GLIBC_2.2
-hppa.*-.*-linux.* libpthread=0 GLIBC_2.2
s390x-.*-linux.* libpthread=0 GLIBC_2.2
-cris-.*-linux.* libpthread=0 GLIBC_2.2
x86_64-.*-linux.* libpthread=0 GLIBC_2.2.5
powerpc64-.*-linux.* libpthread=0 GLIBC_2.3
.*-.*-linux.* libpthread=0
Modified: fsf/trunk/libc/shlib-versions
==============================================================================
--- fsf/trunk/libc/shlib-versions (original)
+++ fsf/trunk/libc/shlib-versions Sun Jan 8 00:02:04 2012
@@ -27,7 +27,6 @@
# ------------- --------------- ------------------------------
s390x-.*-linux.* DEFAULT GLIBC_2.2
-cris-.*-linux.* DEFAULT GLIBC_2.2
x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
powerpc64-.*-linux.* DEFAULT GLIBC_2.3
.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
@@ -53,15 +52,11 @@
# The interface to -lm depends mostly only on cpu, not on operating system.
sparc64.*-.*-linux.* libm=6 GLIBC_2.2
-alpha.*-.*-linux.* libm=6.1
-ia64-.*-linux.* libm=6.1 GLIBC_2.2
sh.*-.*-linux.* libm=6 GLIBC_2.2
.*-.*-linux.* libm=6
.*-.*-gnu-gnu.* libm=6
# We provide libc.so.6 for Linux kernel versions 2.0 and later.
-alpha.*-.*-linux.* libc=6.1
-ia64-.*-linux.* libc=6.1 GLIBC_2.2
sh.*-.*-linux.* libc=6 GLIBC_2.2
sparc64.*-.*-linux.* libc=6 GLIBC_2.2
.*-.*-linux.* libc=6
@@ -79,28 +74,22 @@
i.86-.*-linux.* ld=ld-linux.so.2
sparc64.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
sparc.*-.*-linux.* ld=ld-linux.so.2
-alpha.*-.*-linux.* ld=ld-linux.so.2
sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
-ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2
s390x-.*-linux.* ld=ld64.so.1 GLIBC_2.2
powerpc64.*-.*-linux.* ld=ld64.so.1 GLIBC_2.3
-cris-.*-linux.* ld=ld.so.1 GLIBC_2.2
x86_64-.*-linux.* ld=ld-linux-x86-64.so.2 GLIBC_2.2.5
# We use the ELF ABI standard name for the default.
.*-.*-.* ld=ld.so.1
# The -ldl interface (see <dlfcn.h>) is the same on all platforms.
-alpha.*-.*-linux.* libdl=2.1
.*-.*-.* libdl=2
# So far the -lutil interface is the same on all platforms, except for the
# `struct utmp' format, which depends on libc.
-alpha.*-.*-linux.* libutil=1.1
.*-.*-.* libutil=1
# Version number 2 is used on other systems for the BIND 4.9.5 resolver
# interface.
-alpha.*-.*-linux.* libresolv=2.1
.*-.*-.* libresolv=2
# Interface revision of nss_* modules. This must match NSS_SHLIB_REVISION
@@ -120,16 +109,12 @@
.*-.*-.* libnss_test1=2
# Version for libnsl with YP and NIS+ functions.
-alpha.*-.*-linux.* libnsl=1.1
.*-.*-.* libnsl=1
# This defines the shared library version numbers we will install.
-alpha.*-.*-linux.* libcrypt=1.1
.*-.*-.* libcrypt=1
# The gross patch for programs assuming broken locale implementations.
-alpha.*-.*-linux.* libBrokenLocale=1.1
-ia64-.*-.* libBrokenLocale=1 GLIBC_2.2
sh.*-.*-.* libBrokenLocale=1 GLIBC_2.2
sparc64.*-.*-.* libBrokenLocale=1 GLIBC_2.2
.*-.*-.* libBrokenLocale=1
Modified: fsf/trunk/libc/string/test-strcpy.c
==============================================================================
--- fsf/trunk/libc/string/test-strcpy.c (original)
+++ fsf/trunk/libc/string/test-strcpy.c Sun Jan 8 00:02:04 2012
@@ -1,5 +1,5 @@
/* Test and measure strcpy functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003, 2005, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@xxxxxxxxxx>, 1999.
Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>, 2011
@@ -23,6 +23,7 @@
# include <wchar.h>
# define CHAR wchar_t
# define UCHAR wchar_t
+# define sfmt "ls"
# define BIG_CHAR WCHAR_MAX
# define SMALL_CHAR 1273
# define STRCMP wcscmp
@@ -31,6 +32,7 @@
#else
# define CHAR char
# define UCHAR unsigned char
+# define sfmt "s"
# define BIG_CHAR CHAR_MAX
# define SMALL_CHAR 127
# define STRCMP strcmp
@@ -80,7 +82,8 @@
if (STRCMP (dst, src) != 0)
{
- error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
+ error (0, 0,
+ "Wrong result in function %s dst \"%" sfmt "\" src \"%" sfmt "\"",
impl->name, dst, src);
ret = 1;
return;
Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Sun Jan 8 00:02:04 2012
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -194,14 +194,10 @@
struct La_ppc64_retval;
struct La_sh_regs;
struct La_sh_retval;
-struct La_alpha_regs;
-struct La_alpha_retval;
struct La_s390_32_regs;
struct La_s390_32_retval;
struct La_s390_64_regs;
struct La_s390_64_retval;
-struct La_ia64_regs;
-struct La_ia64_retval;
struct La_sparc32_regs;
struct La_sparc32_retval;
struct La_sparc64_regs;
@@ -242,10 +238,6 @@
uintptr_t *, const struct La_sh_regs *,
unsigned int *, const char *name,
long int *framesizep);
- Elf64_Addr (*alpha_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
- uintptr_t *, struct La_alpha_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
Elf32_Addr (*s390_32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, struct La_s390_32_regs *,
unsigned int *, const char *name,
@@ -254,10 +246,6 @@
uintptr_t *, struct La_s390_64_regs *,
unsigned int *, const char *name,
long int *framesizep);
- Elf64_Addr (*ia64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
- uintptr_t *, struct La_ia64_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
Elf32_Addr (*sparc32_gnu_pltenter) (Elf32_Sym *, unsigned int,
uintptr_t *, uintptr_t *,
const struct La_sparc32_regs *,
@@ -293,10 +281,6 @@
unsigned int (*sh_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, const struct La_sh_regs *,
struct La_sh_retval *, const char *);
- unsigned int (*alpha_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
- uintptr_t *,
- const struct La_alpha_regs *,
- struct La_alpha_retval *, const char *);
unsigned int (*s390_32_gnu_pltexit) (Elf32_Sym *, unsigned int,
uintptr_t *, uintptr_t *,
const struct La_s390_32_regs *,
@@ -307,10 +291,6 @@
const struct La_s390_64_regs *,
struct La_s390_64_retval *,
const char *);
- unsigned int (*ia64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
- uintptr_t *,
- const struct La_ia64_regs *,
- struct La_ia64_retval *, const char *);
unsigned int (*sparc32_gnu_pltexit) (Elf32_Sym *, unsigned int,
uintptr_t *, uintptr_t *,
const struct La_sparc32_regs *,
Modified: fsf/trunk/libc/sysdeps/sh/backtrace.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/backtrace.c (original)
+++ fsf/trunk/libc/sysdeps/sh/backtrace.c Sun Jan 8 00:02:04 2012
@@ -1,1 +1,1 @@
-#include "../ia64/backtrace.c"
+#include "../x86_64/backtrace.c"
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure Sun Jan 8 00:02:04 2012
@@ -282,28 +282,9 @@
# if appropriate too.
test -n "$arch_minimum_kernel" ||
case "$machine" in
- alpha*)
- arch_minimum_kernel=2.1.100
- libc_cv_gcc_unwind_find_fde=yes
- ;;
- arm*)
+ i386*)
+ libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
- i386*)
- libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.0.10
- ;;
- ia64*)
- arch_minimum_kernel=2.4.0
- ;;
- hppa*)
- libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.19
- ;;
- m68k*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
@@ -487,9 +468,6 @@
i[3456]86* | m68*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
;;
- ia64*)
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
- ;;
s390*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
;;
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in Sun Jan 8 00:02:04 2012
@@ -39,28 +39,9 @@
# if appropriate too.
test -n "$arch_minimum_kernel" ||
case "$machine" in
- alpha*)
- arch_minimum_kernel=2.1.100
- libc_cv_gcc_unwind_find_fde=yes
- ;;
- arm*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
i386*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
- ;;
- ia64*)
- arch_minimum_kernel=2.4.0
- ;;
- hppa*)
- libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.19
- ;;
- m68k*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
@@ -223,11 +204,8 @@
# We need some extensions to the `ldd' script.
changequote(,)
case "$machine" in
- i[3456]86* | m68*)
+ i[3456]86*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
- ;;
- ia64*)
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
;;
s390*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Sun Jan 8 00:02:04 2012
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 1999-2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -274,11 +274,11 @@
their availability with one define. The changes were made first
for i386 and the have to be done separately for the other archs.
For i386 we pick 2.5.50 as the first version with support.
- For ia64, s390*, PPC, x86-64, and SH we pick 2.5.64 as the first
+ For s390*, PPC, x86-64, and SH we pick 2.5.64 as the first
version with support. */
#if ((__LINUX_KERNEL_VERSION >= 132402 && defined __i386__) \
|| (__LINUX_KERNEL_VERSION >= 132416 \
- && (defined __ia64__ || defined __s390__ \
+ && (defined __s390__ \
|| defined __powerpc__ || defined __x86_64__ || defined __sh__)))
# define __ASSUME_CLONE_THREAD_FLAGS 1
#endif
@@ -334,7 +334,7 @@
/* The utimes syscall has been available for some architectures
forever. For x86 it was introduced after 2.5.75, for x86-64,
ppc, and ppc64 it was introduced in 2.6.0-test3. */
-#if defined __ia64__ || defined __sparc__ \
+#if defined __sparc__ \
|| (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \
|| (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
@@ -419,10 +419,9 @@
the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
on ia64 in 2.6.22-rc1. */
#if __LINUX_KERNEL_VERSION >= 0x020611 \
- && ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__) \
+ && ((!defined __x86_64__ && !defined __sh__) \
|| (__LINUX_KERNEL_VERSION >= 0x020613 \
- && (defined __x86_64__ || defined __sh__)) \
- || (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__))
+ && (defined __x86_64__ || defined __sh__)))
# define __ASSUME_PSELECT 1
# define __ASSUME_PPOLL 1
#endif
@@ -477,7 +476,7 @@
x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23. */
#if __LINUX_KERNEL_VERSION >= 0x020617 \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- || defined __ia64__ || defined __sparc__ || defined __s390__)
+ || defined __sparc__ || defined __s390__)
# define __ASSUME_O_CLOEXEC 1
#endif
@@ -490,7 +489,7 @@
x86-64, PPC, IA-64, and SPARC in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061b \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- || defined __ia64__ || defined __sparc__ || defined __s390__)
+ || defined __sparc__ || defined __s390__)
# define __ASSUME_SOCK_CLOEXEC 1
# define __ASSUME_IN_NONBLOCK 1
# define __ASSUME_PIPE2 1
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c Sun Jan 8 00:02:04 2012
@@ -1,1 +1,60 @@
-#include <sysdeps/unix/sysv/linux/ia64/wordexp.c>
+/* Copyright (C) 2001, 2004, 2005, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <shlib-compat.h>
+
+/* For Linux/Alpha we have to make the wordexp symbols versioned. */
+#define wordexp(words, pwordexp, flags) \
+ __new_wordexp (words, pwordexp, flags)
+
+#include <posix/wordexp.c>
+
+versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
+
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
+/* The old, incorrect wordexp_t definition. */
+typedef struct
+ {
+ int we_wordc; /* Count of words matched. */
+ char **we_wordv; /* List of expanded words. */
+ int we_offs; /* Slots to reserve in `we_wordv'. */
+ } old_wordexp_t;
+
+
+int
+attribute_compat_text_section
+__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
+{
+ wordexp_t we;
+ int result;
+
+ we.we_wordc = pwordexp->we_wordc;
+ we.we_wordv = pwordexp->we_wordv;
+ we.we_offs = pwordexp->we_offs;
+
+ result = __new_wordexp (words, &we, flags);
+
+ pwordexp->we_wordc = we.we_wordc;
+ pwordexp->we_wordv = we.we_wordv;
+ pwordexp->we_offs = we.we_offs;
+
+ return result;
+}
+compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1);
+#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c Sun Jan 8 00:02:04 2012
@@ -1,1 +1,39 @@
-#include <sysdeps/unix/sysv/linux/ia64/sigpending.c>
+/* Copyright (C) 1997-2000, 2003, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Linux/x86_64 only has rt signals, thus we do not even want to try falling
+ back to the old style signals as the default Linux handler does. */
+
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Change the set of blocked signals to SET,
+ wait until a signal arrives, and restore the set of blocked signals. */
+int
+sigpending (set)
+ sigset_t *set;
+{
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
+}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c Sun Jan 8 00:02:04 2012
@@ -1,1 +1,44 @@
-#include <sysdeps/unix/sysv/linux/ia64/sigprocmask.c>
+/* Copyright (C) 1997-2000, 2003, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Jes Sorensen, <Jes.Sorensen@xxxxxxx>, April 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Linux/x86_64 only has rt signals, thus we do not even want to try falling
+ back to the old style signals as the default Linux handler does. */
+
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Get and/or change the set of blocked signals. */
+int
+__sigprocmask (how, set, oset)
+ int how;
+ const sigset_t *set;
+ sigset_t *oset;
+{
+
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
+ CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
+}
+weak_alias (__sigprocmask, sigprocmask)
Modified: fsf/trunk/libc/sysdeps/x86_64/backtrace.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/backtrace.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/backtrace.c Sun Jan 8 00:02:04 2012
@@ -1,1 +1,133 @@
-#include "../ia64/backtrace.c"
+/* Return backtrace of current program state.
+ Copyright (C) 2003-2005,2007,2009,2011,2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <bits/libc-lock.h>
+#include <dlfcn.h>
+#include <execinfo.h>
+#include <stdlib.h>
+#include <unwind.h>
+
+struct trace_arg
+{
+ void **array;
+ _Unwind_Word cfa;
+ int cnt;
+ int size;
+};
+
+#ifdef SHARED
+static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
+static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
+static _Unwind_Word (*unwind_getcfa) (struct _Unwind_Context *);
+static void *libgcc_handle;
+
+
+/* Dummy version in case libgcc_s does not contain the real code. */
+static _Unwind_Word
+dummy_getcfa (struct _Unwind_Context *ctx __attribute__ ((unused)))
+{
+ return 0;
+}
+
+
+static void
+init (void)
+{
+ libgcc_handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (libgcc_handle == NULL)
+ return;
+
+ unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace");
+ unwind_getip = __libc_dlsym (libgcc_handle, "_Unwind_GetIP");
+ if (unwind_getip == NULL)
+ unwind_backtrace = NULL;
+ unwind_getcfa = (__libc_dlsym (libgcc_handle, "_Unwind_GetCFA")
+ ?: dummy_getcfa);
+}
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+# define unwind_getcfa _Unwind_GetCFA
+#endif
+
+static _Unwind_Reason_Code
+backtrace_helper (struct _Unwind_Context *ctx, void *a)
+{
+ struct trace_arg *arg = a;
+
+ /* We are first called with address in the __backtrace function.
+ Skip it. */
+ if (arg->cnt != -1)
+ {
+ arg->array[arg->cnt] = (void *) unwind_getip (ctx);
+
+ /* Check whether we make any progress. */
+ _Unwind_Word cfa = unwind_getcfa (ctx);
+
+ if (arg->cnt > 0 && arg->array[arg->cnt - 1] == arg->array[arg->cnt]
+ && cfa == arg->cfa)
+ return _URC_END_OF_STACK;
+ arg->cfa = cfa;
+ }
+ if (++arg->cnt == arg->size)
+ return _URC_END_OF_STACK;
+ return _URC_NO_REASON;
+}
+
+int
+__backtrace (array, size)
+ void **array;
+ int size;
+{
+ struct trace_arg arg = { .array = array, .cfa = 0, .size = size, .cnt = -1 };
+#ifdef SHARED
+ __libc_once_define (static, once);
+
+ __libc_once (once, init);
+ if (unwind_backtrace == NULL)
+ return 0;
+#endif
+
+ if (size >= 1)
+ unwind_backtrace (backtrace_helper, &arg);
+
+ /* _Unwind_Backtrace seems to put NULL address above
+ _start. Fix it up here. */
+ if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL)
+ --arg.cnt;
+ return arg.cnt != -1 ? arg.cnt : 0;
+}
+weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)
+
+
+#ifdef SHARED
+/* Free all resources if necessary. */
+libc_freeres_fn (free_mem)
+{
+ unwind_backtrace = NULL;
+ if (libgcc_handle != NULL)
+ {
+ __libc_dlclose (libgcc_handle);
+ libgcc_handle = NULL;
+ }
+}
+#endif
Modified: fsf/trunk/libc/wcsmbs/Makefile
==============================================================================
--- fsf/trunk/libc/wcsmbs/Makefile (original)
+++ fsf/trunk/libc/wcsmbs/Makefile Sun Jan 8 00:02:04 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2000,2002,2003,2004,2005,2006,2007,2011
+# Copyright (C) 1995-2000,2002,2003,2004,2005,2006,2007,2011,2012
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -46,6 +46,7 @@
strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
+ tst-c16c32-1 \
wcsatcliff $(addprefix test-,$(strop-tests))
include ../Rules
Modified: fsf/trunk/libc/wcsmbs/c16rtomb.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/c16rtomb.c (original)
+++ fsf/trunk/libc/wcsmbs/c16rtomb.c Sun Jan 8 00:02:04 2012
@@ -1,6 +1,6 @@
/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2011.
+ Contributed by Ulrich Drepper <drepper@xxxxxxxxx>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -44,7 +44,12 @@
size_t
c16rtomb (char *s, char16_t c16, mbstate_t *ps)
{
- char buf[MB_CUR_MAX];
+#if 1
+ // XXX The ISO C 11 spec I have does not say anything about handling
+ // XXX surrogates in this interface.
+ return wcrtomb (s, c16, ps ?: &state);
+#else
+ char buf[MB_LEN_MAX];
struct __gconv_step_data data;
int status;
size_t result;
@@ -78,9 +83,9 @@
PTR_DEMANGLE (fct);
#endif
- /* If C16 is the NUL character we write into the output buffer the byte
- sequence necessary for PS to get into the initial state, followed
- by a NUL byte. */
+ /* If C16 is the NUL character we write into the output buffer
+ the byte sequence necessary for PS to get into the initial
+ state, followed by a NUL byte. */
if (c16 == L'\0')
{
status = DL_CALL_FCT (fct, (fcts->fromc16, &data, NULL, NULL,
@@ -96,7 +101,8 @@
status = DL_CALL_FCT (fct,
(fcts->fromc16, &data, &inbuf,
- inbuf + sizeof (char16_t), NULL, &dummy, 0, 1));
+ inbuf + sizeof (char16_t), NULL, &dummy,
+ 0, 1));
}
/* There must not be any problems with the conversion but illegal input
@@ -118,4 +124,5 @@
}
return result;
+#endif
}
Modified: fsf/trunk/libc/wcsmbs/mbrtoc16.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/mbrtoc16.c (original)
+++ fsf/trunk/libc/wcsmbs/mbrtoc16.c Sun Jan 8 00:02:04 2012
@@ -1,6 +1,6 @@
/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@xxxxxxx>, 2011.
+ Contributed by Ulrich Drepper <drepper@xxxxxxxxx>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -43,20 +43,32 @@
size_t
mbrtoc16 (char16_t *pc16, const char *s, size_t n, mbstate_t *ps)
{
- char16_t buf[1];
+ if (ps == NULL)
+ ps = &state;
+
+ if (ps->__count & 0x80000000)
+ {
+ /* We have to return the second word for a surrogate. */
+ ps->__count &= 0x7fffffff;
+ *pc16 = ps->__value.__wch;
+ ps->__value.__wch = L'\0';
+ return (size_t) -3;
+ }
+
+ char16_t buf[2];
struct __gconv_step_data data;
int status;
size_t result;
size_t dummy;
const unsigned char *inbuf, *endbuf;
- unsigned char *outbuf = (unsigned char *) (pc16 ?: buf);
+ unsigned char *outbuf = (unsigned char *) buf;
const struct gconv_fcts *fcts;
/* Set information for this step. */
data.__invocation_counter = 0;
data.__internal_use = 1;
data.__flags = __GCONV_IS_LAST;
- data.__statep = ps ?: &state;
+ data.__statep = ps;
data.__trans = NULL;
/* A first special case is if S is NULL. This means put PS in the
@@ -85,8 +97,21 @@
if (fcts->toc16->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
#endif
+
+ /* We first have to check whether the character can be represented
+ without a surrogate. If we immediately pass in a buffer large
+ enough to hold two char16_t values and the first character does
+ not require a surrogate the routine will try to convert more
+ input if N is larger then needed for the first character. */
status = DL_CALL_FCT (fct, (fcts->toc16, &data, &inbuf, endbuf,
NULL, &dummy, 0, 1));
+
+ if (status == __GCONV_FULL_OUTPUT && data.__outbuf == outbuf)
+ {
+ data.__outbufend = outbuf + 2 * sizeof (char16_t);
+ status = DL_CALL_FCT (fct, (fcts->toc16, &data, &inbuf, endbuf,
+ NULL, &dummy, 0, 1));
+ }
/* There must not be any problems with the conversion but illegal input
characters. The output buffer must be large enough, otherwise the
@@ -100,15 +125,28 @@
if (status == __GCONV_OK || status == __GCONV_EMPTY_INPUT
|| status == __GCONV_FULL_OUTPUT)
{
- if (data.__outbuf != (unsigned char *) outbuf
- && *(char16_t *) outbuf == U('\0'))
+ if (pc16 != NULL)
+ *pc16 = buf[0];
+
+ if (data.__outbuf != outbuf && *(char16_t *) outbuf == U('\0'))
{
/* The converted character is the NUL character. */
assert (__mbsinit (data.__statep));
result = 0;
}
else
- result = inbuf - (const unsigned char *) s;
+ {
+ result = inbuf - (const unsigned char *) s;
+
+ if (data.__outbuf != outbuf + 2)
+ {
+ /* This is a surrogate. */
+ assert (buf[0] >= 0xd800 && buf[0] <= 0xdfff);
+ assert (buf[1] >= 0xdc00 && buf[1] <= 0xdfff);
+ ps->__count |= 0x80000000;
+ ps->__value.__wch = buf[1];
+ }
+ }
}
else if (status == __GCONV_INCOMPLETE_INPUT)
result = (size_t) -2;
Added: fsf/trunk/libc/wcsmbs/tst-c16c32-1.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/tst-c16c32-1.c (added)
+++ fsf/trunk/libc/wcsmbs/tst-c16c32-1.c Sun Jan 8 00:02:04 2012
@@ -1,0 +1,131 @@
+#include <inttypes.h>
+#include <locale.h>
+#include <stdio.h>
+#include <uchar.h>
+
+
+static int
+do_test (void)
+{
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("cannot set locale");
+ return 1;
+ }
+
+ int result = 0;
+
+ char32_t c32 = 48;
+ do
+ {
+ if (c32 >= 0xd800 && c32 <= 0xe000)
+ continue;
+
+ char buf[20];
+ size_t n1 = c32rtomb (buf, c32, NULL);
+ if (n1 <= 0)
+ {
+ printf ("c32rtomb for U'\\x%" PRIx32 "' failed\n", (uint32_t) c32);
+ result = 1;
+ continue;
+ }
+
+ char32_t c32out;
+ size_t n2 = mbrtoc32 (&c32out, buf, n1, NULL);
+ if ((ssize_t) n2 < 0)
+ {
+ printf ("mbrtoc32 for U'\\x%" PRIx32 "' failed\n", (uint32_t) c32);
+ result = 1;
+ continue;
+ }
+ if (n2 != n1)
+ {
+ printf ("mbrtoc32 for U'\\x%" PRIx32 "' consumed %zu bytes, not %zu\n",
+ (uint32_t) c32, n2, n1);
+ result = 1;
+ }
+ else if (c32out != c32)
+ {
+ printf ("mbrtoc32 for U'\\x%" PRIx32 "' produced U'\\x%" PRIx32 "\n",
+ (uint32_t) c32, (uint32_t) c32out);
+ result = 1;
+ }
+
+ char16_t c16;
+ size_t n3 = mbrtoc16 (&c16, buf, n1, NULL);
+ if (n3 != n1)
+ {
+ printf ("mbrtoc16 for U'\\x%" PRIx32 "' did not consume all bytes\n",
+ (uint32_t) c32);
+ result = 1;
+ continue;
+ }
+ if (c32 < 0x10000)
+ {
+ if (c16 != c32)
+ {
+ printf ("mbrtoc16 for U'\\x%" PRIx32 "' produce u'\\x%" PRIx16 "'\n",
+ (uint32_t) c32, (uint16_t) c16);
+ result = 1;
+ continue;
+ }
+ }
+ else
+ {
+ buf[0] = '1';
+ char16_t c16_2;
+ size_t n4 = mbrtoc16 (&c16_2, buf, 1, NULL);
+ if (n4 != (size_t) -3)
+ {
+ printf ("second mbrtoc16 for U'\\x%" PRIx32 "' did not return -3\n",
+ (uint32_t) c32);
+ result = 1;
+ continue;
+ }
+
+ if (c32 != (((uint32_t) (c16 - 0xd7c0)) << 10) + (c16_2 - 0xdc00))
+ {
+ printf ("mbrtoc16 for U'\\x%" PRIx32 "' returns U'\\x%" PRIx32 "\n",
+ (uint32_t) c32,
+ (((uint32_t) (c16 - 0xd7c0)) << 10) + (c16_2 - 0xdc00));
+ result = 1;
+ continue;
+ }
+ }
+
+ buf[0] = '\0';
+ char16_t c16_nul;
+ n3 = mbrtoc16 (&c16_nul, buf, n1, NULL);
+ if (n3 != 0)
+ {
+ printf ("mbrtoc16 for '\\0' returns %zd\n", n3);
+ result = 1;
+ continue;
+ }
+
+ if (c32 < 0x10000)
+ {
+ size_t n5 = c16rtomb (buf, c16, NULL);
+ if ((ssize_t) n5 < 0)
+ {
+ printf ("c16rtomb for U'\\x%" PRIx32 "' failed with %zd\n",
+ (uint32_t) c32, n5);
+ result = 1;
+ continue;
+ }
+ if (n5 != n1)
+ {
+ printf ("c16rtomb for U'\\x%" PRIx32 "' produced %zu bytes instead of %zu bytes\n",
+ (uint32_t) c32, n5, n1);
+ result = 1;
+ continue;
+ }
+ }
+ }
+ while ((c32 += 0x1111) <= U'\x12000');
+
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/wcsmbs/wcrtomb.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/wcrtomb.c (original)
+++ fsf/trunk/libc/wcsmbs/wcrtomb.c Sun Jan 8 00:02:04 2012
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1998,2000,2002,2005,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2000,2002,2005,2011,2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
@@ -38,7 +39,7 @@
size_t
__wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
{
- char buf[MB_CUR_MAX];
+ char buf[MB_LEN_MAX];
struct __gconv_step_data data;
int status;
size_t result;
Modified: fsf/trunk/libc/wcsmbs/wcsmbsload.c
==============================================================================
--- fsf/trunk/libc/wcsmbs/wcsmbsload.c (original)
+++ fsf/trunk/libc/wcsmbs/wcsmbsload.c Sun Jan 8 00:02:04 2012
@@ -1,4 +1,5 @@
-/* Copyright (C) 1998-2002,2004,2005,2008,2010,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002,2004,2005,2008,2010,2011,2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -74,7 +75,7 @@
.__counter = INT_MAX,
.__from_name = (char *) "ANSI_X3.4-1968//TRANSLIT",
.__to_name = (char *) "UTF-16//",
- .__fct = __gconv_transform_ascii_utf16,
+ .__fct = __gconv_transform_ascii_char16,
.__btowc_fct = NULL,
.__init_fct = NULL,
.__end_fct = NULL,
@@ -93,7 +94,7 @@
.__counter = INT_MAX,
.__from_name = (char *) "UTF-16//",
.__to_name = (char *) "ANSI_X3.4-1968//TRANSLIT",
- .__fct = __gconv_transform_utf16_ascii,
+ .__fct = __gconv_transform_char16_ascii,
.__btowc_fct = NULL,
.__init_fct = NULL,
.__end_fct = NULL,
@@ -209,7 +210,7 @@
int use_translit;
/* Allocate the gconv_fcts structure. */
- new_fcts = malloc (sizeof *new_fcts);
+ new_fcts = calloc (1, sizeof *new_fcts);
if (new_fcts == NULL)
goto failed;
@@ -229,16 +230,24 @@
represent all others. */
new_fcts->towc = __wcsmbs_getfct ("INTERNAL", complete_name,
&new_fcts->towc_nsteps);
- new_fcts->tomb = (new_fcts->towc != NULL
- ? __wcsmbs_getfct (complete_name, "INTERNAL",
- &new_fcts->tomb_nsteps)
- : NULL);
-
- // XXX
- new_fcts->toc16 = (struct __gconv_step *) &to_c16;
- new_fcts->toc16_nsteps = 1;
- new_fcts->fromc16 = (struct __gconv_step *) &from_c16;
- new_fcts->fromc16_nsteps = 1;
+ if (new_fcts->towc != NULL)
+ new_fcts->tomb = __wcsmbs_getfct (complete_name, "INTERNAL",
+ &new_fcts->tomb_nsteps);
+
+ if (new_fcts->tomb != NULL)
+ {
+ new_fcts->toc16 = __wcsmbs_getfct ("CHAR16", complete_name,
+ &new_fcts->toc16_nsteps);
+
+ if (new_fcts->toc16 != NULL)
+ new_fcts->fromc16 = __wcsmbs_getfct (complete_name, "CHAR16",
+ &new_fcts->fromc16_nsteps);
+ else
+ {
+ __gconv_close_transform (new_fcts->toc16, new_fcts->toc16_nsteps);
+ new_fcts->toc16 = NULL;
+ }
+ }
/* If any of the conversion functions is not available we don't
use any since this would mean we cannot convert back and
@@ -255,6 +264,12 @@
}
else
{
+ // XXX At least for now we live with the CHAR16 not being available.
+ if (new_fcts->toc16 == NULL)
+ new_fcts->toc16 = __wcsmbs_gconv_fcts_c.toc16;
+ if (new_fcts->fromc16 == NULL)
+ new_fcts->fromc16 = __wcsmbs_gconv_fcts_c.fromc16;
+
new_category->private.ctype = new_fcts;
new_category->private.cleanup = &_nl_cleanup_ctype;
}
@@ -277,11 +292,15 @@
*copy = *orig;
/* Now increment the usage counters.
- Note: This assumes copy->towc_nsteps == 1 and copy->tomb_nsteps == 1. */
+ Note: This assumes copy->*_nsteps == 1. */
if (copy->towc->__shlib_handle != NULL)
++copy->towc->__counter;
if (copy->tomb->__shlib_handle != NULL)
++copy->tomb->__counter;
+ if (copy->toc16->__shlib_handle != NULL)
+ ++copy->toc16->__counter;
+ if (copy->fromc16->__shlib_handle != NULL)
+ ++copy->fromc16->__counter;
}
@@ -296,28 +315,22 @@
copy->tomb = __wcsmbs_getfct (name, "INTERNAL", ©->tomb_nsteps);
if (copy->tomb == NULL)
[... 54 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits