summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-28 05:05:42 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-28 05:05:42 +0000
commit428bcea4c83ca3b29b69279f99079ed0546d73c6 (patch)
tree3e24170ae284a72b72d010ba5c1b185b19a47a15
parentd64e704c8f38d38694398e7ba7104937a45c8737 (diff)
downloadglibc-428bcea4c83ca3b29b69279f99079ed0546d73c6.tar.gz
glibc-428bcea4c83ca3b29b69279f99079ed0546d73c6.tar.xz
glibc-428bcea4c83ca3b29b69279f99079ed0546d73c6.zip
Update.
2000-03-23  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_int.h (__gconv_transform_ucs2little_internal,
	__gconv_transform_internal_ucs2little): Remove declarations.
	* iconv/gconv_simple.c (__gconv_transform_ucs2_internal,
	__gconv_transform_internal_ucs2): Never	need to bswap_16.
	(__gconv_transform_ucs2reverse_internal,
	__gconv_transform_internal_ucs2reverse): Always need to bswap_16.
-rw-r--r--ChangeLog9
-rw-r--r--iconv/gconv_int.h2
-rw-r--r--iconv/gconv_simple.c63
-rw-r--r--shlib-versions3
4 files changed, 25 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 5654308636..50259d150b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-03-23  Bruno Haible  <haible@clisp.cons.org>
+
+	* iconv/gconv_int.h (__gconv_transform_ucs2little_internal,
+	__gconv_transform_internal_ucs2little): Remove declarations.
+	* iconv/gconv_simple.c (__gconv_transform_ucs2_internal,
+	__gconv_transform_internal_ucs2): Never	need to bswap_16.
+	(__gconv_transform_ucs2reverse_internal,
+	__gconv_transform_internal_ucs2reverse): Always need to bswap_16.
+
 2000-03-27  Roland McGrath  <roland@baalperazim.frob.com>
 
 	* include/shlib-compat.h (SHLIB_COMPAT): Make the test handle the
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index 6b81526594..626e45e45e 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.h
@@ -171,8 +171,6 @@ __BUILTIN_TRANS (__gconv_transform_ucs2_internal);
 __BUILTIN_TRANS (__gconv_transform_internal_ucs2);
 __BUILTIN_TRANS (__gconv_transform_ucs2reverse_internal);
 __BUILTIN_TRANS (__gconv_transform_internal_ucs2reverse);
-__BUILTIN_TRANS (__gconv_transform_ucs2little_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_ucs2little);
 __BUILTIN_TRANS (__gconv_transform_internal_ucs4);
 __BUILTIN_TRANS (__gconv_transform_internal_ucs4le);
 __BUILTIN_TRANS (__gconv_transform_internal_utf16);
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index 96a1efc96b..3cf0589240 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -396,14 +396,8 @@ internal_ucs4le_loop (const unsigned char **inptrp, const unsigned char *inend,
 #define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 #define LOOPFCT			FROM_LOOP
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define BODY \
-  *((uint32_t *) outptr)++ = bswap_16 (*(uint16_t *) inptr);		      \
-  inptr += 2;
-#else
-# define BODY \
+#define BODY \
   *((uint32_t *) outptr)++ = *((uint16_t *) inptr)++;
-#endif
 #include <iconv/loop.c>
 #include <iconv/skeleton.c>
 
@@ -421,21 +415,7 @@ internal_ucs4le_loop (const unsigned char **inptrp, const unsigned char *inend,
 #define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 #define LOOPFCT			FROM_LOOP
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define BODY \
-  {									      \
-    if (*((uint32_t *) inptr) >= 0x10000)				      \
-      {									      \
-	result = __GCONV_ILLEGAL_INPUT;					      \
-	break;								      \
-      }									      \
-    /* Please note that we use the `uint32_t' from-pointer as an `uint16_t'   \
-       pointer which works since we are on a little endian machine.  */	      \
-    *((uint16_t *) outptr)++ = bswap_16 (*((uint16_t *) inptr));	      \
-    inptr += 4;								      \
-  }
-#else
-# define BODY \
+#define BODY \
   {									      \
     if (*((uint32_t *) inptr) >= 0x10000)				      \
       {									      \
@@ -444,70 +424,53 @@ internal_ucs4le_loop (const unsigned char **inptrp, const unsigned char *inend,
       }									      \
     *((uint16_t *) outptr)++ = *((uint32_t *) inptr)++;			      \
   }
-#endif
 #include <iconv/loop.c>
 #include <iconv/skeleton.c>
 
 
-/* Convert from UCS2 in little endian to the internal (UCS4-like) format.  */
+/* Convert from UCS2 in other endianness to the internal (UCS4-like) format. */
 #define DEFINE_INIT		0
 #define DEFINE_FINI		0
 #define MIN_NEEDED_FROM		2
 #define MIN_NEEDED_TO		4
 #define FROM_DIRECTION		1
-#define FROM_LOOP		ucs2little_internal_loop
-#define TO_LOOP			ucs2little_internal_loop /* This is not used.*/
+#define FROM_LOOP		ucs2reverse_internal_loop
+#define TO_LOOP			ucs2reverse_internal_loop/* This is not used.*/
 #define FUNCTION_NAME		__gconv_transform_ucs2reverse_internal
 
 #define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 #define LOOPFCT			FROM_LOOP
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define BODY \
-  *((uint32_t *) outptr)++ = *((uint16_t *) inptr)++;
-#else
-# define BODY \
+#define BODY \
   *((uint32_t *) outptr)++ = bswap_16 (*(uint16_t *) inptr);		      \
   inptr += 2;
-#endif
 #include <iconv/loop.c>
 #include <iconv/skeleton.c>
 
 
-/* Convert from the internal (UCS4-like) format to UCS2 in little endian.  */
+/* Convert from the internal (UCS4-like) format to UCS2 in other endianness. */
 #define DEFINE_INIT		0
 #define DEFINE_FINI		0
 #define MIN_NEEDED_FROM		4
 #define MIN_NEEDED_TO		2
 #define FROM_DIRECTION		1
-#define FROM_LOOP		internal_ucs2little_loop
-#define TO_LOOP			internal_ucs2little_loop /* This is not used.*/
+#define FROM_LOOP		internal_ucs2reverse_loop
+#define TO_LOOP			internal_ucs2reverse_loop/* This is not used.*/
 #define FUNCTION_NAME		__gconv_transform_internal_ucs2reverse
 
 #define MIN_NEEDED_INPUT	MIN_NEEDED_FROM
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 #define LOOPFCT			FROM_LOOP
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define BODY \
-  {									      \
-    if (*((uint32_t *) inptr) >= 0x10000)				      \
-      {									      \
-	result = __GCONV_ILLEGAL_INPUT;					      \
-	break;								      \
-      }									      \
-    *((uint16_t *) outptr)++ = *((uint32_t *) inptr)++;			      \
-  }
-#else
-# define BODY \
+#define BODY \
   {									      \
-    if (*((uint32_t *) inptr) >= 0x10000)				      \
+    uint32_t val = *((uint32_t *) inptr);				      \
+    if (val >= 0x10000)							      \
       {									      \
 	result = __GCONV_ILLEGAL_INPUT;					      \
 	break;								      \
       }									      \
-    *((uint16_t *) outptr)++ = bswap_16 (((uint16_t *) inptr)[1]);	      \
+    *((uint16_t *) outptr)++ = bswap_16 (val);				      \
     inptr += 4;								      \
   }
-#endif
 #include <iconv/loop.c>
 #include <iconv/skeleton.c>
diff --git a/shlib-versions b/shlib-versions
index f4365eede6..f9f76afc13 100644
--- a/shlib-versions
+++ b/shlib-versions
@@ -25,11 +25,13 @@ alpha.*-.*-.*		libm=6
 powerpc-.*-.*		libm=6
 mips.*-.*-.*		libm=6
 arm.*-.*-.*		libm=6
+ia64-.*-.*		libm=6			GLIBC_2.2
 
 # We provide libc.so.6 for Linux kernel versions 2.0 and later.
 alpha.*-.*-linux.*	libc=6.1
 # Working mips versions were never released between 2.0 and 2.2.
 mips.*-.*-linux.*	libc=6			GLIBC_2.0 GLIBC_2.2
+ia64-.*-.*		libc=6			GLIBC_2.2
 .*-.*-linux.*		libc=6
 
 # libmachuser.so.1 corresponds to mach/*.defs as of Utah's UK22 release.
@@ -51,6 +53,7 @@ sparc64-.*-linux.*	ld=ld-linux.so.2
 sparc.*-.*-linux.*	ld=ld-linux.so.2
 alpha.*-.*-linux.*	ld=ld-linux.so.2
 arm.*-.*-linux.*	ld=ld-linux.so.2
+ia64-.*-linux.*		ld=ld-linux.so.2	GLIBC_2.2
 # We use the ELF ABI standard name for the default.
 .*-.*-.*		ld=ld.so.1