summaryrefslogtreecommitdiff
path: root/lib/mbrtowc.c
Commit message (Collapse)AuthorAgeFilesLines
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* mbrtowc: work around glibc bug#19932Paul Eggert2016-04-091-27/+27
| | | | | | | | | | | | | | | | | | | | | | | Fix mbrtowc so that it never returns -1 in the C locale, as this conflicts with a future version of POSIX http://austingroupbugs.net/view.php?id=663#c2738 and causes problems with GNU grep: http://bugs.gnu.org/23234 See glibc bug 19932: https://sourceware.org/bugzilla/show_bug.cgi?id=19932 * doc/posix-functions/mbrlen.texi (mbrlen): * doc/posix-functions/mbrtowc.texi (mbrtowc): Document the glibc bug. * lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]: Include hard-locale.h, locale.h. (rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug, if the bug is possible. * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro. (gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed. * modules/hard-locale (License): Now LGPLv2+, for mbrtowc. * modules/mbrtowc (Depends-on): Add hard-locale. * modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh. * tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'. * tests/test-mbrtowc5.sh: New file.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* mbrlen, mbrtowc: fix bug with empty inputPaul Eggert2014-05-161-1/+6
| | | | | | | | | * lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_EMPTY_INPUT_BUG]: Fix the bug. * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): New macro. It's not used, so this is mainly for documentation. * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): New macro. (gl_FUNC_MBRTOWC): Use it. * tests/test-mbrtowc.c (main): Test for the bug.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* streq: Rename macro.Bruno Haible2012-02-241-8/+14
| | | | | | | | | * lib/streq.h (STREQ_OPT): Renamed from STREQ. * NEWS: Mention the change. * lib/mbrtowc.c (mbrtowc): Update. * lib/uniwidth/cjk.h (is_cjk_encoding): Update. * lib/wcwidth.c (wcwidth): Update. Suggested by Akim Demaille and Jim Meyering.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: change "can not" to "cannot"Jim Meyering2011-04-091-1/+1
| | | | | | | | | But do not change the occurrences in maintain.texi or in build-aux/po/Makefile.in.in, which I presume comes from gettext. * doc/gnulib-tool.texi: s/can not/cannot/ * doc/posix-functions/accept.texi (accept): Likewise. * doc/posix-functions/socket.texi (socket): Likewise. * lib/mbrtowc.c: Likewise.
* mbrtowc: Tiny optimization.Bruno Haible2011-02-211-3/+4
| | | | * lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* mbrtowc: Work around a Solaris 7 bug.Bruno Haible2010-12-271-2/+11
| | | | | | | | | | | | * m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1): New macro. (gl_MBRTOWC_NULL_ARG2): Renamed from gl_MBRTOWC_NULL_ARG. (gl_FUNC_MBRTOWC): Update. Define MBRTOWC_NULL_ARG2_BUG instead of MBRTOWC_NULL_ARG_BUG. Invoke gl_MBRTOWC_NULL_ARG1 and define MBRTOWC_NULL_ARG1_BUG. * lib/mbrtowc.c (rpl_mbrtowc): Use MBRTOWC_NULL_ARG2_BUG instead of MBRTOWC_NULL_ARG_BUG. Handle MBRTOWC_NULL_ARG1_BUG. * tests/test-mbrtowc.c (main): Test support of a NULL first argument. * doc/posix-functions/mbrtowc.texi: Mention the Solaris 7 bug.
* Port to uClibc.Bruno Haible2010-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/relocatable.c (find_shared_library_fullname): Treat uClibc like glibc. * lib/strerror_r.c: Likewise. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. * m4/glibc21.m4 (gl_GLIBC21): Likewise. * tests/test-sigaction.c (handler, main): Likewise. * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL): Treat uClibc like a non-glibc platform. * lib/propername.c (proper_name_utf8): Likewise. * lib/spawn.in.h: Likewise. * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise. * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1, mem_cd_iconveh_internal): Likewise. * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise. * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk, strstr, strcasestr): Likewise. * lib/unicodeio.c (unicode_to_mb): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/glibc2.m4 (gt_GLIBC2): Likewise. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise. * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR): Likewise. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H): Likewise. * tests/test-getopt.h (OPTIND_MIN): Likewise. * tests/test-striconveha.c (main): Likewise. * doc/posix-functions/getdelim.texi: Mention an uClibc bug. * doc/posix-functions/getline.texi: Likewise. Reported by Mike Frysinger <vapier@gentoo.org>.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-236/+236
|
* Fix comment.Bruno Haible2009-02-251-1/+1
|
* Add support for the GB18030 encoding.Bruno Haible2009-01-251-4/+41
|
* Work around mbrtowc bugs on AIX, HP-UX, OSF/1, Solaris.Bruno Haible2008-12-211-7/+82
|
* Verify an assumption.Bruno Haible2008-12-191-0/+3
|
* New module 'mbrtowc'.Bruno Haible2008-12-191-0/+271