diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-10 14:09:10 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-17 15:56:54 -0300 |
commit | 5729e0e9af590807df66a3db688008f9547bce9f (patch) | |
tree | b4f50ff2f122c75e0833ec18c7256afa2c4c1ab7 /iconvdata/utf-16.c | |
parent | 62d4c768a4df59e4381464385b3a7246e6df6661 (diff) | |
download | glibc-5729e0e9af590807df66a3db688008f9547bce9f.tar glibc-5729e0e9af590807df66a3db688008f9547bce9f.tar.gz glibc-5729e0e9af590807df66a3db688008f9547bce9f.tar.bz2 glibc-5729e0e9af590807df66a3db688008f9547bce9f.zip |
iconv: Remove _STRING_ARCH_unaligned usage for get/set macros
And use a packed structure instead. The compiler generates optimized
unaligned code if the architecture supports it.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'iconvdata/utf-16.c')
-rw-r--r-- | iconvdata/utf-16.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iconvdata/utf-16.c b/iconvdata/utf-16.c index ad7dfa1a5c..edd1816c9d 100644 --- a/iconvdata/utf-16.c +++ b/iconvdata/utf-16.c @@ -55,10 +55,10 @@ return (inptr == inend \ ? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT); \ \ - if (get16u (inptr) == BOM) \ + if (get16 (inptr) == BOM) \ /* Simply ignore the BOM character. */ \ *inptrp = inptr += 2; \ - else if (get16u (inptr) == BOM_OE) \ + else if (get16 (inptr) == BOM_OE) \ { \ data->__flags |= __GCONV_SWAP; \ *inptrp = inptr += 2; \ @@ -70,7 +70,7 @@ if (__glibc_unlikely (outbuf + 2 > outend)) \ return __GCONV_FULL_OUTPUT; \ \ - put16u (outbuf, BOM); \ + put16 (outbuf, BOM); \ outbuf += 2; \ } \ } \ |