diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-03-31 03:43:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-03-31 03:43:13 +0000 |
commit | cb2c55018f80a0a063afd989f2f53cccac4a43a5 (patch) | |
tree | e2817a7fb73db134de102fad133af1bb1df4f0d0 /iconv | |
parent | 9a95cd1c9c76a693a8a702942f8ebab6cd37df69 (diff) | |
download | glibc-cb2c55018f80a0a063afd989f2f53cccac4a43a5.tar.gz glibc-cb2c55018f80a0a063afd989f2f53cccac4a43a5.tar.xz glibc-cb2c55018f80a0a063afd989f2f53cccac4a43a5.zip |
(put16): Remove __const. Fix access index. (put32): Remove __const. Use uint32_t instead of uint16_t.
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/loop.c | 46 | ||||
-rw-r--r-- | iconv/skeleton.c | 36 |
2 files changed, 41 insertions, 41 deletions
diff --git a/iconv/loop.c b/iconv/loop.c index 9af06bccdc..7ddeb3da49 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -82,20 +82,20 @@ | ((__const unsigned char *) (addr))[1]) << 8 \ | ((__const unsigned char *) (addr))[0]) -# define put16(addr, val) \ +# define put16(addr, val) \ ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[0] = __val; \ - ((__const unsigned char *) (addr))[1] = __val >> 8; \ + ((unsigned char *) (addr))[0] = __val; \ + ((unsigned char *) (addr))[1] = __val >> 8; \ (void) 0; }) -# define put32(addr, val) \ - ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[0] = __val; \ +# define put32(addr, val) \ + ({ uint32_t __val = (val); \ + ((unsigned char *) (addr))[0] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[1] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[2] = __val; \ + ((unsigned char *) (addr))[2] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[3] = __val; \ + ((unsigned char *) (addr))[3] = __val; \ (void) 0; }) # else # define get16(addr) \ @@ -107,20 +107,20 @@ | ((__const unsigned char *) (addr))[2]) << 8 \ | ((__const unsigned char *) (addr))[3]) -# define put16(addr, val) \ +# define put16(addr, val) \ ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[1] = __val; \ - ((__const unsigned char *) (addr))[2] = __val >> 8; \ + ((unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[2] = __val >> 8; \ (void) 0; }) -# define put32(addr, val) \ - ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[3] = __val; \ +# define put32(addr, val) \ + ({ uint32_t __val = (val); \ + ((unsigned char *) (addr))[3] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[2] = __val; \ + ((unsigned char *) (addr))[2] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[1] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[0] = __val; \ + ((unsigned char *) (addr))[0] = __val; \ (void) 0; }) # endif @@ -261,6 +261,11 @@ FCTNAME (LOOPFCT) (const unsigned char **inptrp, const unsigned char *inend, } +#undef get16 +#undef get32 +#undef put16 +#undef put32 + /* Include the file a second time to define the function to define the function to handle unaligned access. */ #if !defined _STRING_ARCH_unaligned && !defined DEFINE_UNALIGNED @@ -282,8 +287,3 @@ FCTNAME (LOOPFCT) (const unsigned char **inptrp, const unsigned char *inend, #undef EXTRA_LOOP_DECLS #undef INIT_PARAMS #undef UPDATE_PARAMS - -#undef get16 -#undef get32 -#undef put16 -#undef put32 diff --git a/iconv/skeleton.c b/iconv/skeleton.c index ad381ec77c..dfd067e05a 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -140,20 +140,20 @@ static int to_object; | ((__const unsigned char *) (addr))[1]) << 8 \ | ((__const unsigned char *) (addr))[0]) -# define put16(addr, val) \ +# define put16(addr, val) \ ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[0] = __val; \ - ((__const unsigned char *) (addr))[1] = __val >> 8; \ + ((unsigned char *) (addr))[0] = __val; \ + ((unsigned char *) (addr))[1] = __val >> 8; \ (void) 0; }) -# define put32(addr, val) \ - ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[0] = __val; \ +# define put32(addr, val) \ + ({ uint32_t __val = (val); \ + ((unsigned char *) (addr))[0] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[1] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[2] = __val; \ + ((unsigned char *) (addr))[2] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[3] = __val; \ + ((unsigned char *) (addr))[3] = __val; \ (void) 0; }) # else # define get16(addr) \ @@ -165,20 +165,20 @@ static int to_object; | ((__const unsigned char *) (addr))[2]) << 8 \ | ((__const unsigned char *) (addr))[3]) -# define put16(addr, val) \ +# define put16(addr, val) \ ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[1] = __val; \ - ((__const unsigned char *) (addr))[2] = __val >> 8; \ + ((unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[2] = __val >> 8; \ (void) 0; }) -# define put32(addr, val) \ - ({ uint16_t __val = (val); \ - ((__const unsigned char *) (addr))[3] = __val; \ +# define put32(addr, val) \ + ({ uint32_t __val = (val); \ + ((unsigned char *) (addr))[3] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[2] = __val; \ + ((unsigned char *) (addr))[2] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[1] = __val; \ + ((unsigned char *) (addr))[1] = __val; \ __val >>= 8; \ - ((__const unsigned char *) (addr))[0] = __val; \ + ((unsigned char *) (addr))[0] = __val; \ (void) 0; }) # endif #endif |