about summary refs log tree commit diff
path: root/iconv/loop.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-16 07:21:24 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-16 07:21:24 +0000
commit41f112ad228d4cd587712b747472a3a9f7e20e5a (patch)
tree6aa35ba2205129873989df4aef484c8b2504205e /iconv/loop.c
parentea31b613feba1c5f34ff2cf9f2c0bab3be4f8d2a (diff)
downloadglibc-41f112ad228d4cd587712b747472a3a9f7e20e5a.tar.gz
glibc-41f112ad228d4cd587712b747472a3a9f7e20e5a.tar.xz
glibc-41f112ad228d4cd587712b747472a3a9f7e20e5a.zip
Update.
	* iconv/loop.c: Use CLEAR_STATE if defined to clear __state element.
Diffstat (limited to 'iconv/loop.c')
-rw-r--r--iconv/loop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/iconv/loop.c b/iconv/loop.c
index b0b76f32e8..d792f4a8a2 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -1,5 +1,5 @@
 /* Conversion loop frame work.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -428,7 +428,11 @@ SINGLE(LOOPFCT) (struct __gconv_step *step,
       result = __GCONV_OK;
 
       /* Clear the state buffer.  */
+#ifdef CLEAR_STATE
+      CLEAR_STATE;
+#else
       state->__count &= ~7;
+#endif
     }
   else if (result == __GCONV_INCOMPLETE_INPUT)
     {
@@ -479,6 +483,7 @@ gconv_btowc (struct __gconv_step *step, unsigned char c)
 #undef UPDATE_PARAMS
 #undef ONEBYTE_BODY
 #undef UNPACK_BYTES
+#undef CLEAR_STATE
 #undef LOOP_NEED_STATE
 #undef LOOP_NEED_FLAGS
 #undef LOOP_NEED_DATA