summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2020-12-31813-813/+813
|
* memalign: Work around Solaris bug.Bruno Haible2020-12-311-0/+48
| | | | | | | | | | | * lib/memalign.c: New file. * m4/memalign.m4: New file. * modules/memalign (Files): Add them. (Depends-on): Add malloc-h. (configure.ac): Invoke gl_FUNC_MEMALIGN. Conditionally compile memalign.c. Set module indicator. (Include): Include <malloc.h> unconditionally. * doc/glibc-functions/memalign.texi: Mention the Solaris issues.
* malloc-h: New module.Bruno Haible2020-12-311-0/+47
| | | | | | | | * lib/malloc.in.h: New file. * m4/malloc_h.m4: New file. * modules/malloc-h: New file. * doc/glibc-headers/malloc.texi: New file. * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
* havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS.Bruno Haible2020-12-291-3/+6
| | | | | * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In acl_is_expected_elfclass, use 'expr', not 'test'.
* faccessat: revert recent EOVERFLOW changePaul Eggert2020-12-282-33/+4
| | | | | | | | | | | | | | | I misunderstood the glibc source code. Deduced from Adhemerval Zanella’s proposed glibc patch in: https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html * doc/posix-functions/faccessat.texi: It is not a problem. * lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c: (FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed. * lib/faccessat.c: Revert to simpler version now that LSTAT_FOLLOWS_SLASHED_SYMLINK must be false. * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): Remove. All uses removed. * modules/canonicalize, modules/canonicalize-lgpl (Files): Remove m4/faccessat.m4.
* regex: remove glibc21.m4Paul Eggert2020-12-272-36/+1
| | | | | | | It doesn’t seem to be needed any more; at least, I couldn’t reproduce the circa-2013 problem. Perhaps the recent --conditional-dependencies fixes have removed the need for it. * m4/glibc21.m4: Remove. All uses removed.
* execlp: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execlp.c: New file. * m4/execlp.m4: New file. * modules/execlp: New file. * doc/posix-functions/execlp.texi: Mention more Windows problems and the new module.
* execle: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execle.c: New file. * m4/execle.m4: New file. * modules/execle: New file. * doc/posix-functions/execle.texi: Mention more Windows problems and the new module.
* execl: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execl.c: New file. * m4/execl.m4: New file. * modules/execl: New file. * doc/posix-functions/execl.texi: Mention more Windows problems and the new module.
* execv: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execv.c: New file. * m4/execv.m4: New file. * modules/execv: New file. * doc/posix-functions/execv.texi: Mention more Windows problems and the new module.
* execvp: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execvp.c: New file. * m4/execvp.m4: New file. * modules/execvp: New file. * doc/posix-functions/execvp.texi: Mention more Windows problems and the new module.
* execvpe: New module.Bruno Haible2020-12-261-0/+24
| | | | | | | | * lib/execvpe.c: New file. * m4/execvpe.m4: New file. * modules/execvpe: New file. * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the new module.
* execve: New module.Bruno Haible2020-12-261-0/+15
| | | | | | | | * lib/execve.c: New file. * m4/execve.m4: New file. * modules/execve: New file. * doc/posix-functions/execve.texi: Mention more Windows problems and the new module.
* execve, execvpe, execvp, execv, execl, execle, execlp: Prepare modules.Bruno Haible2020-12-261-1/+17
| | | | | | | | | | | | | * lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp, execvpe): Add declarations for the new modules. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp, execv, execve, execvp, execvpe are declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE, REPLACE_EXEC*. * modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE, REPLACE_EXEC*. * tests/test-unistd-c++.cc: Check the signature of execl, execle, execlp, execv, execve, execvp, execvpe.
* Make it possible to turn off the mkdir override on Windows.Bruno Haible2020-12-251-1/+3
| | | | | | | | | | | * lib/sys_stat.in.h (mkdir): Conditionalize through GNULIB_MKDIR and GNULIB_MDA_MKDIR. Also support GNULIB_POSIXCHECK. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_MKDIR, GNULIB_MDA_MKDIR. * modules/sys_stat (Makefile.am): Substitute GNULIB_MKDIR, GNULIB_MDA_MKDIR. * modules/mkdir (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR. * doc/posix-functions/mkdir.texi: Mention also the 'sys_stat' module.
* Make it possible to turn off each of the Windows oldnames workarounds.Bruno Haible2020-12-2511-11/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/fcntl.in.h (creat, open): Conditionalize each of the Windows oldnames workarounds through a GNULIB_MDA_<func> symbol. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these GNULIB_MDA_<func> symbols. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise. * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise. * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise. * modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func> symbols. * modules/math (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/sys_stat (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/utime-h (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise.
* sh-filename: Add support for native Windows.Bruno Haible2020-12-241-2/+4
| | | | * m4/sh-filename.m4 (gl_SH_FILENAME): Treat native Windows like Cygwin.
* linkat: use eloop-thresholdPaul Eggert2020-12-241-2/+1
| | | | | | | | | | * lib/linkat.c: Include eloop-threshold.h. Do not include sys/param.h. (MAXSYMLINKS): Remove. (link_follow, linkat_follow): Use __eloop_threshold instead of MAXSYMLINKS. * m4/linkat.m4 (gl_FUNC_LINKAT): Omit sys/param.h check. * modules/linkat (Depends-on): Add eloop-threshold. Sort.
* canonicalize: prefer faccessat to statPaul Eggert2020-12-241-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A proper faccessat doesn't have the EOVERFLOW problem, and can be more efficient as it needn't gather data from the filesystem to fill in struct stat. So use stat only if faccessat is absent, or when checking for symlink loops in canonicalize.c. * lib/canonicalize-lgpl.c, lib/canonicalize.c: Include fcntl.h, for AT_EACCESS. (FACCESSAT_NEVER_EOVERFLOWS): Default to false. (file_accessible): New function, based on faccessat but with a fallback to stat and with an EOVERFLOW workaround. (dir_check): Use it. (dir_suffix): New static constant. * lib/canonicalize-lgpl.c (FACCESSAT_NEVER_EOVERFLOWS) [_LIBC]: Use __ASSUME_FACCESSAT2 to set FACCESSAT_NEVER_EOVERFLOWS (__faccessat) [!_LIBC]: Define. (realpath_stk): Use dir_suffix now. * lib/canonicalize.c (canonicalize_filename_mode_stk): If logical, don't check each component's existence; just check at the end, as that's enough. * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE) (gl_CANONICALIZE_LGPL_SEPARATE): Require gl_FUNC_FACCESSAT_EOVERFLOW, gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and check for faccessat. (gl_CANONICALIZE_LGPL_SEPARATE): Do not check for readlink, as the code does not use HAVE_READLINK. * modules/canonicalize, modules/canonicalize-lgpl (Files): Add m4/faccessat.m4, m4/lstat.m4. (Depends-on): Add fcntl-lh.
* faccessat: work around F_OK EOVERFLOW bugPaul Eggert2020-12-241-3/+30
| | | | | | | | | | | | | | Also, tune when LSTAT_FOLLOWS_SLASHED_SYMLINK. * doc/posix-functions/faccessat.texi: Mention the problem. * lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS) (LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0. (rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check for F_OK and EOVERFLOW, which means we can return 0. If LSTAT_FOLLOWS_SLASHED_SYMLINK, don't worry about file names ending in slashes, as faccessat should already do the right thing for them. * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro. (gl_FUNC_FACCESSAT): Use it.
* posix_spawn, posix_spawnp: Fix execution of scripts.Bruno Haible2020-12-241-25/+144
| | | | | | | | | * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): New macro. (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if posix_spawn or posix_spawnp allows unsecure execution of scripts. * doc/posix-functions/posix_spawn.texi: Document the script execution problem. * doc/posix-functions/posix_spawnp.texi: Likewise.
* Remove support for broken <wchar.h> in AIX 3.Bruno Haible2020-12-211-7/+3
| | | | * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify test programs.
* Remove support for broken <wchar.h> in BSD/OS and OSF/1.Bruno Haible2020-12-2129-509/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/wchar.in.h: Don't include <stdio.h>, <time.h>. * lib/mbchar.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * m4/stdint.m4 (gl_STDINT_INCLUDES): Likewise. * lib/mbfile.h: Don't include <time.h>. * lib/mbswidth.h: Update comment. * lib/stdint.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> before <wchar.h>. * lib/wctype.in.h: Likewise. * m4/btowc.m4 (gl_FUNC_BTOWC): Simplify test programs. * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Likewise. * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise. * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise. * m4/mbrlen.m4 (gl_FUNC_MBRLEN, gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL): Likewise. * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise. * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK, gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_NULL_ARG2, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL, gl_MBRTOWC_STORES_INCOMPLETE, AC_FUNC_MBRTOWC): Likewise. * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Likewise. * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE): Likewise. * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS, gl_MBSRTOWCS_WORKS): Likewise. * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise. * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H, gl_WCHAR_H_INLINE_OK): Likewise. * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Likewise. * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE): Likewise. * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS, gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL): Likewise. * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise. * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise. * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise. * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise. * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise. * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Likewise. * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise. * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise. * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise. * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
* isnanf: Fix autoconf test.Bruno Haible2020-12-211-2/+2
| | | | * m4/isnanf.m4 (gl_ISNANF_WORKS): Fix one of the NaN tests.
* Remove some of the support for obsolete IRIX 4 and 5.Bruno Haible2020-12-201-4/+4
| | | | | | * m4/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for getmntent in libsun. * tests/init.sh (setup_): Don't talk about IRIX 5.
* filemode: Remove Cray support.Bruno Haible2020-12-202-25/+1
| | | | | | | | * lib/filemode.c (IS_MIGRATED_FILE): Remove macro. (filemodestring): Don't produce an 'M' type. * m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE. * m4/st_dm_mode.m4: Remove file. * modules/filemode (Files): Remove it.
* free-posix: assume glibc 2.33 fixes this.Paul Eggert2020-12-201-18/+17
| | | | | * m4/free.m4 (gl_FUNC_FREE): Assume glibc 2.33+ is fixed. Use compile-time test rather than guessing for cross-builds.
* free-posix: Assume future POSIX compliance only on OpenBSD and Solaris.Bruno Haible2020-12-191-15/+25
| | | | | * m4/free.m4 (gl_FUNC_FREE): Guess yes only on OpenBSD and Solaris. Don't trust _POSIX_VERSION for this test.
* free-posix: port to GNU/LinuxPaul Eggert2020-12-191-17/+11
| | | | | | * m4/free.m4 (gl_FUNC_FREE): Don’t assume GNU hosts are free of the bug, as it occurs on Ubuntu 20.10 x86-64 and, I assume, on other GNU/Linux hosts.
* free-posix: New module, renamed from 'free'.Bruno Haible2020-12-191-2/+2
| | | | | | | | | | | | | | | * modules/free-posix: Renamed from modules/free. (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX, not GNULIB_FREE. * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not GNULIB_FREE. * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE. * doc/posix-functions/free.texi: Mention the module 'free-posix' and what it does. * NEWS: Mention that module 'free' no longer exists. * modules/canonicalize (Depends-on): Add free-posix. Remove free. * modules/canonicalize-lgpl (Depends-on): Likewise.
* free: Remove support for obsolete platforms.Bruno Haible2020-12-181-32/+3
| | | | | | | | * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works. Don't define CANNOT_FREE_NULL. * lib/free.c (rpl_free): Don't test CANNOT_FREE_NULL. * modules/free (Description): Update. * doc/posix-functions/free.texi: Don't mention SunOS 4 any more.
* free: Fix warning.Bruno Haible2020-12-182-8/+7
| | | | | | | | | | | | | | Reported by Pádraig Brady <P@draigBrady.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00148.html>. * lib/stdlib.in.h (free): New declaration. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether 'free' is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE, REPLACE_FREE. * modules/stdlib (Makefile.am): Substitute GNULIB_FREE, REPLACE_FREE. * m4/free.m4 (gl_FUNC_FREE): Set REPLACE_FREE, instead of defining 'free' as a macro here. * modules/free (Depends-on): Add stdlib. (configure.ac): Test REPLACE_FREE. Invoke gl_STDLIB_MODULE_INDICATOR.
* free: preserve errnoPaul Eggert2020-12-171-1/+34
| | | | | | | | | | * lib/free.c (rpl_free): Preserve errno. Check for null only if CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008 platforms that do not preserve errno. * m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno. Also, define CANNOT_FREE_NULL if free cannot free NULL. * modules/free (configure.ac): Also replace 'free' if it does not preserve errno.
* readlink, readlinkat: add ERANGE portabilityPaul Eggert2020-12-132-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some portability issues with Gnulib's readlink and readlinkat, notably mostly working around the ERANGE problem in AIX and HP-UX. * doc/posix-functions/readlink.texi: * doc/posix-functions/readlinkat.texi: ERANGE problem is mostly fixed now. Mention AIX problem with trailing / and EINVAL. Lessen differences between these two files. * lib/readlink.c (rpl_readlink): * lib/readlinkat.c (rpl_readlinkat): If stat ("FILE/", ...) reports EOVERFLOW, treat FILE/ as an existing directory. Mostly work around READLINK_TRUNCATE BUG. Lessen spurious differences between the readlink and readlinkat code. * lib/readlinkat.c (rpl_readlinkat): Fix bug where stat was used where fstatat was intended. * m4/readlink.m4 (gl_FUNC_READLINK): Rename gl_cv_func_readlink_works to gl_cv_func_readlink_trailing_slash to identify readlink problems more precisely. All uses changed. Guess no on AIX or HP-UX for this variable. Add check for whether readlink truncates results, and define new macro READLINK_TRUCATE_BUG accordingly. * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Also check gl_cv_func_readlink_trailing_slash when deciding whether to replace readlinkat. * modules/readlinkat (Depends-on): Most dependencies are also needed if replacing readlinkat. fstatat is different, as it is needed only if replacing an existing readlinkat.
* vararrays: just use 2.70Paul Eggert2020-12-111-5/+9
| | | | | * m4/vararrays.m4 (AC_C_VARARRAYS): Do not override Autoconf 2.70 and later, since Autoconf 2.70 matches Gnulib now.
* sys_types: just use 2.70Paul Eggert2020-12-111-12/+10
| | | | | | * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Reindent to match Autoconf sources. Use Autoconf 2.70 as a prerequisite, not 2.69c.
* stdint: port to Autoconf 2.70Paul Eggert2020-12-111-3/+3
| | | | | | | | * m4/stdint.m4 (gl_STDINT_H): Check for inttypes.h and sys/types.h instead of assuming that AC_INCLUDES_DEFAULT does it. The old code relied on AC_INCLUDES_DEFAULT being called and setting ac_cv_header_inttypes_h and ac_cv_header_sys_types_h, but this does not occur in Autoconf 2.70.
* pid_t.m4: just use 2.70Paul Eggert2020-12-111-2/+2
| | | | | * m4/pid_t.m4 (AC_TYPE_PID_T): Use Autoconf 2.70 as a prerequisite, not 2.69c.
* largefile: just use 2.70Paul Eggert2020-12-111-2/+2
| | | | | * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES): Use Autoconf 2.70 as a prerequisite, not 2.69c.
* AC_C_RESTRICT: update from AutoconfPaul Eggert2020-12-111-11/+12
| | | | | | | * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use Autoconf 2.70 as a prerequisite, not 2.69c, since 2.70 is now out. (AC_C_RESTRICT): Define only for 2.70 or earlier. Try __restrict__ before __restrict.
* extensions: update from AutoconfPaul Eggert2020-12-111-59/+93
| | | | | | | * m4/extensions.m4 (AC_CHECK_INCLUDES_DEFAULT): Provide a default implementation for Autoconf 2.69 or earlier. (AC_USE_SYSTEM_EXTENSIONS): Copy from Autoconf git. Define only if Autoconf 2.70 or earlier, since 2.70.1 or later should be OK.
* alloca: update from AutoconfPaul Eggert2020-12-111-4/+4
| | | | | * m4/alloca.m4 (gl_PREREQ_ALLOCA): Trivial update to match Autoconf 2.70.
* memchr: Work around memory overrun bug on AIX 7.2.Bruno Haible2020-12-111-2/+6
| | | | | * m4/memchr.m4 (gl_FUNC_MEMCHR): Test against AIX 7.2 bug. * doc/posix-functions/memchr.texi: Mention the AIX bug.
* fmaf: Work around a bug on FreeBSD 12.2/arm.Bruno Haible2020-12-101-1/+16
| | | | | * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Add one more test. * doc/posix-functions/fmaf.texi: Mention the FreeBSD bug.
* threadlib: Fix test-fstrcmp failure on FreeBSD 11.Bruno Haible2020-12-091-1/+12
| | | | | | | | * m4/threadlib.m4 (gl_THREADLIB_BODY): When weak symbols are not present on FreeBSD, define PTHREAD_IN_USE_DETECTION_HARD. * lib/glthread/threadlib.c: Include <errno.h>. (glthread_in_use): For FreeBSD, provide an alternative implementation that uses pthread_key_create.
* std-gnu11: Make compatible with Autoconf 2.70.Bruno Haible2020-12-091-0/+5
| | | | | * m4/std-gnu11.m4: Disable the entire file if Autoconf >= 2.70 is in use.
* Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.Bruno Haible2020-12-071-1/+5
| | | | | | | | Suggested by Zack Weinberg in <https://savannah.gnu.org/support/?110294>. * m4/ansi-c++.m4 (gl_ANSI_CXX): Mark AC_PROG_CXX as provided. * modules/uchar-c++-tests: Revert the workaround from 2020-08-18.
* Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.Bruno Haible2020-12-064-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>. * lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro. * lib/fcntl.in.h (creat, open): In C++ mode, when GNULIB_NAMESPACE is defined: 1. Define a symbol in this namespace. 2. Don't redirect using a preprocessor #define. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL. (gl_STDIO_H): Set HAVE_DECL_FCLOSEALL. * modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. (gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. * modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE. (gl_UNISTD_H): Set HAVE_DECL_EXECVPE. * modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP. (gl_WCHAR_H): Set HAVE_DECL_WCSDUP. * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
* utime: Fix a test failure on macOS 10.13.Bruno Haible2020-12-051-1/+47
| | | | | | | | | | | | | | | | | Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>. * m4/utime.m4 (gl_FUNC_UTIME): Test whether utime handles trailing slashes on files. * lib/utime.c (utime): Add alternative implementation for Unix platforms. * modules/utime (Depends-on): Add stat. * doc/posix-functions/utime.texi: Mention the macOS 10.13 bug. * doc/posix-functions/lstat.texi: Mention that macOS 10.13 also has the trailing-slash bug. * doc/posix-functions/open.texi: Likewise. * doc/posix-functions/stat.texi: Likewise. * doc/posix-functions/symlink.texi: Likewise.
* havelib: Fix for non-ELF platforms (regression 2019-11-17).Bruno Haible2020-11-301-3/+3
| | | | | | | | Reported by comex <comexk@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00188.html>. * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On non-ELF platforms, don't expect an ELF header.