yann@1: Fixes yann@1: yann@1: In file included from jis0208.c:23: yann@1: jis0208.h:32: error: array type has incomplete element type yann@1: when building with gcc-4.0 yann@1: yann@1: In file included from cp1258.c:869: yann@1: ../iconv/skeleton.c: In function 'gconv': yann@1: ../iconv/skeleton.c:323: error: invalid lvalue in increment yann@1: yann@1: In file included from cp1255.c:550: yann@1: ../iconv/skeleton.c: In function 'gconv': yann@1: ../iconv/skeleton.c:323: error: invalid lvalue in increment yann@1: yann@1: In file included from gb18030.c:22114: yann@1: ../iconv/loop.c: In function 'from_gb18030': yann@1: ../iconv/loop.c:282: error: invalid lvalue in increment yann@1: ../iconv/loop.c: In function 'from_gb18030_single': yann@1: ../iconv/loop.c:384: error: invalid lvalue in increment yann@1: yann@1: In file included from iso8859-1.c:43: yann@1: ../iconv/loop.c: In function 'from_iso8859_1': yann@1: ../iconv/loop.c:311: error: invalid lvalue in increment yann@1: yann@1: Rediffed, updated for glibc-2.3.3, added: yann@1: yann@1: In file included from armscii-8.c:85: yann@1: ../iconv/loop.c: In function 'from_armscii_8': yann@1: ../iconv/loop.c:311: error: invalid lvalue in increment yann@1: ../iconv/loop.c:311: error: invalid lvalue in increment yann@1: yann@1: --- glibc-2.3.3.orig/iconvdata/armscii-8.c Mon Dec 2 14:07:52 2002 yann@1: +++ glibc-2.3.3/iconvdata/armscii-8.c Thu Mar 17 16:01:23 2005 yann@1: @@ -57,11 +57,17 @@ yann@1: uint_fast8_t ch = *inptr; \ yann@1: \ yann@1: if (ch <= 0xa0) \ yann@1: - /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \ yann@1: - *((uint32_t *) outptr)++ = ch; \ yann@1: + { \ yann@1: + /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \ yann@1: + *((uint32_t *) outptr) = ch; \ yann@1: + outptr += sizeof (uint32_t); \ yann@1: + } \ yann@1: else if (ch >= 0xa2 && ch <= 0xfe) \ yann@1: - /* Use the table. */ \ yann@1: - *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2]; \ yann@1: + { \ yann@1: + /* Use the table. */ \ yann@1: + *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2]; \ yann@1: + outptr += sizeof (uint32_t); \ yann@1: + } \ yann@1: else \ yann@1: { \ yann@1: /* This is an illegal character. */ \ yann@1: diff -ur glibc-2.3.3.orig/iconvdata/cp1255.c glibc-2.3.3/iconvdata/cp1255.c yann@1: --- glibc-2.3.3.orig/iconvdata/cp1255.c Mon Dec 2 14:07:52 2002 yann@1: +++ glibc-2.3.3/iconvdata/cp1255.c Thu Mar 17 08:20:13 2005 yann@1: @@ -69,7 +69,8 @@ yann@1: if (__builtin_expect (outbuf + 4 <= outend, 1)) \ yann@1: { \ yann@1: /* Write out the last character. */ \ yann@1: - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \ yann@1: + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \ yann@1: + outbuf += sizeof (uint32_t); \ yann@1: data->__statep->__count = 0; \ yann@1: } \ yann@1: else \ yann@1: diff -ur glibc-2.3.3.orig/iconvdata/cp1258.c glibc-2.3.3/iconvdata/cp1258.c yann@1: --- glibc-2.3.3.orig/iconvdata/cp1258.c Mon Dec 2 14:07:52 2002 yann@1: +++ glibc-2.3.3/iconvdata/cp1258.c Thu Mar 17 08:20:13 2005 yann@1: @@ -70,7 +70,8 @@ yann@1: if (__builtin_expect (outbuf + 4 <= outend, 1)) \ yann@1: { \ yann@1: /* Write out the last character. */ \ yann@1: - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \ yann@1: + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \ yann@1: + outbuf += sizeof (uint32_t); \ yann@1: data->__statep->__count = 0; \ yann@1: } \ yann@1: else \ yann@1: diff -ur glibc-2.3.3.orig/iconvdata/gb18030.c glibc-2.3.3/iconvdata/gb18030.c yann@1: --- glibc-2.3.3.orig/iconvdata/gb18030.c Mon Dec 2 14:07:54 2002 yann@1: +++ glibc-2.3.3/iconvdata/gb18030.c Thu Mar 17 08:20:13 2005 yann@1: @@ -25769,7 +25769,8 @@ yann@1: } \ yann@1: } \ yann@1: \ yann@1: - *((uint32_t *) outptr)++ = ch; \ yann@1: + *((uint32_t *) outptr) = ch; \ yann@1: + outptr += sizeof (uint32_t); \ yann@1: } yann@1: #define LOOP_NEED_FLAGS yann@1: #define ONEBYTE_BODY \ yann@1: diff -ur glibc-2.3.3.orig/iconvdata/iso8859-1.c glibc-2.3.3/iconvdata/iso8859-1.c yann@1: --- glibc-2.3.3.orig/iconvdata/iso8859-1.c Mon Dec 2 14:07:56 2002 yann@1: +++ glibc-2.3.3/iconvdata/iso8859-1.c Thu Mar 17 08:20:47 2005 yann@1: @@ -35,7 +35,8 @@ yann@1: #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO yann@1: #define LOOPFCT FROM_LOOP yann@1: #define BODY \ yann@1: - *((uint32_t *) outptr)++ = *inptr++; yann@1: + *((uint32_t *) outptr) = *inptr++; \ yann@1: + outptr += sizeof (uint32_t); yann@1: #define ONEBYTE_BODY \ yann@1: { \ yann@1: return c; \ yann@1: diff -ur glibc-2.3.3.orig/iconvdata/jis0208.h glibc-2.3.3/iconvdata/jis0208.h yann@1: --- glibc-2.3.3.orig/iconvdata/jis0208.h Wed Jun 11 14:40:42 2003 yann@1: +++ glibc-2.3.3/iconvdata/jis0208.h Thu Mar 17 08:20:13 2005 yann@1: @@ -24,15 +24,6 @@ yann@1: #include yann@1: #include yann@1: yann@1: -/* Conversion table. */ yann@1: -extern const uint16_t __jis0208_to_ucs[]; yann@1: - yann@1: -extern const char __jisx0208_from_ucs4_lat1[256][2]; yann@1: -extern const char __jisx0208_from_ucs4_greek[0xc1][2]; yann@1: -extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[]; yann@1: -extern const char __jisx0208_from_ucs_tab[][2]; yann@1: - yann@1: - yann@1: /* Struct for table with indeces in UCS mapping table. */ yann@1: struct jisx0208_ucs_idx yann@1: { yann@1: @@ -40,6 +31,15 @@ yann@1: uint16_t end; yann@1: uint16_t idx; yann@1: }; yann@1: + yann@1: + yann@1: +/* Conversion table. */ yann@1: +extern const uint16_t __jis0208_to_ucs[]; yann@1: + yann@1: +extern const char __jisx0208_from_ucs4_lat1[256][2]; yann@1: +extern const char __jisx0208_from_ucs4_greek[0xc1][2]; yann@1: +extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[]; yann@1: +extern const char __jisx0208_from_ucs_tab[][2]; yann@1: yann@1: yann@1: static inline uint32_t