about summary refs log tree commit diff
path: root/iconv/loop.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* iconv: Remove _STRING_ARCH_unaligned usageAdhemerval Zanella2023-02-171-42/+24
| | | | | | | | | | Use put/get macros __builtin_bswap32 instead. It allows to remove the unaligned routines, the compiler will generate unaligned access if the ABI allows it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
* iconv: Remove _STRING_ARCH_unaligned usage for get/set macrosAdhemerval Zanella2023-02-171-73/+0
| | | | | | | | | 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>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Avoid -Wstringop-overflow= warning in iconv module.Stefan Liebler2022-06-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On s390x when compiling with GCC 12, I get this warning: utf8-utf16-z9.c: ../iconv/loop.c: In function ‘__from_utf8_loop_etf3eh_single’: ../iconv/loop.c:445:22: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 445 | bytebuf[inlen++] = *inptr++; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../iconv/loop.c:381:17: note: at offset 4 into destination object ‘bytebuf’ of size 4 381 | unsigned char bytebuf[MAX_NEEDED_INPUT]; | ^~~~~~~ ../iconv/loop.c:445:22: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 445 | bytebuf[inlen++] = *inptr++; | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../iconv/loop.c:381:17: note: at offset 5 into destination object ‘bytebuf’ of size 4 381 | unsigned char bytebuf[MAX_NEEDED_INPUT]; | ^~~~~~~ This patch tells the compiler that inend is always behind inptr which avoids the warning. Note that the SINGLE function is only used to implement the mb*towc*() or wc*tomb*() functions. Those functions use inptr and inend pointing to a variable on stack, compute the inend pointer or explicitly check the arguments which always leads to inptr < inend. Special notes for backporters (according to Siddhesh Poyarekar): If someone wants to backport this patch to release branches, they should also backport the following wcrtomb change. Otherwise the assumptions assumed by this patch are not true. commit 9bcd12d223a8990254b65e2dada54faa5d2742f3 Author: Siddhesh Poyarekar <siddhesh@sourceware.org> Date: Fri May 13 19:10:15 2022 +0530 wcrtomb: Make behavior POSIX compliant Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Remove "Contributed by" linesSiddhesh Poyarekar2021-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix iconv build with GCC mainlineJoseph Myers2021-08-231-0/+6
| | | | | | | | | | | | | | | Current GCC mainline produces -Wstringop-overflow errors building some iconv converters, as discussed at <https://gcc.gnu.org/pipermail/gcc/2021-July/236943.html>. Add an __builtin_unreachable call as suggested so that GCC can see the case that would involve a buffer overflow is unreachable; because the unreachability depends on valid conversion state being passed into the function from previous conversion steps, it's not something the compiler can reasonably deduce on its own. Tested with build-many-glibcs.py that, together with <https://sourceware.org/pipermail/libc-alpha/2021-August/130244.html>, it restores the glibc build for powerpc-linux-gnu.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Fix stringop-overflow errors from gcc 10 in iconv.Stefan Liebler2020-07-071-6/+8
| | | | | | | On s390x, I've recognize various -Werror=stringop-overflow messages in iconv/loop.c and iconv/skeleton.c if build with gcc10 -O3. With this commit gcc knows the size and do not raise those errors anymore.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* iconv: Remove public declaration of __gconv_transliterateFlorian Weimer2019-05-151-1/+1
| | | | | | | | | | Commit ba7b4d294b01870ce3497971e9d07ee261cdc540 ("Complete the removal of __gconv_translit_find") added a declaration of the GLIBC_PRIVATE function, __gconv_transliterate, to the installed header <gconv.h>. It should have been added to the internal <gconv_int.h> header. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Fix s390 -Os iconv build.Joseph Myers2018-03-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building glibc for s390 with -Os (32-bit only, with GCC 7) fails with: In file included from ../sysdeps/s390/multiarch/8bit-generic.c:370:0, from ebcdic-at-de.c:28: ../iconv/loop.c: In function '__to_generic_vx': ../iconv/loop.c:264:22: error: 'ch' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (((Character) >> 7) == (0xe0000 >> 7)) \ ^~ In file included from ebcdic-at-de.c:28:0: ../sysdeps/s390/multiarch/8bit-generic.c:340:15: note: 'ch' was declared here uint32_t ch; \ ^ ../iconv/loop.c:325:7: note: in expansion of macro 'BODY' BODY ^~~~ It's fairly easy to see, looking at the (long) expansion of the BODY macro, that this is a false positive and the relevant variable 'ch' is always initialized before use, in one of two possible places. As such, disabling the warning for -Os with the DIAG_* macros is the natural approach to fix this build failure. However, because of the location at which the warning is reported, the disabling needs to go in iconv/loop.c, around the definition of UNICODE_TAG_HANDLER (not inside the definition), as that macro definition is where the uninitialized use is reported, whereas the code that needs to be reasoned about to see that the warning is a false positive is in the definition of BODY elsewhere. Thus, the patch adds such disabling in iconv/loop.c, with a comment pointing to the s390-specific code and a comment in the s390-specific code pointing to the generic file to alert people to the possible need to update one place when changing the other. It would be possible if desired to use #ifdef __s390__ around the disabling, though in general we try to avoid that sort of thing in generic files. (Or some extremely specialized macros for "disable -Wmaybe-uninitialized in this particular place" could be specified, defined to 0 in a lot of different files that include iconv/loop.c and to 1 in that particular s390 file.) Tested that this fixed -Os compilation for s390-linux-gnu with build-many-glibcs.py. * iconv/loop.c (UNICODE_TAG_HANDLER): Disable -Wmaybe-uninitialized for -Os. * sysdeps/s390/multiarch/8bit-generic.c (BODY): Add comment about this disabling.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Narrowing the visibility of libc-internal.h even further.Zack Weinberg2017-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | posix/wordexp-test.c used libc-internal.h for PTR_ALIGN_DOWN; similar to what was done with libc-diag.h, I have split the definitions of cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN to a new header, libc-pointer-arith.h. It then occurred to me that the remaining declarations in libc-internal.h are mostly to do with early initialization, and probably most of the files including it, even in the core code, don't need it anymore. Indeed, only 19 files actually need what remains of libc-internal.h. 23 others need libc-diag.h instead, and 12 need libc-pointer-arith.h instead. No file needs more than one of them, and 16 don't need any of them! So, with this patch, libc-internal.h stops including libc-diag.h as well as losing the pointer arithmetic macros, and all including files are adjusted. * include/libc-pointer-arith.h: New file. Define cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN here. * include/libc-internal.h: Definitions of above macros moved from here. Don't include libc-diag.h anymore either. * posix/wordexp-test.c: Include stdint.h and libc-pointer-arith.h. Don't include libc-internal.h. * debug/pcprofile.c, elf/dl-tunables.c, elf/soinit.c, io/openat.c * io/openat64.c, misc/ptrace.c, nptl/pthread_clock_gettime.c * nptl/pthread_clock_settime.c, nptl/pthread_cond_common.c * string/strcoll_l.c, sysdeps/nacl/brk.c * sysdeps/unix/clock_settime.c * sysdeps/unix/sysv/linux/i386/get_clockfreq.c * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Don't include libc-internal.h. * elf/get-dynamic-info.h, iconv/loop.c * iconvdata/iso-2022-cn-ext.c, locale/weight.h, locale/weightwc.h * misc/reboot.c, nis/nis_table.c, nptl_db/thread_dbP.h * nscd/connections.c, resolv/res_send.c, soft-fp/fmadf4.c * soft-fp/fmasf4.c, soft-fp/fmatf4.c, stdio-common/vfscanf.c * sysdeps/ieee754/dbl-64/e_lgamma_r.c * sysdeps/ieee754/dbl-64/k_rem_pio2.c * sysdeps/ieee754/flt-32/e_lgammaf_r.c * sysdeps/ieee754/flt-32/k_rem_pio2f.c * sysdeps/ieee754/ldbl-128/k_tanl.c * sysdeps/ieee754/ldbl-128ibm/k_tanl.c * sysdeps/ieee754/ldbl-96/e_lgammal_r.c * sysdeps/ieee754/ldbl-96/k_tanl.c, sysdeps/nptl/futex-internal.h: Include libc-diag.h instead of libc-internal.h. * elf/dl-load.c, elf/dl-reloc.c, locale/programs/locarchive.c * nptl/nptl-init.c, string/strcspn.c, string/strspn.c * malloc/malloc.c, sysdeps/i386/nptl/tls.h * sysdeps/nacl/dl-map-segments.h, sysdeps/x86_64/atomic-machine.h * sysdeps/unix/sysv/linux/spawni.c * sysdeps/x86_64/nptl/tls.h: Include libc-pointer-arith.h instead of libc-internal.h. * elf/get-dynamic-info.h, sysdeps/nacl/dl-map-segments.h * sysdeps/x86_64/atomic-machine.h: Add multiple include guard.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* iconv: Suppress array out of bounds warning.Andreas Krebbel2015-01-271-1/+7
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Complete the removal of __gconv_translit_findFlorian Weimer2014-09-121-10/+4
| | | | | | | | | Prior to the 2.20 release, the function was just changed to fail unconditionally, in commit a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8. This commit removes the function completely, including gconv bits which depend on it. This changes the gconv ABI, which is not a public interface.
* iconv/loop.c: Fix -Wundef warning with !_STRING_ARCH_unalignedWill Newton2014-07-171-30/+29
| | | | | | | | | | | | | | | | | | If code is required to handle the unaligned case then loop.c includes itself and relies on the #undefs at the end of the file to avoid outputting two copies of LOOPFCT and gconv_btowc. However MAX_NEEDED_INPUT is tested with #if so this causes a warning. Reorder the code so that the function definitions are in an #else block to make the behaviour clearer and fix the warning. Verified that code is unchanged on x86_64 and arm. ChangeLog: 2014-07-17 Will Newton <will.newton@linaro.org> * iconv/loop.c: Move definition of LOOPFCT and gconv_btowc into an #else block.
* Define _STRING_ARCH_unaligned unconditionallyAdhemerval Zanella2014-04-091-2/+2
| | | | | | | This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h header to avoid undefined compiler warnings on platforms that do not define it. It also make adjustments in code where tests checked if macro existed or not.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-2/+2
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Fix typos.Ondřej Bílka2013-08-301-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Remove pre-ISO C supportUlrich Drepper2012-01-071-14/+14
| | | | No more __const.
* Fix assertion in gconv's loop.cUlrich Drepper2012-01-031-2/+3
|
* Optimize conversion of single character in gconvUlrich Drepper2011-05-141-1/+2
|
* Fix handling of incomplete character storage in stateUlrich Drepper2011-05-141-1/+4
| | | | | | If iconv is called more than once in a row for adding bytes to the sequence while still remain under the minimum size of a character and if STORE_REST is defined, we didn't consume any input. Fix that.
* 008-01-08 Jakub Jelinek <jakub@redhat.com>Ulrich Drepper2008-01-091-3/+18
| | | | | | | | | | | | | | | | | | | | | | | * iconv/loop.c (UPDATE_PARAMS): Define to empty statement if not defined. (REINIT_PARAMS): Likewise. Undefine before end of file. (STANDARD_TO_LOOP_ERR_HANDLER): Use UPDATE_PARAMS before calling transliteration hooks and REINIT_PARAMS afterwards. * iconvdata/iso-2022-jp.c (BODY): Use a separate variable for status. (REINIT_PARAMS): Define. * iconvdata/ibm1364.c (REINIT_PARAMS): Likewise. * iconvdata/ibm930.c (REINIT_PARAMS): Likewise. * iconvdata/ibm933.c (REINIT_PARAMS): Likewise. * iconvdata/ibm935.c (REINIT_PARAMS): Likewise. * iconvdata/ibm937.c (REINIT_PARAMS): Likewise. * iconvdata/ibm939.c (REINIT_PARAMS): Likewise. * iconvdata/iso-2022-cn.c (REINIT_PARAMS): Likewise. * iconvdata/iso-2022-cn-ext.c (REINIT_PARAMS): Likewise. * iconvdata/iso-2022-jp-3.c (REINIT_PARAMS): Likewise. * iconvdata/iso-2022-kr.c (REINIT_PARAMS): Likewise. * iconvdata/Makefile: Add rules to build and run tst-iconv7.c. * iconvdata/tst-iconv7.c: New test.
* [BZ #5277]Ulrich Drepper2007-11-081-1/+6
| | | | | | | | | 2007-11-07 Ulrich Drepper <drepper@redhat.com> [BZ #5277] * iconv/loop.c (STANDARD_TO_LOOP_ERR_HANDLER): If conversion failed because output buffer is too small break, don't loop. * iconvdata/Makefile (tests): Add bug-iconv6. * iconvdata/bug-iconv6.c: New file.
* [!STORE_REST] (SINGLE): Correctly record number of left-over bytes and store ↵Ulrich Drepper2005-09-251-1/+5
| | | | them correctly.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-5/+1
|
* 2.5-18.1Jakub Jelinek2007-07-121-1/+5
|
* Update.Ulrich Drepper2003-06-111-0/+2
| | | | | | | 2003-06-11 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (queue_stack): Always inline. * ptreadhP.h (__do_cancel): Likewise.
* Update.Ulrich Drepper2003-01-161-1/+6
| | | | * iconv/loop.c: Use CLEAR_STATE if defined to clear __state element.
* Update.Ulrich Drepper2002-12-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-30 Bruno Haible <bruno@clisp.org> * iconv/gconv.h (__gconv_btowc_fct): New typedef. (struct __gconv_step): New field __btowc_fct. * wcsmbs/btowc.c (__btowc): Use the __btowc_fct shortcut if possible. * iconv/gconv_int.h (__BUILTIN_TRANSFORM): Renamed from __BUILTIN_TRANS. (__gconv_btwoc_ascii): New declaration. * iconv/gconv_simple.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument. (__gconv_btwoc_ascii): New function. * iconv/gconv_builtin.h: Add BtowcFct argument to all BUILTIN_TRANSFORMATION invocations. * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument. * iconv/iconvconfig.c (BUILTIN_TRANSFORMATION): Likewise. * iconv/gconv_builtin.c (map): New field btowc_fct. (BUILTIN_TRANSFORMATION): Add BtowcFct argument. Use it to initialize btowc_fct field. (__gconv_get_builtin_trans): Initialize __btowc_fct field. * iconv/gconv_cache.c (find_module): Initialize __btowc_fct field. * iconv/gconv_db.c (gen_steps, increment_counter): Likewise. * wcsmbs/wcsmbsload.c (to_wc, to_mb): Likewise. * iconv/skeleton.c: Document STORE_REST and FROM_ONEBYTE. (gconv_init): Initialize __btowc_fct field. Undefine EXTRA_LOOP_ARGS and FROM_ONEBYTE at the end. * iconv/loop.c: Document ONEBYTE_BODY. (gconv_btowc, FROM_ONEBYTE): Define if ONEBYTE_BODY is defined. Undefine ONEBYTE_BODY at the end. * iconvdata/8bit-generic.c (ONEBYTE_BODY): New macro. * iconvdata/8bit-gap.c (NONNUL): New macro. (BODY for FROM_LOOP): Use it. (ONEBYTE_BODY): New macro. * iconvdata/isiri-3342.c (HAS_HOLES): Set to 1. (NONNUL): New macro. * iconvdata/ansi_x3.110.c (ONEBYTE_BODY): New macro. * iconvdata/armscii-8.c (ONEBYTE_BODY): New macro. * iconvdata/cp1255.c (ONEBYTE_BODY): New macro. * iconvdata/cp1258.c (ONEBYTE_BODY): New macro. * iconvdata/tcvn5712-1.c (ONEBYTE_BODY): New macro. * iconvdata/big5.c (ONEBYTE_BODY): New macro. * iconvdata/big5hkscs.c (ONEBYTE_BODY): New macro. * iconvdata/euc-cn.c (ONEBYTE_BODY): New macro. * iconvdata/euc-jp.c (ONEBYTE_BODY): New macro. * iconvdata/euc-jisx0213.c (ONEBYTE_BODY): New macro. * iconvdata/euc-kr.c (ONEBYTE_BODY): New macro. * iconvdata/euc-tw.c (ONEBYTE_BODY): New macro. * iconvdata/gbk.c (ONEBYTE_BODY): New macro. * iconvdata/gb18030.c (ONEBYTE_BODY): New macro. * iconvdata/ibm932.c: Include <stdbool.h>. (TRUE, FALSE): Remove macros. (BODY for FROM_LOOP): Remove unused variable rp1. (ONEBYTE_BODY): New macro. (BODY for TO_LOOP): Use bool. * iconvdata/ibm932.h (__ibm932sb_to_ucs4_idx): Remove array. * iconvdata/ibm943.c: Include <stdbool.h>. (TRUE, FALSE): Remove macros. (BODY for FROM_LOOP): Remove unused variable rp1. (ONEBYTE_BODY): New macro. (BODY for TO_LOOP): Use bool. * iconvdata/ibm943.h (__ibm943sb_to_ucs4_idx): Remove array. * iconvdata/iso8859-1.c (ONEBYTE_BODY): New macro. * iconvdata/iso_6937-2.c (ONEBYTE_BODY): New macro. * iconvdata/iso_6937.c (ONEBYTE_BODY): New macro. * iconvdata/johab.c (ONEBYTE_BODY): New macro. * iconvdata/sjis.c (ONEBYTE_BODY): New macro. * iconvdata/shift_jisx0213.c (ONEBYTE_BODY): New macro. * iconvdata/t.61.c (ONEBYTE_BODY): New macro. * iconvdata/uhc.c (ONEBYTE_BODY): New macro. * iconvdata/gbbig5.c: Tweak comment.
* Update.Ulrich Drepper2002-11-201-8/+8
| | | | | | | | | | | | | | * iconv/gconv_simple.c (internal_ucs4le_loop_unaligned): Return __GCONV_EMPTY_INPUT only if input is really empty. Otherwise __GCONV_INCOMPLETE_INPUT. (ucs4le_internal_loop): Likewise. (ucs4le_internal_loop_unaligned): Likewise. * iconvdata/unicode.c (PREPARE_LOOP): Likewise. * iconvdata/utf-16.c (PREPARE_LOOP): Likewise. * iconvdata/utf-32.c (PREPARE_LOOP): Likewise. * iconv/loop.c (LOOPFCT): First test for empty input then for full output buffer.
* Update.Ulrich Drepper2002-06-281-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-26 Bruno Haible <bruno@clisp.org> * iconv/loop.c (STANDARD_FROM_LOOP_ERR_HANDLER): New macro. (STANDARD_TO_LOOP_ERR_HANDLER): Renamed from STANDARD_ERR_HANDLER. All callers changed. * iconv/gconv_simple.c (ascii_internal_loop): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (utf8_internal_loop): Likewise. (ucs2_internal_loop): Likewise. (internal_ucs2_loop): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. * iconvdata/unicode.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/utf-16.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/utf-32.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/big5.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/8bit-gap.c (BODY for FROM_LOOP): Likewise. * iconvdata/8bit-generic.c (BODY for FROM_LOOP): Likewise. * iconvdata/ansi_x3.110.c (BODY for FROM_LOOP): Likewise. * iconvdata/armscii-8.c (BODY for FROM_LOOP): Likewise. * iconvdata/cp1255.c (BODY for FROM_LOOP): Likewise. * iconvdata/cp1258.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-cn.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-jisx0213.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-tw.c (BODY for FROM_LOOP): Likewise. * iconvdata/big5hkscs.c (BODY for FROM_LOOP): Likewise. * iconvdata/gb18030.c (BODY for FROM_LOOP): Likewise. * iconvdata/gbk.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-cn.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-jp-3.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso646.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso_6937-2.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso_6937.c (BODY for FROM_LOOP): Likewise. * iconvdata/johab.c (BODY for FROM_LOOP): Likewise. * iconvdata/shift_jisx0213.c (BODY for FROM_LOOP): Likewise. * iconvdata/sjis.c (BODY for FROM_LOOP): Likewise. * iconvdata/t.61.c (BODY for FROM_LOOP): Likewise. * iconvdata/uhc.c (BODY for FROM_LOOP): Likewise. * iconvdata/utf-7.c (BODY for FROM_LOOP): Likewise. * iconvdata/gbbig5.c (BODY for FROM_LOOP): Likewise. When ignoring an error, still set result = __GCONV_ILLEGAL_INPUT. (BODY for TO_LOOP): Likewise. * iconvdata/ibm930.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm932.c: Include <dlfcn.h> and <stdint.h>. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm933.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm935.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm937.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm939.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm943.c: Include <dlfcn.h> and <stdint.h>. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/gbgbk.c (BODY for FROM_LOOP): Update. * iconvdata/iso8859-1.c (BODY for TO_LOOP): Update. * iconvdata/tcvn5712-1.c (BODY for TO_LOOP): Update. 2002-06-28 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h (elf_machine_load_address): Use local labels in assembler instructions.
* Update.Ulrich Drepper2002-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-21 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c: Define `inline' as a macro into nothing for the compilers which lack the keyword. * posix/regex.h: (RE_SYNTAX_GNU_AWK): Remove RE_CONTEXT_INVALID_OPS for the compatibility of gawk. * posix/regcomp.c: Add fake implementation of isblank() for the environments which lack the function. Don't use free_charset() in case of non-i18n envs. (build_range_exp): Don't use i18n related code in case of non-i18n envs. (build_collating_symbol): Likewise. (build_equiv_class): Likewise. (build_charclass): Likewise. (re_compile_fastmap_iter): Likewise. (parse_bracket_exp): Likewise. (build_word_op): Likewise. (regfree): Don't use free_charset() in case of non-i18n envs. * posix/regex_internal.h: Remove COMPLEX_BRACKET from re_token_type_t in case of non-i18n envs. Don't define re_charset_t in case of non-i18n envs. Change the type of wcs of re_string_t from wchar_t to wint_t, since we store also WEOF. * posix/regex_internal.c: (re_string_realloc_buffers): Change the type of wcs of re_string_t from wchar_t to wint_t. (re_string_reconstruct): Likewise. (create_ci_newstate): Don't use i18n related code in case of non-i18n envs. (create_cd_newstate): Likewise. 2002-05-24 Ulrich Drepper <drepper@redhat.com> * iconv/loop.c: Fix typo. 2002-05-23 Jakub Jelinek <jakub@redhat.com> * inet/ether_line.c (ether_line): Fix a typo causing only lower 4 bits of each ethernet address byte being assigned. Don't modify what line points to. * inet/tst-ether_aton.c (main): Add ether_line tests. 2002-05-23 Marcus Brinkmann <marcus@gnu.org> * manual/filesys.texi: Don't make readlink example leak memory when readlink fails.
* Update.Ulrich Drepper2002-05-211-3/+7
| | | | | | | 2002-05-20 Ulrich Drepper <drepper@redhat.com> * iconv/loop.c: Fix condition for defining unaligned loop. Add some more security checks.
* (put16) [!_STRING_ARCH_unaligned && BIG_ENDIAN]: Fix index.Andreas Schwab2001-07-151-1/+1
|
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* (UNICODE_TAG_HANDLER): New macro.Ulrich Drepper2001-06-061-1/+16
|
* (get16): Add const to cast. (get32): Likewise.Ulrich Drepper2000-11-271-2/+2
|
* Update.Ulrich Drepper2000-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-20 Ulrich Drepper <drepper@redhat.com> * csu/gmon-start.c: Always have prototype for __gmon_start. * csu/version.c: Add prototypes for __libc_print_version and __libc_main. * iconv/gconv.c: Include gconv_int.h and gconv.h. * iconv/gconv.h (struct __gconv_step): Remove const from __from_name and __to_name. * iconv/gconv_builtin.h: Add ASCII module definitions. * iconv/gconv_conf.c (__gconv_path_elem): Remove const. (add_module): Add cast to avoid warning. Rework construction of strings for new module. * iconv/gconv_db.c (__gconv_alias_compare): Make s1 and s2 const. (derivation_compare): Likewise. * iconv/gconv_dl.c (do_release_shlib): Remove const from nodep. (__gconv_release_shlib): Cast do_release_shlib as parameter for twalk. * iconv/gconv_int.h (__gconv_path_elem): Remove const. (struct gconv_alias): Remove const from fromname and toname. * iconv/gconv_simple.c: Include gconv_builtin.h to get prototypes for loop functions. (internal_ucs4_loop): Use correct const-ness. (ucs4_internal_loop): Likewise. (internal_ucs4le_loop): Likewise. (ucs4le_internal_loop_single): Likewise. * iconv/gconv_trans.c (__gconv_transliterate): Make from_idx, from_tbl, to_idx, to_tbl, winbuf, winbufend const. Change casts in assignments appropriately. (struct known_trans): Remove const from fname. (trans_compare): Make s1 and s2 const. * iconv/loop.c (LOOPFC): Make outend parameter const. Add cast to avoid warning. * iconv/skeleton.c: Remove cast in calls of loop functions. * iconvdata/gconv-modules: Remove US-ASCII definitions. * iconvdata/iso646.c: Remove US_ASCII support. * include/set-hooks.h (DEFINE_HOOK): Also generate prototype. * include/unistd.h: Add __libc_check_standard_fds prototype. * string/bits/string2.h (__mempcpy_args): Add const to casts. * sysdeps/generic/initfini.c: Add prototypes for dummy, _init, and _fini. * sysdeps/generic/libc-start.c: Add prototype for __libc_start_main. * sysdeps/i386/i486/bits/string.h (strcmp): Add const to casts. * sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Add cast to avoid warning. * sysdeps/unix/sysv/linux/init-first.c: Add prototypes for __libc_init_first and _dl_start. * sysdeps/unix/sysv/linux/mips/clone.S: Fix comments.