summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
...
* libc-config: port to MSVCPaul Eggert2017-09-051-0/+22
| | | | | | | | | | Problems reported by Gisle Vanem in: http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00016.html * lib/libc-config.h (__inline): Don't define if HAVE___INLINE. (libc_hidden_proto): Stick to Standard C syntax for varargs macro. * m4/__inline.m4: New file. * modules/libc-config (Files): Add it. (Depends-on): Use it.
* glob: use scratch_buffer instead of extend_allocaPaul Eggert2017-09-011-8/+2
| | | | | | | | | | | | | | | | | | | | | Much of the lib/glob.c part of this patch comes from a glibc patch proposed by Adhemerval Zanella in: https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html * lib/glob.c: Do not include <config.h>, since <libc-config.h>, included via glob.h, does this for us now. (__set_errno): Remove, as libc-config does this for us now. Include <scratch_buffer.h>. (GETPW_R_SIZE_MAX): Remove. (glob): Use struct scratch_buffer instead of extend_alloca. * lib/glob.in.h: Include libc-config.h rather than including <sys/cdefs.h> conditionally. (__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden) (__glibc_unlikely, __restrict, weak_alias): Remove, as libc-config does this for us now. * m4/glob.m4 (gl_PREREQ_GLOB): Remove sys/cdefs.h tests; no longer needed. * modules/glob (Depends-on): Add libc-config, scratch_buffer. (glob.h): Do not replace HAVE_SYS_CDEFS_H.
* glob: match dangling symlinksPaul Eggert2017-08-311-2/+2
| | | | | | | | | | | | | | | | | | | This fixes a bug I inadvertently introduced to Gnulib when I merged glibc glob back into gnulib on 2007-10-16. This fix is inspired by a patch proposed for glibc by Adhemerval Zanella in: https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html * doc/posix-functions/glob.texi: Update list of affected platforms. * lib/glob.c (__lstat64): New macro. (is_dir): New function. (glob, glob_in_dir): Match symlinks even if they are dangling. (link_stat, link_exists_p): Remove. All uses removed. * lib/glob.in.h (__attribute_noinline__): Remove; no longer used. * m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat. * modules/glob (Depends-on): Remove dirfd. * modules/glob-tests (Depends-on): Add symlink. * tests/test-glob.c: Include errno.h, unistd.h. (BASE): New macro. (main): Test dangling symlinks, if symlinks are supported.
* renameat2: fix compilation on alpine linuxPádraig Brady2017-08-301-0/+1
| | | | | | * m4/renameat.m4: Check for <linux/fs.h> presence. * lib/renameat2.h: Only include <linux/fs.h> if present. Reported by Assaf Gordon on Alpine Linux.
* warnings: fix compilation with old autoconfEric Blake2017-08-242-6/+10
| | | | | | | | | | | | | | | | | | | Autoconf older than 2.63b (such as what ships on CentOS 6) had a bug that any AC_DEFUN'd macro name that includes shell meta- characters causes failure due to missing shell quoting during aclocal's use of autom4te. We can work around the problem by using m4_defun instead (same semantics in autom4te, but no longer traced by aclocal, so no longer tickles the shell quoting bug). * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)) (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than AC_DEFUN. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)) (gl_MANYWARN_ALL_GCC(C++)): Likewise. Reported-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* host-cpu-c-abi: Improve detection of MIPS ABI.Bruno Haible2017-08-201-6/+6
| | | | | * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of _MIPS_SIM.
* random: Fix test compilation failure on Cygwin 1.5.25.Bruno Haible2017-08-172-2/+14
| | | | | | | | | | | | | | | * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE, HAVE_DECL_SETSTATE. * m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are declared. * modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE, HAVE_DECL_SETSTATE. * lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0. (setstate): Declare also if HAVE_DECL_SETSTATE is 0. * doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem. * doc/posix-functions/random.texi: Likewise. * doc/posix-functions/setstate.texi: Likewise. * doc/posix-functions/srandom.texi: Likewise.
* stdnoreturn: Fix test compilation failure on Cygwin.Bruno Haible2017-08-171-27/+37
| | | | | | | * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On Cygwin, use gnulib's <stdnoreturn.h> replacement. * lib/stdnoreturn.in.h (noreturn): Treat Cygwin like MSVC. * doc/posix-headers/stdnoreturn.texi: Mention the Cygwin problem.
* rename: port better to NetBSDPaul Eggert2017-08-161-5/+14
| | | | | | | | * doc/posix-functions/rename.texi (rename): NetBSD 7 does not have the link-count bug. * m4/rename.m4 (gl_FUNC_RENAME): Don’t consider NetBSD to be broken merely because rename ("a", "b") removes "a" when the two names are hard links to the same file.
* futimens: don’t assume struct timespec layoutPaul Eggert2017-08-152-3/+15
| | | | | | | | | | | | | * m4/futimens.m4 (gl_FUNC_FUTIMENS): * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): * tests/test-fdutimensat.c (main): * tests/test-futimens.h (test_futimens): * tests/test-lutimens.h (test_lutimens): * tests/test-utimens.h (test_utimens): * tests/test-utimensat.c (main): Don’t assume that struct timespec is a two-member structure in tv_sec, tv_nsec order. Although this is true on all platforms we know about, POSIX does not guarantee it.
* duplocale: Work around NetBSD 7.0 bug.Bruno Haible2017-08-151-4/+45
| | | | | | * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test against the NetBSD 7.0 bug. * lib/duplocale.c: Add comment about NetBSD problem. * doc/posix-functions/duplocale.texi: Mention the NetBSD problem.
* extensions: Enable NetBSD specific extensions.Bruno Haible2017-08-151-1/+6
| | | | * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE.
* open: support O_CLOEXECPaul Eggert2017-08-143-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS, doc/posix-functions/open.texi: * doc/posix-functions/openat.texi: Document this. * lib/fcntl.in.h (O_CLOEXEC): Default to a nonzero value. (GNULIB_defined_O_CLOEXEC): New symbol. * lib/open.c: Include cloexec.h. (open): Support O_CLOEXEC. * lib/openat.c: Include cloexec.h. (rpl_openat): Support O_CLOEXEC. * lib/popen-safer.c: Do not include cloexec.h. (open_noinherit): Remove. (popen_safer): Use O_CLOEXEC instead of set_cloexec_flag. * lib/save-cwd.c: Do not include cloexec.h. (save_cwd): Use O_CLOEXEC instead of set_cloexec_flag. * m4/open-cloexec.m4: New file. * m4/open.m4 (gl_FUNC_OPEN): Require gl_PREPROC_O_CLOEXEC. Replace 'open' if O_CLOEXEC is not present. * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_PREPROC_O_CLOEXEC. Replace 'openat' if O_CLOEXEC is not present. * modules/freopen (Depends-on): Depend on 'open' if replacing freopen. * modules/open (Files): Add m4/open-cloexec.m4. (Depends-on): Depend on cloexec if replacing 'open'. * modules/openat (Files): Add m4/open-cloexec.m4. (Depends-on): Depend on cloexec if replacing openat. * modules/popen-safer (Depends-on): Remove cloexec. * modules/save-cwd (Depends-on): Remove cloexec, and add fd-safer-flag and 'open'.
* reallocarray: minor fixesPaul Eggert2017-08-131-3/+3
| | | | | | | | * doc/glibc-functions/reallocarray.texi: Update version numbers. * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Don't trust _cv_ contents. * modules/reallocarray (License): Change from GPL to LGPL. * tests/test-reallocarray.c (main): Fix ENOMEM typo. Indent properly and don't use tabs.
* reallocarray: New moduleDarshit Shah2017-08-132-3/+25
| | | | | | | | | | | | | | | reallocarray is a new function in glibc 2.26 to safely allocate an array of memory locations with integer overflow protection. * MODULES.html.sh: Add reallocarray. * doc/glibc-functions/reallocarray.texi: Documentation for reallocarray. * lib/reallocarray.c: New file to implement module reallocarray. * lib/stdlib.in.h: Add function declarations for reallocarray. * m4/reallocarray.m4: New file. * m4/stdlib_h.m4: Declare reallocarray. * modules/reallocarray: New file. * modules/reallocarray-test: New file. * modules/stdlib: Coerce stdlib.h to export reallocarray. * tests/test-reallocarray.c: New test.
* fts: port recent changes to CentOS 6Paul Eggert2017-08-101-4/+13
| | | | | | | | | Problem reported by Tom G. Christensen in: http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00064.html * lib/fts.c (fsword): New type. (struct dev_type, filesystem_type): Use it. * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for __fsword_t. Also, check for f_type only if fstatfs and sys/vfs.h work.
* extensions: add _OPENBSD_SOURCEPaul Eggert2017-08-081-1/+6
| | | | * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
* manywarnings: Add support for C++.Reuben Thomas2017-08-072-4/+10
| | | | | | | | * build-aux/g++-warning.spec: New file. * m4/manywarnings-c++.m4: New file. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that redirects to manywarnings-c++.m4. * modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
* manywarnings: Add support for C++.Reuben Thomas2017-08-071-0/+247
| | | | | | * build-aux/g++-warning.spec: New file. * m4/manywarnings-c++.m4: New file. * modules/manywarnings (Files): Add it.
* warnings, manywarnings: Add support for multiple languages, not just C.Bruno Haible2017-08-072-12/+47
| | | | | | | | | | | | | | | * warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from gl_UNKNOWN_WARNINGS_ARE_ERRORS. (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro. (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro. (gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG). (gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization of the current language. If C++ is the current language, modify WARN_CXXFLAGS instead of WARN_CFLAGS. * manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from gl_MANYWARN_ALL_GCC. (gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
* valgrind-tests: use ls, and cachePaul Eggert2017-08-051-15/+15
| | | | | | * m4/valgrind-tests.m4: Test ls, not bash. Problem reported by Reuben Thomas. Also, cache the result so that it can be overridden.
* manywarnings: port to 64-bit GCC builds of EmacsPaul Eggert2017-08-041-4/+15
| | | | | | | | * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe object size rather than hardwiring 2147483647. This is needed to build GNU Emacs, which has one conditional (and used only-in-theory) call to malloc with a literal greater than 2147483647.
* manywarnings: port to 32-bit GCC bugPaul Eggert2017-08-011-3/+3
| | | | | | | | Problem reported by Pino Toscano in: http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00150.html * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1, not 2**63 - 1, to work around the following GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
* host-cpu-c-abi: Detect ILP32 ABI on IA-64 HP-UX.Bruno Haible2017-07-301-4/+18
| | | | | | | * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Distinguish ia64-ilp32 from ia64. For arm64, test only __aarch64__, as __ARM_64BIT_STATE and __ARM_PCS_AAPCS64 are not reliable indicators: they are not defined on Ubuntu 14.04 (gcc 4.8.4) and Debian 8 (gcc 4.9.2).
* Rename module 'strftime' to 'nstrftime'.Bruno Haible2017-07-241-0/+0
| | | | | | | | | | | | | | * m4/nstrftime.m4: Renamed from m4/strftime.m4. * lib/nstrftime.c: Renamed from lib/strftime.c. * modules/nstrftime: Renamed from modules/strftime. (Files, Makefile.am): Update. * tests/test-nstrftime.c: Renamed from tests/test-strftime.c. Fix comment. * modules/nstrftime-tests: Renamed from modules/strftime-tests. (Files, Makefile.am): Update. * modules/strftime: New file, an obsolete indirection. * doc/posix-functions/strftime.texi: Update reference. * config/srclist.txt: Update info.
* host-cpu-c-abi: Fix detection of MIPS ABI.Bruno Haible2017-07-191-6/+6
| | | | | * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the ABI, not the CPU instruction set.
* explicit_bzero: new modulePaul Eggert2017-07-162-0/+24
| | | | | | | | | | | | The explicit_bzero function has been added to glibc. This module is intended to supports its use in GNU programs. * doc/glibc-functions/explicit_bzero.texi, lib/explicit_bzero.c: * m4/explicit_bzero.m4, modules/explicit_bzero: New files. * doc/gnulib.texi (Glibc string.h): Link to new doc. * lib/string.in.h (explicit_bzero): Declare. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add defaults for it. * modules/string (string.h): Substitute its vars.
* threadlib: Support static linking.Bruno Haible2017-07-161-1/+5
| | | | | * m4/threadlib.m4 (gl_THREADLIB_BODY): When static linking is in use, set gl_cv_have_weak to 'no'.
* getdtablesize: Add minimal support for OpenVMS.Bruno Haible2017-07-151-20/+34
| | | | | | | | | | | Reported by John E. Malmberg <wb8tyw@qsl.net>. * modules/getdtablesize (Description): Fix. * lib/getdtablesize.c: Fix comment. * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Don't replace the getdtablesize() function, even though the test fails. * doc/glibc-functions/getdtablesize.texi: Reference SUSv2. Describe limitation on OpenVMS.
* Revisit cross-compilation guesses.Bruno Haible2017-07-131-2/+3
| | | | * m4/wctype_h.m4 (gl_WCTYPE_H): Add comment.
* Improve cross-compilation guesses for native Windows.Bruno Haible2017-07-13106-347/+907
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native Windows. * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise. * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise. * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise. * m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise. * m4/ceil.m4 (gl_FUNC_CEIL): Likewise. * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise. * m4/ceill.m4 (gl_FUNC_CEILL): Likewise. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Likewise. * m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise. * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise. * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise. * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise. * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise. * m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise. * m4/float_h.m4 (gl_FLOAT_H): Likewise. * m4/floor.m4 (gl_FUNC_FLOOR): Likewise. * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise. * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise. * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise. * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise. * m4/fmod.m4 (gl_FUNC_FMOD): Likewise. * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise. * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise. * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise. * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise. * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise. * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise. * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. * m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise. * m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise. * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise. * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise. * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise. * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise. * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise. * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise. * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise. * m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise. * m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise. * m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise. * m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise. * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. * m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise. * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. * m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise. * m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise. * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise. * m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise. * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise. * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise. * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise. * m4/modf.m4 (gl_FUNC_MODF): Likewise. * m4/modff.m4 (gl_FUNC_MODFF): Likewise. * m4/modfl.m4 (gl_FUNC_MODFL): Likewise. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise. * m4/perror.m4 (gl_FUNC_PERROR): Likewise. * m4/popen.m4 (gl_FUNC_POPEN): Likewise. * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/regex.m4 (gl_REGEX): Likewise. * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. * m4/remainderf.m4 (gl_FUNC_REMAINDERF, gl_FUNC_REMAINDERF_WORKS): Likewise. * m4/remainderl.m4 (gl_FUNC_REMAINDERL, gl_FUNC_REMAINDERL_WORKS): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/round.m4 (gl_FUNC_ROUND): Likewise. * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. * m4/signbit.m4 (gl_SIGNBIT): Likewise. * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise. * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise. * m4/stdint.m4 (gl_STDINT_H): Likewise. * m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise. * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise. * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise. * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise. * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL): Likewise. * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise. * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native Windows. Enable also on Autoconf 2.70. * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N, gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess for native Windows. (gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
* Improve cross-compilation guesses for native Windows.Bruno Haible2017-07-133-11/+22
| | | | | | | | * m4/memchr.m4 (gl_FUNC_MEMCHR): Add cross-compilation guess for native Windows. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Don't use internals of memchr.m4. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
* Improve cross-compilation guesses for native Windows.Bruno Haible2017-07-133-18/+29
| | | | | | | | * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Add cross-compilation guess for native Windows. (gl_FUNC_FFLUSH): Update accordingly. * m4/fclose.m4 (gl_FUNC_FCLOSE): Likewise. * m4/fseeko.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
* More systematic m4 quoting and indentation.Bruno Haible2017-07-1116-92/+92
| | | | | | | | | | | | | | | | | | | | | * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. * m4/host-os.m4 (gl_HOST_OS): Likewise. * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H, gl_WINSIZE_IN_PTEM): Likewise. * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise. * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically. Correct indentation. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
* round, roundf: Avoid compiler warning in configure test.Bruno Haible2017-07-112-4/+4
| | | | | * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit(). * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* Make sure $host and $host_os are defined when used.Bruno Haible2017-07-1014-16/+29
| | | | | | | | | | | | | | | | | | * m4/argz.m4 (gl_FUNC_ARGZ): Require AC_CANONICAL_HOST. * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Likewise. * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Likewise. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise. * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise. * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise. * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise. * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST outside the m4_ifdef block.
* *printf: Fix cross-compilation guess for Solaris.Bruno Haible2017-07-101-3/+3
| | | | | * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): Fix copy-and-paste mistake from 2010-12-21.
* sched: Fix build failure on native Windows (regression from 2017-06-19).Bruno Haible2017-07-061-3/+4
| | | | * m4/sched_h.m4 (gl_SCHED_H): Set HAVE_STRUCT_SCHED_PARAM always.
* logbl: Work around a glibc bug on PowerPC64LE.Bruno Haible2017-07-011-3/+10
| | | | | | * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Test also negative subnormal numbers. * doc/posix-functions/logbl.texi: Update.
* sched: Fix compilation failure on OpenVMS.Bruno Haible2017-06-191-5/+16
| | | | | | * m4/sched_h.m4 (gl_SCHED_H): Require AC_CANONICAL_HOST. On OpenVMS, test whether <pthread.h> exists and defines struct sched_param. * lib/sched.in.h: On OpenVMS, include <pthread.h>.
* float: Fix 'float' and 'isinf' failures on DragonFly BSD.Bruno Haible2017-06-123-6/+6
| | | | * m4/fmal.m4, m4/frexpl.m4, m4/logbl.m4: Update accordingly.
* float: Fix 'float' and 'isinf' failures on DragonFly BSD.Bruno Haible2017-06-121-3/+3
| | | | | * m4/float_h.m4 (gl_FLOAT_H): Treat DragonFly BSD like FreeBSD. * lib/float.in.h: Likewise.
* host-cpu-c-abi: Support for aarch64 ILP32 ABI.Bruno Haible2017-06-091-4/+15
| | | | | | * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the aarch64 ILP32 ABI. Set HOST_CPU_C_ABI=arm64-ilp32 and define __arm64_ilp32__ in this case.
* same-inode: port better to VMS 8.2 and laterPaul Eggert2017-06-041-1/+4
| | | | | | | | Problem reported by John E. Malmberg in: http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00005.html * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]: Use the usual POSIX definition. * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT.
* iconv: Update copyright year.Bruno Haible2017-05-231-1/+1
| | | | Reported by Karl Berry.
* Avoid wrong configure results with gcc -fsanitize=address.Bruno Haible2017-05-2015-79/+138
| | | | | | | | | | | | | | | | | | | | | | | | This completes the work done on 2016-02-06 on this topic. * m4/memmem.m4 (gl_FUNC_MEMMEM): Free allocated memory before returning. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise. * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN): Close allocated FILE streams before returning. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/signbit.m4 (gl_FLOATTYPE_SIGN_LOCATION): Likewise. * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Close allocated FILE streams and free allocated memory before returning. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Close allocated DIR objects before returning. * m4/iconv.m4 (AM_ICONV_LINK): Close allocated iconv_t handles before returning.
* gettext: Update macros from gettext git.Bruno Haible2017-05-182-5/+5
| | | | | * m4/intldir.m4: Require Autoconf >= 2.60. * m4/progtest.m4: Fix typos in copyright notice.
* manywarnings: update for GCC 7Paul Eggert2017-05-161-3/+22
| | | | | | | | | | | * build-aux/gcc-warning.spec: * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which requires a non-comment fallthrough attribute. This is a bit cleaner than the comment versions. * lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c: * lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro. Use it whenever one switch case falls through into the next.
* windows-stat-inodes: New module.Bruno Haible2017-05-142-1/+28
| | | | | | | | | | | | | | | | | | | | * m4/windows-stat-inodes.m4: New file. * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_STAT_INODES. * modules/sys_types (Makefile.am): Substitute WINDOWS_STAT_INODES. * lib/sys_types.in.h [WINDOWS_STAT_INODES]: Override dev_t and ino_t. (_GL_WINDOWS_STAT_INODES): New macro. * lib/stat-w32.c: Set _WIN32_WINNT. Include <string.h>, verify.h. (GetFileInformationByHandleExFunc): New variable. (initialize): Initialize it. (_gl_fstat_by_handle) [_GL_WINDOWS_STAT_INODES]: Initialize st_dev and st_ino appropriately. * lib/stat.c (rpl_stat): Use the directory entry based approach only as a fallback, because it does not provide st_dev and st_ino values. * modules/fstat (Depends-on): Add 'verify'. * modules/windows-stat-inodes: New file. * doc/windows-stat-inodes.texi: New file. * doc/gnulib.texi: Include it. * doc/posix-headers/sys_stat.texi: Mention the new module.
* year2038: New module.Bruno Haible2017-05-131-0/+63
| | | | | | | * m4/year2038.m4: New file. * modules/year2038: New file. * doc/year2038.texi: New file. * doc/gnulib.texi: Include it.