summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* fprintf-gnu: New module.Bruno Haible2023-03-241-4/+11
| | | | | | | | | | * 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.
* vfprintf-gnu: New module.Bruno Haible2023-03-241-4/+11
| | | | | | | | | | * 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.
* vasprintf-gnu: New module.Bruno Haible2023-03-242-6/+20
| | | | | | | | | | | * 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.
* sprintf-gnu: New module.Bruno Haible2023-03-241-2/+9
| | | | | | | | | | * 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.
* vsprintf-gnu: New module.Bruno Haible2023-03-241-2/+9
| | | | | | | | | | * 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.
* snprintf-gnu: New module.Bruno Haible2023-03-241-3/+10
| | | | | | | | | | * 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.
* vsnprintf-gnu: New module.Bruno Haible2023-03-241-3/+10
| | | | | | | | | | * 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.
* vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.Bruno Haible2023-03-221-0/+7
| | | | | | | | | | | | | * 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.
* *printf-posix: Work around bug with %lc of 0 on many platforms.Bruno Haible2023-03-2114-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* vasnwprintf: Fix test failures on musl libc.Bruno Haible2023-03-201-0/+10
| | | | | | | | | | * 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.
* *printf-posix: ISO C 23: Add %b directive for binary output of integers.Bruno Haible2023-03-1720-24/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* time: Fix test failure on AIX 7.2.Bruno Haible2023-03-171-4/+4
| | | | | * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on AIX. * doc/posix-functions/time.texi: Mention the bug on AIX.
* time: Fix test failure on native Windows.Bruno Haible2023-03-171-4/+5
| | | | | | | * 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.
* strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant.Bruno Haible2023-03-164-0/+12
| | | | | | | | | | | | | | | | | | | | * 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.
* timegm: Document under ISO C and POSIX substitutes.Bruno Haible2023-03-162-3/+3
| | | | | | * 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.
* stddef: Define 'unreachable', for ISO C 23 compliance.Bruno Haible2023-03-161-0/+4
| | | | | | | | | | | | * 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.
* time: New module.Bruno Haible2023-03-081-1/+9
| | | | | | | | | | | | | | * 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.
* time-h: Renamed from time.Bruno Haible2023-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* stdio: suppress macOS 13 sprintf warningsPaul Eggert2023-03-052-6/+6
| | | | | | | | * 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.
* Remove unused documentation file.Bruno Haible2023-03-051-16/+0
| | | | * doc/glibc-functions/timespec_getres.texi: Remove file.
* lseek: avoid SEEK_HOLE bugs in FreeBSD, macOSPaul Eggert2023-02-231-0/+5
| | | | | | | | | | | | | 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.
* nullptr: work around Apple clang 14 issuePaul Eggert2023-02-091-3/+4
| | | | | | | | | 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.
* limits-h: Work around a clang 15 bug.Bruno Haible2023-02-091-0/+3
| | | | | * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX. * doc/posix-headers/limits.texi: Mention the clang bug.
* nullptr: rename from c-nullptrPaul Eggert2023-02-071-5/+6
| | | | | | | | | | * NEWS, doc/gnulib.texi: Mention this. * m4/nullptr.m4: Rename from m4/c-nullptr.m4. (gl_NULLPTR): Rename from gl_C_NULLPTR. * modules/nullptr: Rename from modules/nullptr. * modules/nullptr-c++-tests: Rename from modules/c-nullptr-c++-tests. * modules/nullptr-tests: Rename from modules/c-nullptr-tests. All uses changed.
* c-nullptr: new modulePaul Eggert2023-02-052-0/+48
| | | | | | * doc/gnulib.texi (nullptr): New section. * doc/posix-headers/stddef.texi: Document lack of nullptr_t. * m4/c-nullptr.m4, modules/c-nullptr: New files.
* doc: Update regarding AIX.Bruno Haible2023-02-041-1/+1
| | | | * doc/glibc-headers/getopt.texi: Update.
* doc: Update regarding NetBSD.Bruno Haible2023-02-042-2/+5
| | | | | * doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug. * doc/posix-functions/pthread_sigmask.texi: Likewise.
* doc: Update list of target platforms.Bruno Haible2023-01-221-21/+27
| | | | | | | * doc/gnulib-intro.texi (Supported Platforms): Mark musl libc, Android, and MSVC as "occasionally tested". Update the version numbers of some OSes. Combine paragraphs regarding mingw and MSVC. (Formerly Supported Platforms): Mark AIX 5, 6 as "formerly supported".
* login_tty: Ensure declaration in <utmp.h>.Bruno Haible2023-01-213-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/test-utmp-c++.cc: New file. * modules/utmp-c++-tests: New file. * tests/test-utmp.c: New file. * modules/utmp-tests: New file. * lib/login_tty.c: Include <utmp.h>. * m4/login_tty.m4: New file. (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY. * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4. * modules/login_tty (Files): Add m4/login_tty.m4. (Depends-on): Add utmp. Remove pty. Update condition. (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR instead of gl_PTY_MODULE_INDICATOR. (Include): List <utmp.h>. * doc/glibc-functions/login_tty.texi: Mark the include file diversity as fixed. * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty here. * lib/utmp.in.h: New file. * m4/utmp_h.m4: New file. * modules/utmp: New file. * doc/glibc-headers/utmp.texi: New file. * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
* autoupdateKarl Berry2023-01-214-445/+445
|
* fts: Document this module.Bruno Haible2023-01-196-24/+24
| | | | | | | | | * doc/glibc-headers/fts.texi: Mention the 'fts' module. * doc/glibc-functions/fts_children.texi: Likewise. * doc/glibc-functions/fts_close.texi: Likewise. * doc/glibc-functions/fts_open.texi: Likewise. * doc/glibc-functions/fts_read.texi: Likewise. * doc/glibc-functions/fts_set.texi: Likewise.
* mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.Bruno Haible2023-01-161-1/+7
| | | | | | | * tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing the "C" locale, verify that the encoding is UTF-8. * tests/test-mbrtoc32.c (main): Likewise. * doc/posix-functions/setlocale.texi: Mention the Android problems.
* alignasof: new modulePaul Eggert2023-01-152-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This splits off support for the C23 keywords alignas and alignof, from the now-deprecated stdalign module. The latter now merely provides C11 support. * MODULES.html.sh, NEWS, doc/gnulib.texi: * doc/posix-headers/stdalign.texi: Document the change. * lib/stdalign.in.h: Remove most of the definitions (which are now supplied by the alignasof module), leaving only __alignas_is_defined and __alignof_is_defined. * modules/alignasof, modules/alignasof-tests: New files. * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with most of the contents of the old gl_STDALIGN_H. Do not define __alignas_is_defined or __alignof_is_defined. (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work. * modules/alignalloc, modules/alignof, modules/argp: * modules/crypto/md4-buffer, modules/crypto/md5-buffer: * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer: * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer: * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/stddef-tests, modules/sys_socket: Depend on alignasof, not stdalign. * modules/stdalign: Deprecate. Depend on alignasof. * modules/stdalign-tests: Move most contents to the new module alignasof-tests, and depend on that.
* error: Work around an Android problem.Bruno Haible2023-01-122-1/+5
| | | | | | | | | | | | | | | | * lib/error.in.h: Renamed from lib/error.h. (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro. (error): Consider HAVE_ERROR and REPLACE_ERROR. (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE. * m4/error_h.m4: New file, partially based on m4/error.m4. * m4/error.m4 (gl_ERROR): Remove the test for error_at_line. * modules/error-h: New file. * modules/error (Files): Remove lib/error.h. (Depends-on): Add error-h. Update conditions. (configure.ac): Require gl_ERROR_H. Update condition. * doc/glibc-headers/error.texi: Mention the 'error-h' module. * doc/glibc-functions/error.texi: Mention the Android problem. * config/srclist.txt: Add comment regarding error.h.
* perror: Fix "perror clobbers strerror's buffer" problem on Android.Bruno Haible2023-01-111-1/+1
| | | | | * m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android. * doc/posix-functions/perror.texi: Mention the Android problem.
* getpass: Fix compilation error on Android.Bruno Haible2023-01-051-0/+4
| | | | | * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS. * doc/glibc-functions/getpass.texi: Mention the Android problem.
* Recognize functions added in future versions of Android.Bruno Haible2023-01-054-4/+4
| | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/freading.m4 (gl_FUNC_FREADING): Likewise. * m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise. * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise. * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise. * m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise. * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise. * m4/glob.m4 (gl_PREREQ_GLOB): Likewise. * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise. * doc/glibc-functions/getentropy.texi: Mark function as existing in Android 9.0. * doc/glibc-functions/getrandom.texi: Likewise. * doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise. * doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
* doc: Update regarding Android.Bruno Haible2023-01-047-4/+20
| | | | | | | | | | * doc/glibc-functions/getdtablesize.texi: Update Android information. * doc/glibc-functions/wait3.texi: Likewise. * doc/pastposix-functions/ftime.texi: Likewise. * doc/pastposix-functions/index.texi: Likewise. * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise. * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise. * doc/pastposix-functions/wcswcs.texi: Likewise.
* ffsl, ffsll: Fix compilation error on Android.Bruno Haible2023-01-032-2/+8
| | | | | | | | | * lib/string.in.h: On Android as well, include <strings.h>. * m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of AC_CHECK_FUNCS_ONCE. * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise. * doc/glibc-functions/ffsl.texi: Mention Android problems. * doc/glibc-functions/ffsll.texi: Likewise.
* ffs: Document Android problem.Bruno Haible2023-01-031-0/+3
| | | | | * doc/posix-functions/ffs.texi: Mention Android problem. * m4/ffs.m4: Update comment.
* stdio: Fix error in C++ mode on Android, due to putw.Bruno Haible2023-01-031-0/+3
| | | | | | | | | * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is not declared. * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared. (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW. * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW. * doc/glibc-functions/putw.texi: Update regarding Android.
* doc: Update regarding stable branches.Bruno Haible2023-01-011-1/+4
| | | | | * doc/gnulib-readme.texi (Stable Branches): Mention new branch stable-202301. Mention that stable-202201 is no longer updated.
* maint: run 'make update-copyright'Simon Josefsson2023-01-0133-33/+33
|
* Add --pull, --gen options to build-aux/bootstrapPaul Eggert2022-12-272-10/+26
| | | | | | | | | This supports a single bootstrap script with --pull and --gen options, as an alternative to separate autogen.sh and autopull.sh and bootstrap-funclib.sh auxiliary files. * top/bootstrap: With --version, also output library version. Support update of package that has only the bootstrap script, and not the other three files.
* stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)Bruno Haible2022-12-271-1/+1
| | | | | | * modules/stdnoreturn (Status): Remove. (Notice): Say that it is deprecated, not obsolete. * doc/noreturn.texi: Fix a typo.
* stdnoreturn: deprecatePaul Eggert2022-12-242-19/+18
| | | | | | | C23 says <stdnoreturn.h> is obsolescent, so deprecate the stdnoreturn module. I don't think it was being used anyway as it had too many problems. * modules/stdnoreturn: Mark as obsolete.
* doc: C2x → C23Paul Eggert2022-12-242-4/+4
|
* file-has-acl: improve recent NFSv4 supportPaul Eggert2022-12-231-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a link failure with emacsclient on GNU/Linux. This program wants file_has_acl but none of the other ACL primitives, so it doesn’t link acl-internal.o; this way it doesn’t need to link with -lacl. While I was at it I reviewed the recent changes, fixed some unlikely overflow bugs, and adjusted to GNU style. * doc/acl-nfsv4.txt: Remove. Its contents are now in a comment in lib/file-has-acl.c. * lib/acl-internal.c, lib/acl-internal.h: Move recent changes relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that there is no trouble linking programs that need only file_has_acl. * lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from lib/acl-internal.c, so that we needn't link -lacl in programs that want only file_has_acl, such as emacsclient. Do not assume a char buffer is aligned for uint32_t. Check more carefully for buffer read overrun. Allow up to 6 ACEs, since other code does; but check that they’re distinct. Avoid integer overflow. Use memcmp rather than strncmp to compare memory blocks. (file_has_acl): Preserve initial errno instead of setting to 0. Allocate a bit more room for trivial ACL buffer. Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
* file-has-acl: Basic support for checking NFSv4 ACLs in Linux.Ondrej Valousek2022-12-221-0/+17
| | | | | | | | | * lib/acl-internal.h (acl_nfs4_nontrivial): New declaration. * lib/acl-internal.c (acl_nfs4_nontrivial): New function. * lib/file-has-acl.c: Include <arpa/inet.h>. (XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros. (file_has_acl): Test for NFSv4 ACLs. * doc/acl-nfsv4.txt: New file.
* asctime, ctime: deprecatePaul Eggert2022-12-212-0/+7
| | | | | | | | C23 deprecates asctime and ctime, so deprecate them in Gnulib too. * NEWS, doc/posix-functions/asctime.texi: * doc/posix-functions/ctime.texi: Mention this. * lib/time.in.h (ctime): Deprecate any ctime replacement. * modules/ctime: Now obsolete.