about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-20 08:14:24 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-20 08:14:24 +0000
commit02779eaafe9065ecafa307f33ddbb8b5eac999b7 (patch)
tree255451e8aea47f26bc18215497173fe97d6e56d9
parent93a568aaba1d3da3497102dfe1eeb81070a24c1c (diff)
downloadglibc-02779eaafe9065ecafa307f33ddbb8b5eac999b7.tar.gz
glibc-02779eaafe9065ecafa307f33ddbb8b5eac999b7.tar.xz
glibc-02779eaafe9065ecafa307f33ddbb8b5eac999b7.zip
Update.
2002-04-18  Bruno Haible  <bruno@clisp.org>

	* iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for
	FROM_DIRECTION): Make the FROM direction stateless.
	* iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for
	FROM_DIRECTION): Likewise.

	* iconvdata/cvs11643l1.c: Update comments.
	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
-rw-r--r--ChangeLog9
-rw-r--r--NEWS3
-rw-r--r--iconvdata/SHIFT_JISX0213.irreversible2
-rw-r--r--iconvdata/cns11643l1.c6
-rw-r--r--iconvdata/euc-jisx0213.c204
-rw-r--r--iconvdata/shift_jisx0213.c224
-rw-r--r--localedata/ChangeLog126
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list2
8 files changed, 340 insertions, 236 deletions
diff --git a/ChangeLog b/ChangeLog
index 300a096115..7426d6d709 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-18  Bruno Haible  <bruno@clisp.org>
+
+	* iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for
+	FROM_DIRECTION): Make the FROM direction stateless.
+	* iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for
+	FROM_DIRECTION): Likewise.
+
 2002-04-15  Bruno Haible  <bruno@clisp.org>
 
 	* iconvdata/JISX0213.TXT: New file.
@@ -45,6 +52,7 @@
 	(__cns11643l2*_to_ucs4_tab, __cns11643_from_ucs4p0_tab,
 	__cns11643_from_ucs4p2_tab): Regenerated.
 	(__cns11643_from_ucs4p2c_tab): New array.
+	* iconvdata/cvs11643l1.c: Update comments.
 	* iconvdata/EUC-TW.irreversible: Remove two entries.
 
 2002-04-15  Bruno Haible  <bruno@clisp.org>
@@ -96,6 +104,7 @@
 	* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
 	* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
 	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
 
diff --git a/NEWS b/NEWS
index 6bd0f4b563..3a693d0f2b 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,9 @@ Version 2.3
 
 * Isamu Hasegawa contributed a completely new and POSIX conforming
   implementation of regex.
+
+* Bruno Haible upgraded the iconv and locale implementation to support
+  Unicode 3.2.
 
 Version 2.2.5
 
diff --git a/iconvdata/SHIFT_JISX0213.irreversible b/iconvdata/SHIFT_JISX0213.irreversible
new file mode 100644
index 0000000000..cf99b7265e
--- /dev/null
+++ b/iconvdata/SHIFT_JISX0213.irreversible
@@ -0,0 +1,2 @@
+0x5C	0x005C
+0x7E	0x007E
diff --git a/iconvdata/cns11643l1.c b/iconvdata/cns11643l1.c
index 7e179e36c6..1ea1297204 100644
--- a/iconvdata/cns11643l1.c
+++ b/iconvdata/cns11643l1.c
@@ -1,5 +1,5 @@
 /* Mapping tables for CNS 11643, plane 1 handling.
-   Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -20,9 +20,9 @@
 
 #include <stdint.h>
 
-/* To generate a Unicode 3.1 CNS11643.TXT, take
+/* To generate a Unicode 3.2 CNS11643.TXT, take
    http://www.unicode.org/Public/Mappings/EASTASIA/OTHER/CNS11643.TXT
-   and add the following lines (see Unicode 3.1 UNIHAN.TXT):
+   and add the following lines (see Unicode 3.2 UNIHAN.TXT):
    0x12728	0x4EA0	#	<CJK Ideograph>
    0x1272F	0x51AB	#	<CJK Ideograph>
    0x12734	0x52F9	#	<CJK Ideograph>
diff --git a/iconvdata/euc-jisx0213.c b/iconvdata/euc-jisx0213.c
index b0836b173d..c696f94ee8 100644
--- a/iconvdata/euc-jisx0213.c
+++ b/iconvdata/euc-jisx0213.c
@@ -62,9 +62,7 @@
     *statep = saved_state
 
 
-/* During EUC-JISX0213 to UCS-4 conversion, the COUNT element of the state
-   contains the last UCS-4 character, shifted by 3 bits.
-   During UCS-4 to EUC-JISX0213 conversion, the COUNT element of the state
+/* During UCS-4 to EUC-JISX0213 conversion, the COUNT element of the state
    contains the last two bytes to be output, shifted by 3 bits.  */
 
 /* Since this is a stateful encoding we have to provide code which resets
@@ -74,17 +72,8 @@
   if (data->__statep->__count != 0)					      \
     {									      \
       if (FROM_DIRECTION)						      \
-	{								      \
-	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
-	    {								      \
-	      /* Write out the last character.  */			      \
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
-	      data->__statep->__count = 0;				      \
-	    }								      \
-	  else								      \
-	    /* We don't have enough room in the output buffer.  */	      \
-	    status = __GCONV_FULL_OUTPUT;				      \
-	}								      \
+	/* We don't use shift states in the FROM_DIRECTION.  */		      \
+	data->__statep->__count = 0;					      \
       else								      \
 	{								      \
 	  if (__builtin_expect (outbuf + 2 <= outend, 1))		      \
@@ -109,33 +98,44 @@
 #define LOOPFCT			FROM_LOOP
 #define BODY \
   {									      \
-    uint32_t ch;							      \
+    uint32_t ch = *inptr;						      \
 									      \
-    /* Determine whether there is a buffered character pending.  */	      \
-    ch = *statep >> 3;							      \
-    if (__builtin_expect (ch == 0, 1))					      \
+    if (ch < 0x80)							      \
+      /* Plain ASCII character.  */					      \
+      ++inptr;								      \
+    else if ((ch >= 0xa1 && ch <= 0xfe) || ch == 0x8e || ch == 0x8f)	      \
       {									      \
-	/* No - so look at the next input byte.  */			      \
-	ch = *inptr;							      \
-	if (ch < 0x80)							      \
-	  /* Plain ASCII character.  */					      \
-	  ++inptr;							      \
-	else if ((ch >= 0xa1 && ch <= 0xfe) || ch == 0x8e || ch == 0x8f)      \
+	/* Two or three byte character.  */				      \
+	uint32_t ch2;							      \
+									      \
+	if (__builtin_expect (inptr + 1 >= inend, 0))			      \
 	  {								      \
-	    /* Two or three byte character.  */				      \
-	    uint32_t ch2;						      \
+	    /* The second byte is not available.  */			      \
+	    result = __GCONV_INCOMPLETE_INPUT;				      \
+	    break;							      \
+	  }								      \
+									      \
+	ch2 = inptr[1];							      \
 									      \
-	    if (__builtin_expect (inptr + 1 >= inend, 0))		      \
+	/* The second byte must be >= 0xa1 and <= 0xfe.  */		      \
+	if (__builtin_expect (ch2 < 0xa1 || ch2 > 0xfe, 0))		      \
+	  {								      \
+	    /* This is an illegal character.  */			      \
+	    if (! ignore_errors_p ())					      \
 	      {								      \
-		/* The second byte is not available.  */		      \
-		result = __GCONV_INCOMPLETE_INPUT;			      \
+		result = __GCONV_ILLEGAL_INPUT;				      \
 		break;							      \
 	      }								      \
 									      \
-	    ch2 = inptr[1];						      \
+	    ++inptr;							      \
+	    ++*irreversible;						      \
+	    break;							      \
+	  }								      \
 									      \
-	    /* The second byte must be >= 0xa1 and <= 0xfe.  */		      \
-	    if (__builtin_expect (ch2 < 0xa1 || ch2 > 0xfe, 0))		      \
+	if (ch == 0x8e)							      \
+	  {								      \
+	    /* Half-width katakana.  */					      \
+	    if (__builtin_expect (ch2 > 0xdf, 0))			      \
 	      {								      \
 		/* This is an illegal character.  */			      \
 		if (! ignore_errors_p ())				      \
@@ -149,107 +149,89 @@
 		break;							      \
 	      }								      \
 									      \
-	    if (ch == 0x8e)						      \
+	    ch = ch2 + 0xfec0;						      \
+	    inptr += 2;							      \
+	  }								      \
+	else								      \
+	  {								      \
+	    const unsigned char *endp;					      \
+									      \
+	    if (ch == 0x8f)						      \
 	      {								      \
-		/* Half-width katakana.  */				      \
-		if (__builtin_expect (ch2 > 0xdf, 0))			      \
+		/* JISX 0213 plane 2.  */				      \
+		uint32_t ch3;						      \
+									      \
+		if (__builtin_expect (inptr + 2 >= inend, 0))		      \
 		  {							      \
-		    /* This is an illegal character.  */		      \
-		    if (! ignore_errors_p ())				      \
-		      {							      \
-			result = __GCONV_ILLEGAL_INPUT;			      \
-			break;						      \
-		      }							      \
-									      \
-		    ++inptr;						      \
-		    ++*irreversible;					      \
+		    /* The third byte is not available.  */		      \
+		    result = __GCONV_INCOMPLETE_INPUT;			      \
 		    break;						      \
 		  }							      \
 									      \
-		ch = ch2 + 0xfec0;					      \
-		inptr += 2;						      \
+		ch3 = inptr[2];						      \
+		endp = inptr + 3;					      \
+									      \
+		ch = jisx0213_to_ucs4 (0x200 - 0x80 + ch2, ch3 ^ 0x80);	      \
 	      }								      \
 	    else							      \
 	      {								      \
-		const unsigned char *endp;				      \
+		/* JISX 0213 plane 1.  */				      \
+		endp = inptr + 2;					      \
 									      \
-		if (ch == 0x8f)						      \
-		  {							      \
-		    /* JISX 0213 plane 2.  */				      \
-		    uint32_t ch3;					      \
+		ch = jisx0213_to_ucs4 (0x100 - 0x80 + ch, ch2 ^ 0x80);	      \
+	      }								      \
 									      \
-		    if (__builtin_expect (inptr + 2 >= inend, 0))	      \
-		      {							      \
-			/* The third byte is not available.  */		      \
-			result = __GCONV_INCOMPLETE_INPUT;		      \
-			break;						      \
-		      }							      \
+	    if (ch == 0)						      \
+	      {								      \
+		/* This is an illegal character.  */			      \
+		if (! ignore_errors_p ())				      \
+		  {							      \
+		    result = __GCONV_ILLEGAL_INPUT;			      \
+		    break;						      \
+		  }							      \
 									      \
-		    ch3 = inptr[2];					      \
-		    endp = inptr + 3;					      \
+		++inptr;						      \
+		++*irreversible;					      \
+		break;							      \
+	      }								      \
 									      \
-		    ch = jisx0213_to_ucs4 (0x200 - 0x80 + ch2, ch3 ^ 0x80);   \
-		  }							      \
-		else							      \
-		  {							      \
-		    /* JISX 0213 plane 1.  */				      \
-		    endp = inptr + 2;					      \
+	    inptr = endp;						      \
 									      \
-		    ch = jisx0213_to_ucs4 (0x100 - 0x80 + ch, ch2 ^ 0x80);    \
-		  }							      \
+	    if (ch < 0x80)						      \
+	      {								      \
+		/* It's a combining character.  */			      \
+		uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0];	      \
+		uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1];	      \
 									      \
-		if (ch == 0)						      \
+		/* See whether we have room for two characters.  */	      \
+		if (outptr + 8 <= outend)				      \
 		  {							      \
-		    /* This is an illegal character.  */		      \
-		    if (! ignore_errors_p ())				      \
-		      {							      \
-			result = __GCONV_ILLEGAL_INPUT;			      \
-			break;						      \
-		      }							      \
-									      \
-		    ++inptr;						      \
-		    ++*irreversible;					      \
-		    break;						      \
+		    put32 (outptr, u1);					      \
+		    outptr += 4;					      \
+		    put32 (outptr, u2);					      \
+		    outptr += 4;					      \
+		    continue;						      \
 		  }							      \
-									      \
-		inptr = endp;						      \
-									      \
-		if (ch < 0x80)						      \
+		else							      \
 		  {							      \
-		    /* It's a combining character.  */			      \
-		    uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0];     \
-		    uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1];     \
-									      \
-		    /* See whether we have room for two characters.  */	      \
-		    if (outptr + 8 <= outend)				      \
-		      {							      \
-			put32 (outptr, u1);				      \
-			outptr += 4;					      \
-			put32 (outptr, u2);				      \
-			outptr += 4;					      \
-			continue;					      \
-		      }							      \
-									      \
-		    /* Otherwise store only the first character now, and      \
-		       put the second one into the queue.  */		      \
-		    ch = u1;						      \
-		    *statep = u2 << 3;					      \
+		    result = __GCONV_FULL_OUTPUT;			      \
+		    break;						      \
 		  }							      \
 	      }								      \
 	  }								      \
-	else								      \
+      }									      \
+    else								      \
+      {									      \
+	/* This is illegal.  */						      \
+	if (! ignore_errors_p ())					      \
 	  {								      \
-	    /* This is illegal.  */					      \
-	    if (! ignore_errors_p ())					      \
-	      {								      \
-		result = __GCONV_ILLEGAL_INPUT;				      \
-		break;							      \
-	      }								      \
-									      \
-	    ++inptr;							      \
-	    ++*irreversible;						      \
-	    continue;							      \
+	    result = __GCONV_ILLEGAL_INPUT;				      \
+	    break;							      \
 	  }								      \
+									      \
+	++inptr;							      \
+	++*irreversible;						      \
+	continue;							      \
       }									      \
 									      \
     put32 (outptr, ch);							      \
diff --git a/iconvdata/shift_jisx0213.c b/iconvdata/shift_jisx0213.c
index 81fef70ac0..0c1ca722c3 100644
--- a/iconvdata/shift_jisx0213.c
+++ b/iconvdata/shift_jisx0213.c
@@ -62,9 +62,7 @@
     *statep = saved_state
 
 
-/* During Shift_JISX0213 to UCS-4 conversion, the COUNT element of the state
-   contains the last UCS-4 character, shifted by 3 bits.
-   During UCS-4 to Shift_JISX0213 conversion, the COUNT element of the state
+/* During UCS-4 to Shift_JISX0213 conversion, the COUNT element of the state
    contains the last two bytes to be output, shifted by 3 bits.  */
 
 /* Since this is a stateful encoding we have to provide code which resets
@@ -74,17 +72,8 @@
   if (data->__statep->__count != 0)					      \
     {									      \
       if (FROM_DIRECTION)						      \
-	{								      \
-	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
-	    {								      \
-	      /* Write out the last character.  */			      \
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
-	      data->__statep->__count = 0;				      \
-	    }								      \
-	  else								      \
-	    /* We don't have enough room in the output buffer.  */	      \
-	    status = __GCONV_FULL_OUTPUT;				      \
-	}								      \
+	/* We don't use shift states in the FROM_DIRECTION.  */		      \
+	data->__statep->__count = 0;					      \
       else								      \
 	{								      \
 	  if (__builtin_expect (outbuf + 2 <= outend, 1))		      \
@@ -109,137 +98,130 @@
 #define LOOPFCT			FROM_LOOP
 #define BODY \
   {									      \
-    uint32_t ch;							      \
+    uint32_t ch = *inptr;						      \
 									      \
-    /* Determine whether there is a buffered character pending.  */	      \
-    ch = *statep >> 3;							      \
-    if (__builtin_expect (ch == 0, 1))					      \
+    if (ch < 0x80)							      \
       {									      \
-	/* No - so look at the next input byte.  */			      \
-	ch = *inptr;							      \
-	if (ch < 0x80)							      \
-	  {								      \
-	    /* Plain ISO646-JP character.  */				      \
-	    if (__builtin_expect (ch == 0x5c, 0))			      \
-	      ch = 0xa5;						      \
-	    else if (__builtin_expect (ch == 0x7e, 0))			      \
-	      ch = 0x203e;						      \
-	    ++inptr;							      \
-	  }								      \
-	else if (ch >= 0xa1 && ch <= 0xdf)				      \
+	/* Plain ISO646-JP character.  */				      \
+	if (__builtin_expect (ch == 0x5c, 0))				      \
+	  ch = 0xa5;							      \
+	else if (__builtin_expect (ch == 0x7e, 0))			      \
+	  ch = 0x203e;							      \
+	++inptr;							      \
+      }									      \
+    else if (ch >= 0xa1 && ch <= 0xdf)					      \
+      {									      \
+	/* Half-width katakana.  */					      \
+	ch += 0xfec0;							      \
+	++inptr;							      \
+      }									      \
+    else if ((ch >= 0x81 && ch <= 0x9f) || (ch >= 0xe0 && ch <= 0xfc))	      \
+      {									      \
+	/* Two byte character.  */					      \
+	uint32_t ch2;							      \
+									      \
+	if (__builtin_expect (inptr + 1 >= inend, 0))			      \
 	  {								      \
-	    /* Half-width katakana.  */					      \
-	    ch += 0xfec0;						      \
-	    ++inptr;							      \
+	    /* The second byte is not available.  */			      \
+	    result = __GCONV_INCOMPLETE_INPUT;				      \
+	    break;							      \
 	  }								      \
-	else if ((ch >= 0x81 && ch <= 0x9f) || (ch >= 0xe0 && ch <= 0xfc))    \
-	  {								      \
-	    /* Two byte character.  */					      \
-	    uint32_t ch2;						      \
-									      \
-	    if (__builtin_expect (inptr + 1 >= inend, 0))		      \
-	      {								      \
-		/* The second byte is not available.  */		      \
-		result = __GCONV_INCOMPLETE_INPUT;			      \
-		break;							      \
-	      }								      \
 									      \
-	    ch2 = inptr[1];						      \
+	ch2 = inptr[1];							      \
 									      \
-	    /* The second byte must be in the range 0x{40..7E,80..FC}.  */    \
-	    if (__builtin_expect (ch2 < 0x40 || ch2 == 0x7f || ch2 > 0xfc, 0))\
+	/* The second byte must be in the range 0x{40..7E,80..FC}.  */	      \
+	if (__builtin_expect (ch2 < 0x40 || ch2 == 0x7f || ch2 > 0xfc, 0))    \
+	  {								      \
+	    /* This is an illegal character.  */			      \
+	    if (! ignore_errors_p ())					      \
 	      {								      \
-		/* This is an illegal character.  */			      \
-		if (! ignore_errors_p ())				      \
-		  {							      \
-		    result = __GCONV_ILLEGAL_INPUT;			      \
-		    break;						      \
-		  }							      \
-									      \
-		++inptr;						      \
-		++*irreversible;					      \
+		result = __GCONV_ILLEGAL_INPUT;				      \
 		break;							      \
 	      }								      \
 									      \
-	    /* Convert to row and column.  */				      \
-	    if (ch < 0xe0)						      \
-	      ch -= 0x81;						      \
-	    else							      \
-	      ch -= 0xc1;						      \
-	    if (ch2 < 0x80)						      \
-	      ch2 -= 0x40;						      \
-	    else							      \
-	      ch2 -= 0x41;						      \
-	    /* Now 0 <= ch <= 0x3b, 0 <= ch2 <= 0xbb.  */		      \
-	    ch = 2 * ch;						      \
-	    if (ch2 >= 0x5e)						      \
-	      ch2 -= 0x5e, ch++;					      \
-	    ch2 += 0x21;						      \
-	    if (ch >= 0x5e)						      \
-	      {								      \
-		/* Handling of JISX 0213 plane 2 rows.  */		      \
-		if (ch >= 0x67)						      \
-		  ch += 230;						      \
-		else if (ch >= 0x63 || ch == 0x5f)			      \
-		  ch += 168;						      \
-		else 							      \
-		  ch += 162;						      \
-	      }								      \
+	    ++inptr;							      \
+	    ++*irreversible;						      \
+	    break;							      \
+	  }								      \
 									      \
-	    ch = jisx0213_to_ucs4 (0x121 + ch, ch2);			      \
+	/* Convert to row and column.  */				      \
+	if (ch < 0xe0)							      \
+	  ch -= 0x81;							      \
+	else								      \
+	  ch -= 0xc1;							      \
+	if (ch2 < 0x80)							      \
+	  ch2 -= 0x40;							      \
+	else								      \
+	  ch2 -= 0x41;							      \
+	/* Now 0 <= ch <= 0x3b, 0 <= ch2 <= 0xbb.  */			      \
+	ch = 2 * ch;							      \
+	if (ch2 >= 0x5e)						      \
+	  ch2 -= 0x5e, ch++;						      \
+	ch2 += 0x21;							      \
+	if (ch >= 0x5e)							      \
+	  {								      \
+	    /* Handling of JISX 0213 plane 2 rows.  */			      \
+	    if (ch >= 0x67)						      \
+	      ch += 230;						      \
+	    else if (ch >= 0x63 || ch == 0x5f)				      \
+	      ch += 168;						      \
+	    else 							      \
+	      ch += 162;						      \
+	  }								      \
 									      \
-	    if (ch == 0)						      \
-	      {								      \
-		/* This is an illegal character.  */			      \
-		if (! ignore_errors_p ())				      \
-		  {							      \
-		    result = __GCONV_ILLEGAL_INPUT;			      \
-		    break;						      \
-		  }							      \
+	ch = jisx0213_to_ucs4 (0x121 + ch, ch2);			      \
 									      \
-		++inptr;						      \
-		++*irreversible;					      \
+	if (ch == 0)							      \
+	  {								      \
+	    /* This is an illegal character.  */			      \
+	    if (! ignore_errors_p ())					      \
+	      {								      \
+		result = __GCONV_ILLEGAL_INPUT;				      \
 		break;							      \
-	      }								      \
+	     }								      \
 									      \
-	    inptr += 2;							      \
+	    ++inptr;							      \
+	    ++*irreversible;						      \
+	    break;							      \
+	  }								      \
 									      \
-	    if (ch < 0x80)						      \
-	      {								      \
-		/* It's a combining character.  */			      \
-		uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0];	      \
-		uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1];	      \
+	inptr += 2;							      \
 									      \
-		/* See whether we have room for two characters.  */	      \
-		if (outptr + 8 <= outend)				      \
-		  {							      \
-		    put32 (outptr, u1);					      \
-		    outptr += 4;					      \
-		    put32 (outptr, u2);					      \
-		    outptr += 4;					      \
-		    continue;						      \
-		  }							      \
+	if (ch < 0x80)							      \
+	  {								      \
+	    /* It's a combining character.  */				      \
+	    uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0];	      \
+	    uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1];	      \
 									      \
-		/* Otherwise store only the first character now, and	      \
-		   put the second one into the queue.  */		      \
-		ch = u1;						      \
-		*statep = u2 << 3;					      \
+	    /* See whether we have room for two characters.  */		      \
+	    if (outptr + 8 <= outend)					      \
+	      {								      \
+		put32 (outptr, u1);					      \
+		outptr += 4;						      \
+		put32 (outptr, u2);					      \
+		outptr += 4;						      \
+		continue;						      \
 	      }								      \
-	  }								      \
-	else								      \
-	  {								      \
-	    /* This is illegal.  */					      \
-	    if (! ignore_errors_p ())					      \
+	    else							      \
 	      {								      \
-		result = __GCONV_ILLEGAL_INPUT;				      \
+		result = __GCONV_FULL_OUTPUT;				      \
 		break;							      \
 	      }								      \
-									      \
-	    ++inptr;							      \
-	    ++*irreversible;						      \
-	    continue;							      \
 	  }								      \
       }									      \
+    else								      \
+      {									      \
+	/* This is illegal.  */						      \
+	if (! ignore_errors_p ())					      \
+	  {								      \
+	    result = __GCONV_ILLEGAL_INPUT;				      \
+	    break;							      \
+	  }								      \
+									      \
+	++inptr;							      \
+	++*irreversible;						      \
+	continue;							      \
+      }									      \
 									      \
     put32 (outptr, ch);							      \
     outptr += 4;							      \
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 5ac53d5c60..ec4936fe0e 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,5 +1,131 @@
 2002-04-15  Bruno Haible  <bruno@clisp.org>
 
+	* charmaps/EUC-JISX0213: New file.
+	* charmaps/SHIFT_JISX0213: New file.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	* charmaps/BIG5-HKSCS: Update to Unicode 3.2.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	* charmaps/EUC-TW: Add many mappings for characters introduced in
+	Unicode 3.1 and 3.2.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	* charmaps/GB18030: Update for Unicode 3.2:
+	Add <U0220>, <U034F>, <U0363>..<U036F>, <U03D8>..<U03D9>,
+	<U03F6>, <U048A>..<U048B>, <U04C5>..<U04C6>, <U04C9>..<U04CA>,
+	<U04CD>..<U04CE>, <U0500>..<U050F>, <U066E>..<U066F>, <U07B1>,
+	<U10F7>..<U10F8>, <U1700>..<U170C>, <U170E>..<U1714>, <U1720>..<U1736>,
+	<U1740>..<U1753>, <U1760>..<U1770>, <U1772>..<U1773>, <U2047>,
+	<U204E>..<U2052>, <U2057>, <U205F>..<U2063>, <U2071>, <U20B0>..<U20B1>,
+	<U20E4>..<U20EA>, <U213D>..<U214B>, <U21F4>..<U21FF>, <U22F2>..<U22FF>,
+	<U237C>, <U239B>..<U23CE>, <U24EB>..<U24FE>, <U2596>..<U259F>,
+	<U25F8>..<U25FF>, <U2616>..<U2617>, <U2672>..<U267D>, <U2680>..<U2689>,
+	<U2768>..<U2775>, <U27D0>..<U27EB>, <U27F0>..<U27FF>, <U2900>..<U2AFF>,
+	<U303B>..<U303D>, <U3095>..<U3096>, <U309F>..<U30A0>, <U30FF>,
+	<U31F0>..<U31FF>, <U3251>..<U325F>, <U32B1>..<U32BF>, <UA4A2>..<UA4A3>,
+	<UA4B4>, <UA4C1>, <UA4C5>, <UFA30>..<UFA6A>, <UFDFC>, <UFE00>..<UFE0F>,
+	<UFE45>..<UFE46>, <UFE73>, <UFF5F>..<UFF60>.  Update width table.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	* charmaps/UTF-8: Update for Unicode 3.2:
+	Add <U0220>, <U034F>, <U0363>..<U036F>, <U03D8>..<U03D9>,
+	<U03F6>, <U048A>..<U048B>, <U04C5>..<U04C6>, <U04C9>..<U04CA>,
+	<U04CD>..<U04CE>, <U0500>..<U050F>, <U066E>..<U066F>, <U07B1>,
+	<U10F7>..<U10F8>, <U1700>..<U170C>, <U170E>..<U1714>, <U1720>..<U1736>,
+	<U1740>..<U1753>, <U1760>..<U1770>, <U1772>..<U1773>, <U2047>,
+	<U204E>..<U2052>, <U2057>, <U205F>..<U2063>, <U2071>, <U20B0>..<U20B1>,
+	<U20E4>..<U20EA>, <U213D>..<U214B>, <U21F4>..<U21FF>, <U22F2>..<U22FF>,
+	<U237C>, <U239B>..<U23CE>, <U24EB>..<U24FE>, <U2596>..<U259F>,
+	<U25F8>..<U25FF>, <U2616>..<U2617>, <U2672>..<U267D>, <U2680>..<U2689>,
+	<U2768>..<U2775>, <U27D0>..<U27EB>, <U27F0>..<U27FF>, <U2900>..<U2AFF>,
+	<U303B>..<U303D>, <U3095>..<U3096>, <U309F>..<U30A0>, <U30FF>,
+	<U31F0>..<U31FF>, <U3251>..<U325F>, <U32B1>..<U32BF>, <UA4A2>..<UA4A3>,
+	<UA4B4>, <UA4C1>, <UA4C5>, <UFA30>..<UFA6A>, <UFDFC>, <UFE00>..<UFE0F>,
+	<UFE45>..<UFE46>, <UFE73>, <UFF5F>..<UFF60>.  Update width table.
+	Assign width 2 to <U3008>..<U300B>, <U3014>..<U3015>, <U3018>..<U301B>.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	Update to Unicode 3.2.
+	* locales/translit_circle: Add <U3251>..<U325F>, <U32B1>..<U32BF>.
+	* locales/translit_cjk_compat: Change <UF951>.  Add <UFA30>..<UFA6A>.
+	* locales/translit_combining: Add more combining characters.
+	* locales/translit_compat: Add <U2047>, <U2057>, <U205F>, <U2A0C>,
+	<U2A74>..<U2A76>.
+	* locales/translit_font: Add <U213D>..<U2140>, <U2145>..<U2149>.
+	* locales/translit_neutral: Add <U2060>..<U2063>, <U30A0>,
+	<UFE00>..<UFE0F>.
+	* locales/translit_small: Add small Hiragana letters and small
+	Katakana letters.
+	* locales/translit_wide: Add <UFF5F>..<UFF60>.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
+	* locales/i18n (LC_CTYPE): Update to Unicode 3.2. In detail:
+	(upper): Add <U0220>, <U03D8>, <U048A>, <U04C5>, <U04C9>, <U04CD>,
+	<U0500>, <U0502>, <U0504>, <U0506>, <U0508>, <U050A>, <U050C>, <U050E>.
+	(lower): Add <U019E>, <U03D9>, <U048B>, <U04C6>, <U04CA>, <U04CE>,
+	<U0501>, <U0503>, <U0505>, <U0507>, <U0509>, <U050B>, <U050D>, <U050F>.
+	(alpha): Add <U0220>, <U03D8>..<U03D9>, <U048A>..<U048B>,
+	<U04C5>..<U04C6>, <U04C9>..<U04CA>, <U04CD>..<U04CE>, <U0500>..<U050F>,
+	<U066E>..<U066F>, <U07B1>, <U0B83>, <U10F7>..<U10F8>, <U1700>..<U170C>,
+	<U170E>..<U1711>, <U1720>..<U1731>, <U1740>..<U1751>, <U1760>..<U1770>,
+	<U17D7>, <U17DC>, <U2071>, <U213D>..<U213F>, <U2145>..<U2149>,
+	<U303B>..<U303C>, <U3095>..<U3096>, <U309F>, <U30FF>, <U31F0>..<U31FF>,
+	<UFA30>..<UFA6A>, <UFE73>.
+	(space): Add <U205F>.
+	(punct): Add <U034F>, <U0363>..<U036F>, <U03F6>, <U1712>..<U1714>,
+	<U1732>..<U1736>, <U1752>..<U1753>, <U1772>..<U1773>, <U2047>,
+	<U204E>..<U2052>, <U2057>, <U2060>..<U2063>, <U20B0>..<U20B1>,
+	<U20E4>..<U20EA>, <U2140>..<U2144>, <U214A>..<U214B>, <U21F4>..<U21FF>,
+	<U22F2>..<U22FF>, <U237C>, <U239B>..<U23CE>, <U24EB>..<U24FE>,
+	<U2596>..<U259F>, <U25F8>..<U25FF>, <U2616>..<U2617>, <U2672>..<U267D>,
+	<U2680>..<U2689>, <U2768>..<U2775>, <U27D0>..<U27EB>, <U27F0>..<U27FF>,
+	<U2900>..<U2AFF>, <U303D>, <U30A0>, <U3251>..<U325F>, <U32B1>..<U32BF>,
+	<UA4A2>..<UA4A3>, <UA4B4>, <UA4C1>, <UA4C5>, <UFDFC>, <UFE00>..<UFE0F>,
+	<UFF5F>..<UFF60>. Remove <U0B83>, <U17D7>, <U17DC>.
+	(graph): Add <U0220>, <U034F>, <U0363>..<U036F>, <U03D8>..<U03D9>,
+	<U03F6>, <U048A>..<U048B>, <U04C5>..<U04C6>, <U04C9>..<U04CA>,
+	<U04CD>..<U04CE>, <U0500>..<U050F>, <U066E>..<U066F>, <U07B1>,
+	<U10F7>..<U10F8>, <U1700>..<U170C>, <U170E>..<U1714>, <U1720>..<U1736>,
+	<U1740>..<U1753>, <U1760>..<U1770>, <U1772>..<U1773>, <U2047>,
+	<U204E>..<U2052>, <U2057>, <U2060>..<U2063>, <U2071>, <U20B0>..<U20B1>,
+	<U20E4>..<U20EA>, <U213D>..<U214B>, <U21F4>..<U21FF>, <U22F2>..<U22FF>,
+	<U237C>, <U239B>..<U23CE>, <U24EB>..<U24FE>, <U2596>..<U259F>,
+	<U25F8>..<U25FF>, <U2616>..<U2617>, <U2672>..<U267D>, <U2680>..<U2689>,
+	<U2768>..<U2775>, <U27D0>..<U27EB>, <U27F0>..<U27FF>, <U2900>..<U2AFF>,
+	<U303B>..<U303D>, <U3095>..<U3096>, <U309F>..<U30A0>, <U30FF>,
+	<U31F0>..<U31FF>, <U3251>..<U325F>, <U32B1>..<U32BF>, <UA4A2>..<UA4A3>,
+	<UA4B4>, <UA4C1>, <UA4C5>, <UFA30>..<UFA6A>, <UFDFC>, <UFE00>..<UFE0F>,
+	<UFE45>..<UFE46>, <UFE73>, <UFF5F>..<UFF60>.
+	(print): Likewise. Also add <U205F>.
+	(blank): Add <U205F>.
+	(toupper): Add (<U019E>,<U0220>), (<U03D9>,<U03D8>), (<U048B>,<U048A>),
+	(<U04C6>,<U04C5>), (<U04CA>,<U04C9>), (<U04CE>,<U04CD>),
+	(<U0501>,<U0500>), (<U0503>,<U0502>), (<U0505>,<U0504>),
+	(<U0507>,<U0506>), (<U0509>,<U0508>), (<U050B>,<U050A>),
+	(<U050D>,<U050C>), (<U050F>,<U050E>).
+	(totitle): Likewise.
+	(tolower): Add (<U0220>,<U019E>), (<U03D8>,<U03D9>), (<U048A>,<U048B>),
+	(<U04C5>,<U04C6>), (<U04C9>,<U04CA>), (<U04CD>,<U04CE>),
+	(<U0500>,<U0501>), (<U0502>,<U0503>), (<U0504>,<U0505>),
+	(<U0506>,<U0507>), (<U0508>,<U0509>), (<U050A>,<U050B>),
+	(<U050C>,<U050D>), (<U050E>,<U050F>).
+	(combining): Add <U034F>, <U0363>..<U036F>, <U1712>..<U1714>,
+	<U1732>..<U1734>, <U1752>..<U1753>, <U1772>..<U1773>, <U180B>..<U180D>,
+	<U20E4>..<U20EA>, <UFE00>..<UFE0F>. Remove <U06DD>, <U0B83>.
+	(combining_level3): Add <U034F>, <U1712>..<U1714>, <U1732>..<U1734>,
+	<U1752>..<U1753>, <U1772>..<U1773>, <U180B>..<U180D>, <U20E4>..<U20E6>,
+	<U20EA>, <UFE00>..<UFE0F>. Remove <U06DD>, <U0B83>.
+	* locales/tr_TR: Likewise.
+
+2002-04-15  Bruno Haible  <bruno@clisp.org>
+
 	* charmaps/IBM856: New file.
 	* charmaps/IBM922: New file.
 	* charmaps/IBM1124: New file.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
index bb5fdccca4..1dbd61f2df 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
@@ -27,7 +27,7 @@ semctl		-	semctl		i:iiii	__semctl	semctl
 # proper socket implementations:
 accept		-	accept		i:iBN	__libc_accept	__accept accept
 bind		-	bind		i:ipi	__bind		bind
-connect		-	connect		i:ipi	__libc_connect	__connect connect
+connect		-	connect		i:ipi	__libc_connect	__connect_internal __connect connect
 getpeername	-	getpeername	i:ipp	__getpeername	getpeername
 getsockname	-	getsockname	i:ipp	__getsockname	getsockname
 getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt