| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* doc/posix-functions/towlower.texi: Mention NetBSD bug 57339.
* doc/posix-functions/towupper.texi: Likewise.
|
|
|
|
|
|
| |
* doc/posix-functions/swprintf.texi: Add comment.
* m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Update cross-compilation
guess.
|
|
|
|
| |
* doc/posix-functions/open.texi: Mention a Haiku bug with symlinks.
|
|
|
|
|
|
|
|
| |
* m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists.
Consider it when testing whether login_tty is declared.
* lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include
<termios.h> instead.
* doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke
gl_SWPRINTF_DIRECTIVE_LA and define NEED_WPRINTF_DIRECTIVE_LA
accordingly.
* lib/vasnprintf.c: When compiling vasnwprintf, if
NEED_WPRINTF_DIRECTIVE_LA, handle the %La and %LA directives ourselves.
* doc/posix-functions/swprintf.texi: Mention the %La bug.
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/call_once.texi: Mention Haiku bug.
* doc/posix-functions/duplocale.texi: Likewise.
* doc/posix-functions/freelocale.texi: Likewise.
* doc/posix-functions/getlogin_r.texi: Likewise.
* doc/posix-functions/initstate.texi: Likewise.
* doc/posix-functions/mbrtoc32.texi: Likewise.
* doc/posix-functions/strxfrm.texi: Likewise.
* doc/posix-headers/math.texi: Update.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/uchar_h.m4 (gl_UCHAR_H, gl_TYPE_CHAR8_T, gl_TYPE_CHAR16_T,
gl_TYPE_CHAR32_T): Before including <uchar.h>, on Haiku, first include
<stdint.h>.
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
* m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_CHECK_FUNC_MBRTOC32,
gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE, gl_MBRTOC32_SANITYCHECK):
Likewise.
* lib/uchar.in.h: On Haiku, include <stdint.h> before the include_next.
* doc/posix-headers/uchar.texi: Mention the Haiku bug.
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (gl_MB_CUR_MAX): New function.
(MB_CUR_MAX, GNULIB_defined_MB_CUR_MAX): New macros.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether MB_CUR_MAX is correct.
(gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MB_CUR_MAX.
* modules/stdlib (Files): Add m4/locale-fr.m4.
(Makefile.am): Substitute REPLACE_MB_CUR_MAX.
* doc/posix-headers/stdlib.texi: Mention the Solaris 10 bug.
|
|
|
|
|
|
|
|
| |
* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment.
* m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment.
* tests/test-mbrtoc32.c: Add comment.
* tests/test-mbrtoc32-5.sh: Use symmetric coding style.
* doc/posix-functions/mbrtoc32.texi: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_C is set,
implement the 'c' directive here.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MBRTOWC_C_LOCALE.
If mbrtowc is buggy in the C locale, define NEED_WPRINTF_DIRECTIVE_C.
* modules/vasnwprintf (Files): Add m4/mbrtowc.m4.
* tests/test-vasnwprintf-posix.c (test_function): Add tests of %s and %c
in the C locale.
* doc/posix-functions/fwprintf.texi: Mention the C locale behaviour bug.
* doc/posix-functions/swprintf.texi: Likewise.
* doc/posix-functions/vfwprintf.texi: Likewise.
* doc/posix-functions/vswprintf.texi: Likewise.
* doc/posix-functions/vwprintf.texi: Likewise.
* doc/posix-functions/wprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (mbstowcs): New declaration.
* lib/mbstowcs.c: New file, based on lib/mbstoc32s.c.
* m4/mbstowcs.m4: New file.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared.
(gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS.
(gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS.
* modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS,
REPLACE_MBSTOWCS.
* modules/mbstowcs: New file.
* tests/test-stdlib-c++.cc (mbstowcs): Check signature.
* doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug
and the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
mbrtowc is buggy in the C locale, override also mbsnrtowcs.
* modules/mbsnrtowcs (Files): Add m4/mbrtowc.m4.
* tests/test-mbsnrtowcs.c (main): Add a test of the C locale, based on
tests/test-mbsrtowcs.c.
* tests/test-mbsnrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
* modules/mbsnrtowcs-tests (Files): Add it.
(Makefile.am): Test it.
* doc/posix-functions/mbsnrtowcs.texi: Mention the C locale behaviour
bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
mbrtowc is buggy in the C locale, override also mbsrtowcs.
* modules/mbsrtowcs (Files): Add m4/mbrtowc.m4.
* tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on
tests/test-mbrtowc.c.
* tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
* modules/mbsrtowcs-tests (Files): Add it.
(Makefile.am): Test it.
* doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour
bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-mbrlen1.sh: New file, based on tests/test-mbrtowc1.sh.
* tests/test-mbrlen2.sh: New file, based on tests/test-mbrtowc2.sh.
* tests/test-mbrlen3.sh: New file, based on tests/test-mbrtowc3.sh.
* tests/test-mbrlen4.sh: New file, based on tests/test-mbrtowc4.sh.
* tests/test-mbrlen5.sh: New file, based on tests/test-mbrtowc5.sh.
* tests/test-mbrlen.c: New file, based on tests/test-mbrtowc.c.
* tests/test-mbrlen-w32-1.sh: New file, based on
tests/test-mbrtowc-w32-1.sh.
* tests/test-mbrlen-w32-2.sh: New file, based on
tests/test-mbrtowc-w32-2.sh.
* tests/test-mbrlen-w32-3.sh: New file, based on
tests/test-mbrtowc-w32-3.sh.
* tests/test-mbrlen-w32-4.sh: New file, based on
tests/test-mbrtowc-w32-4.sh.
* tests/test-mbrlen-w32-5.sh: New file, based on
tests/test-mbrtowc-w32-5.sh.
* tests/test-mbrlen-w32-6.sh: New file, based on
tests/test-mbrtowc-w32-6.sh.
* tests/test-mbrlen-w32-7.sh: New file, based on
tests/test-mbrtowc-w32-7.sh.
* tests/test-mbrlen-w32.c: New file, based on tests/test-mbrtowc-w32.c.
* modules/mbrlen-tests: New file, based on modules/mbrtowc-tests.
* doc/posix-functions/mbrlen.texi: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/btowc.c: Include <string.h>
(btowc): Use mbrtowc instead of mbtowc when possible.
* m4/btowc.m4 (gl_FUNC_BTOWC): Test for the mingw bug in the C locale.
Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale,
override also btowc.
(gl_PREREQ_BTOWC): Test whether mbrtowc exists.
* modules/btowc (Files): Add m4/mbrtowc.m4.
(Depends-on): Add mbrtowc.
* tests/test-btowc.c (main): Add a test of the C locale, based on
tests/test-mbrtowc.c.
* tests/test-btowc3.sh: New file, based on tests/test-mbrtowc5.sh.
* modules/btowc-tests (Files): Add it.
(Makefile.am): Test it.
* doc/posix-functions/btowc.texi: Mention the two C locale behaviour
bugs and that they are worked around.
|
|
|
|
|
|
| |
* tests/test-mbrtowc.c: Add comment.
* tests/test-mbrtowc5.sh: Use symmetric coding style.
* doc/posix-functions/mbrtowc.texi: Update.
|
|
|
|
|
| |
* doc/string-desc.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.
|
|
|
|
|
| |
* doc/posix-functions/memset_explicit.texi: Define a section, not a
subsection.
|
|
|
|
|
|
| |
* doc/glibc-functions/memmem.texi: Update platforms list.
* doc/posix-functions/strstr.texi: Likewise.
* doc/glibc-functions/strcasestr.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/wchar.in.h (wcsstr): Consider REPLACE_WCSSTR.
* lib/wcs-two-way.h: New file, based on lib/str-two-way.h.
* lib/wcsstr-impl.h: If requested, use the two-way algorithm. New code
based on lib/strstr.c.
* m4/wcsstr.m4 (gl_FUNC_WCSSTR_SIMPLE): Renamed from gl_FUNC_WCSSTR.
(gl_FUNC_WCSSTR): New macro, based on gl_FUNC_STRSTR in m4/strstr.m4.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSSTR.
* modules/wchar (Makefile.am): Substitute REPLACE_WCSSTR.
* modules/wcsstr-simple: New file, based on modules/wcsstr.
* modules/wcsstr (Description): Document that this module now provides
an efficient implementation.
(Files): Add lib/wcs-two-way.h.
(Depends-on): Depend on wcsstr-simple and the dependencies of the
two-way implementation.
(configure.ac): Use AC_LIBOBJ instead of a conditional. Don't invoke
gl_WCHAR_MODULE_INDICATOR.
(Makefile.am): Don't augment lib_SOURCES.
* tests/test-wcsstr.c: New file, based on tests/test-strstr.c.
* modules/wcsstr-tests: New file, based on modules/strstr-tests.
* doc/posix-functions/wcsstr.texi: Mention the worst-case complexity.
Mention the new 'wcsstr-simple' module.
* doc/posix-functions/strstr.texi: Fix typo.
|
|
|
|
| |
* doc/posix-headers/stdlib.texi: Document issue and workaround.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/threads.in.h (call_once): Declare as part of module 'call_once',
not module 'mtx'.
* lib/call_once.c: New file, extracted from lib/mtx.c.
* lib/mtx.c (call_once): Remove function.
* m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize
GNULIB_CALL_ONCE.
* modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE.
* modules/call_once: New file, based on modules/mtx.
* modules/threads (Depends-on): Add call_once.
* tests/test-threads-c++.cc: Update accordingly.
* modules/call_once-tests: New file, based on modules/mtx-tests.
* modules/mtx-tests (Files): Remove tests/test-call_once.c.
(Makefile.am): Don't compile test-call_once.
* doc/posix-functions/call_once.texi: Document that the relevant module
is now 'call_once'.
* NEWS: Mention the change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/printf-args.h: Include <stdint.h>.
(arg_type): Add TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
(argument): Add the union members a_[u]int8_t, ..., a_[u]int_fast64_t
and a_count_int8_t_pointer, ..., a_count_int_fast64_t_pointer.
* lib/printf-args.c: Include <limits.h>.
(PRINTF_FETCHARGS): Handle TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
* lib/printf-parse.c (PRINTF_PARSE): Accept only one size specifier, not
a sequence of size specifiers. Accept "wN" and "wfN", where N = 8, 16,
32, 64.
* lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Handle the new TYPE_*
values as well.
* m4/printf.m4 (gl_PRINTF_SIZES_C23): New macro.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Require
gl_PRINTF_SIZES_C23. Test gl_cv_func_printf_sizes_c23.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Likewise.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Add tests for size
specifiers with %d, %u, %b, %o, %x.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* modules/vasnprintf (Depends-on): Add limits-h.
* modules/vasnwprintf (Depends-on): Add limits-h.
* modules/c-vasnprintf (Depends-on): Add limits-h, stdint.
* modules/unistdio/u-printf-args (Depends-on): Add stdint, limits-h.
* doc/posix-functions/dprintf.texi: Mention the ISO C 23 size
specifiers.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/fwprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/swprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vfwprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/posix-functions/vswprintf.texi: Likewise.
* doc/posix-functions/vwprintf.texi: Likewise.
* doc/posix-functions/wprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): New
macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX.
(gl_FUNC_OBSTACK_PRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/obstack-printf-gnu.m4: New file, based on
m4/obstack-printf-posix.m4.
* modules/obstack-printf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/glibc-functions/obstack_printf.texi: Mention the new module.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_DPRINTF_POSIX.
(gl_FUNC_DPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/dprintf-gnu.m4: New file, based on m4/dprintf-posix.m4.
* modules/dprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/dprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VDPRINTF_POSIX.
(gl_FUNC_VDPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vdprintf-gnu.m4: New file, based on m4/vdprintf-posix.m4.
* modules/vdprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vdprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf-posix.m4: Renamed from m4/printf-posix-rpl.m4.
(gl_FUNC_PRINTF_IS_POSIX): New macro.
(gl_FUNC_PRINTF_POSIX): Require it. Don't require
gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
and gl_REPLACE_VASNPRINTF.
* m4/printf-gnu.m4: New file, based on m4/fprintf-posix.m4.
* modules/printf-posix (Files): Update.
* modules/printf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/printf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vprintf-posix.m4 (gl_FUNC_VPRINTF_IS_POSIX): New macro.
(gl_FUNC_VPRINTF_POSIX): Require it. Don't require
gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
and gl_REPLACE_VASNPRINTF.
* m4/vprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
* modules/vprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_FPRINTF_POSIX.
(gl_FUNC_FPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/fprintf-gnu.m4: New file, based on m4/fprintf-posix.m4.
* modules/fprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/fprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VFPRINTF_POSIX.
(gl_FUNC_VFPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vfprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
* modules/vfprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vfprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VASPRINTF_POSIX.
(gl_FUNC_VASPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4.
* modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/glibc-functions/vasprintf.texi: Mention the new module.
* doc/glibc-functions/asprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_SPRINTF_POSIX.
(gl_FUNC_SPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/sprintf-gnu.m4: New file, based on m4/sprintf-posix.m4.
* modules/sprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/sprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VSPRINTF_POSIX.
(gl_FUNC_VSPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vsprintf-gnu.m4: New file, based on m4/vsprintf-posix.m4.
* modules/vsprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vsprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_SNPRINTF_POSIX.
(gl_FUNC_SNPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/snprintf-gnu.m4: New file, based on m4/snprintf-posix.m4.
* modules/snprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/snprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VSNPRINTF_POSIX.
(gl_FUNC_VSNPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vsnprintf-gnu.m4: New file, based on m4/vsnprintf-posix.m4.
* modules/vsnprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vsnprintf.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
HAVE_WORKING_SWPRINTF accordingly.
* lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
HAVE_WORKING_SWPRINTF.
(VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
function.
* doc/posix-functions/swprintf.texi: Document the null wide character
bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/vasnprintf.c (local_wctomb): Define also for
NEED_PRINTF_DIRECTIVE_LC.
(VASNPRINTF): Implement %lc handling ourselves if
NEED_PRINTF_DIRECTIVE_LC.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LC): New macro.
(gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
gl_PRINTF_DIRECTIVE_LC and test its result. Invoke
gl_PREREQ_VASNPRINTF_DIRECTIVE_LC.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
* tests/test-snprintf-posix.h (test_function): Add more tests for the
%c and %lc directives.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/glibc-functions/asprintf.texi: Mention the %lc 0 bug.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
* doc/glibc-functions/vasprintf.texi: Likewise.
* doc/posix-functions/dprintf.texi: Likewise.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC.
* lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION,
- force pad_ourselves to be 1,
- don't use %n.
Fix zero-padding when the result starts with a prefix "0x" or "0b".
* modules/vasnwprintf (Files): Add musl.m4.
* doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive.
* lib/printf-parse.h: Update comment.
* lib/wprintf-parse.h: Likewise.
* lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the
'b' directive.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro.
(gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
* m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke
gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
gl_PRINTF_DIRECTIVE_B and test its result. Invoke
gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
* tests/test-snprintf-posix.h (test_function): Add some tests of the %b
directive.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/glibc-functions/asprintf.texi: Mention the 'b' directive.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
* doc/glibc-functions/vasprintf.texi: Likewise.
* doc/posix-functions/dprintf.texi: Likewise.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/fwprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/swprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vfwprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/posix-functions/vswprintf.texi: Likewise.
* doc/posix-functions/vwprintf.texi: Likewise.
* doc/posix-functions/wprintf.texi: Likewise.
|
|
|
|
|
| |
* m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on AIX.
* doc/posix-functions/time.texi: Mention the bug on AIX.
|
|
|
|
|
|
|
| |
* m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on native
Windows.
* modules/time (Depends-on): Add gettimeofday.
* doc/posix-functions/time.texi: Mention the bug on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/strtol.c (INTERNAL (strtol)): Treat 'b' and base 2 like 'x' and
base 16. Based on glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
by Joseph Myers.
* m4/strtol.m4 (gl_FUNC_STRTOL): Test also whether parsing binary
integers works. Update cross-compilation guesses.
* m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
* m4/strtoul.m4 (gl_FUNC_STRTOUL): Likewise.
* m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise.
* tests/test-strtol.c (main): Add tests of parsing binary integers.
* tests/test-strtoll.c (main): Likewise.
* tests/test-strtoul.c (main): Likewise.
* tests/test-strtoull.c (main): Likewise.
* doc/posix-functions/strtol.texi: Mention the problem with parsing
binary integers.
* doc/posix-functions/strtoll.texi: Likewise.
* doc/posix-functions/strtoul.texi: Likewise.
* doc/posix-functions/strtoull.texi: Likewise.
|
|
|
|
|
|
| |
* doc/posix-functions/timegm.texi: Renamed from doc/glibc-functions/timegm.texi.
* doc/gnulib.texi (Function Substitutes): Include timegm.texi here...
(Glibc time.h): ... not here.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already
defined.
* lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New
macros.
(abort): Declare if needed for unreachable.
* m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable.
* tests/test-stddef.c (test_unreachable_optimization,
test_unreachable_noreturn): New functions, based on tests/test-verify.c.
* doc/posix-headers/stddef.texi: Mention unreachable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (time): New declaration.
* lib/time.c: New file.
* m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME.
(gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME.
* m4/time.m4: New file.
* modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME.
* modules/time: New file.
* tests/test-time-h-c++.cc: Check the signature of
GNULIB_NAMESPACE::time.
* doc/posix-functions/time.texi: Mention the glibc problem and the
'time' module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modules/time-h: Renamed from modules/time.
* tests/test-time-h.c: Renamed from tests/test-time.c.
* modules/time-h-tests: Renamed from modules/time-tests. Update.
* tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
* tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
* modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
* modules/cond (Depends-on): Update.
* modules/ctime (Depends-on): Likewise.
* modules/localtime (Depends-on): Likewise.
* modules/mktime (Depends-on): Likewise.
* modules/nanosleep (Depends-on): Likewise.
* modules/parse-datetime (Depends-on): Likewise.
* modules/posixcheck (Depends-on): Likewise.
* modules/pthread-h (Depends-on): Likewise.
* modules/stat-time (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/strftime-fixes (Depends-on): Likewise.
* modules/strptime (Depends-on): Likewise.
* modules/sys_stat (Depends-on): Likewise.
* modules/tempname (Depends-on): Likewise.
* modules/threads-h (Depends-on): Likewise.
* modules/time_r (Depends-on): Likewise.
* modules/time_rz (Depends-on): Likewise.
* modules/timegm (Depends-on): Likewise.
* modules/timespec (Depends-on): Likewise.
* modules/timespec_get (Depends-on): Likewise.
* modules/timespec_getres (Depends-on): Likewise.
* modules/tzset (Depends-on): Likewise.
* modules/usleep-tests (Depends-on): Likewise.
* modules/utime (Depends-on): Likewise.
* modules/utimecmp (Depends-on): Likewise.
* modules/utimens (Depends-on): Likewise.
* modules/windows-cond (Depends-on): Likewise.
* modules/windows-timedmutex (Depends-on): Likewise.
* modules/windows-timedrecmutex (Depends-on): Likewise.
* modules/windows-timedrwlock (Depends-on): Likewise.
* modules/xnanosleep (Depends-on): Likewise.
* doc/posix-headers/time.texi: Update.
* NEWS: Mention the change.
|
|
|
|
|
|
|
|
| |
* lib/stdio.in.h (_POSIX_C_SOURCE, _GL_DEFINED__POSIX_C_SOURCE):
Suppress deprecation warnings for sprintf and vsprintf
that were introduced in macOS 13. These are not useful
for Gnulib itself, and are more likely than not to be
merely an annoyance for Gnulib-using code.
|
|
|
|
| |
* doc/glibc-functions/timespec_getres.texi: Remove file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp
caused by a serious data corruption bug in FreeBSD and macOS.
* doc/posix-functions/lseek.texi: Mention the bug.
* lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and
FreeBSD < 14. FreeBSD fixed the bug sometime during FreeBSD 13
<https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is
conservative. It’s unknown when Apple will fix macOS so use
macOS "9999" as a placeholder.
* m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the
above platforms.
|
|
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2023-02/msg00098.html
* doc/gnulib.texi (nullptr): Document limitations better.
* m4/nullptr.m4 (gl_NULLPTR): Check for incompatibility of macOS
clang 14.0.0 (clang-1400.0.29.202), where <stddef.h> defines a
non-working nullptr macro.
|