summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-07-13 21:06:02 +0200
committerBruno Haible <bruno@clisp.org>2017-07-13 21:07:22 +0200
commita9b04535c13761e33803afab625af008d33d05e3 (patch)
tree3c182a785c3a1e75ce922d50205c4453a090a09e /m4
parentabc08a2630c2e89c52ef876ef650e69d7d6a2215 (diff)
downloadgnulib-a9b04535c13761e33803afab625af008d33d05e3.tar.gz
Improve cross-compilation guesses for native Windows.
* 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.
Diffstat (limited to 'm4')
-rw-r--r--m4/btowc.m414
-rw-r--r--m4/c-stack.m414
-rw-r--r--m4/calloc.m44
-rw-r--r--m4/canonicalize.m44
-rw-r--r--m4/cbrtf.m48
-rw-r--r--m4/cbrtl.m46
-rw-r--r--m4/ceil.m44
-rw-r--r--m4/ceilf.m44
-rw-r--r--m4/ceill.m415
-rw-r--r--m4/chown.m434
-rw-r--r--m4/d-ino.m44
-rw-r--r--m4/dup.m410
-rw-r--r--m4/exp2.m48
-rw-r--r--m4/exp2l.m44
-rw-r--r--m4/expl.m411
-rw-r--r--m4/expm1.m44
-rw-r--r--m4/expm1f.m48
-rw-r--r--m4/exponentl.m420
-rw-r--r--m4/fabsl.m48
-rw-r--r--m4/fchdir.m44
-rw-r--r--m4/fcntl-o.m411
-rw-r--r--m4/float_h.m46
-rw-r--r--m4/floor.m44
-rw-r--r--m4/floorf.m44
-rw-r--r--m4/fma.m414
-rw-r--r--m4/fmaf.m414
-rw-r--r--m4/fmal.m414
-rw-r--r--m4/fmod.m44
-rw-r--r--m4/fmodf.m44
-rw-r--r--m4/fmodl.m44
-rw-r--r--m4/frexp.m415
-rw-r--r--m4/frexpf.m415
-rw-r--r--m4/ftello.m44
-rw-r--r--m4/gettimeofday.m44
-rw-r--r--m4/hypot.m44
-rw-r--r--m4/hypotf.m410
-rw-r--r--m4/hypotl.m410
-rw-r--r--m4/ilogb.m48
-rw-r--r--m4/ilogbf.m49
-rw-r--r--m4/isfinite.m413
-rw-r--r--m4/isinf.m422
-rw-r--r--m4/isnanf.m415
-rw-r--r--m4/isnanl.m416
-rw-r--r--m4/ldexpl.m48
-rw-r--r--m4/log.m410
-rw-r--r--m4/log10.m410
-rw-r--r--m4/log10f.m410
-rw-r--r--m4/log10l.m48
-rw-r--r--m4/log1p.m44
-rw-r--r--m4/log1pf.m410
-rw-r--r--m4/log1pl.m44
-rw-r--r--m4/log2.m410
-rw-r--r--m4/log2f.m410
-rw-r--r--m4/log2l.m48
-rw-r--r--m4/logb.m415
-rw-r--r--m4/logbf.m415
-rw-r--r--m4/logbl.m48
-rw-r--r--m4/logf.m410
-rw-r--r--m4/logl.m48
-rw-r--r--m4/lstat.m45
-rw-r--r--m4/mbrtowc.m414
-rw-r--r--m4/mkdir.m413
-rw-r--r--m4/mkstemp.m44
-rw-r--r--m4/mktime.m410
-rw-r--r--m4/modf.m411
-rw-r--r--m4/modff.m411
-rw-r--r--m4/modfl.m411
-rw-r--r--m4/nanosleep.m44
-rw-r--r--m4/perror.m418
-rw-r--r--m4/popen.m420
-rw-r--r--m4/posix_spawn.m412
-rw-r--r--m4/printf.m4132
-rw-r--r--m4/ptsname_r.m417
-rw-r--r--m4/putenv.m44
-rw-r--r--m4/regex.m423
-rw-r--r--m4/remainder.m44
-rw-r--r--m4/remainderf.m410
-rw-r--r--m4/remainderl.m410
-rw-r--r--m4/rename.m410
-rw-r--r--m4/rmdir-errno.m412
-rw-r--r--m4/rmdir.m44
-rw-r--r--m4/round.m424
-rw-r--r--m4/roundf.m423
-rw-r--r--m4/roundl.m44
-rw-r--r--m4/signbit.m411
-rw-r--r--m4/sleep.m44
-rw-r--r--m4/sqrtl.m48
-rw-r--r--m4/stdint.m4108
-rw-r--r--m4/strerror.m44
-rw-r--r--m4/strncat.m48
-rw-r--r--m4/strtod.m412
-rw-r--r--m4/strtoimax.m412
-rw-r--r--m4/strtok_r.m413
-rw-r--r--m4/trunc.m44
-rw-r--r--m4/truncf.m44
-rw-r--r--m4/truncl.m410
-rw-r--r--m4/tsearch.m48
-rw-r--r--m4/tzset.m44
-rw-r--r--m4/ungetc.m46
-rw-r--r--m4/unlink-busy.m415
-rw-r--r--m4/unlink.m44
-rw-r--r--m4/usleep.m44
-rw-r--r--m4/utimes.m422
-rw-r--r--m4/wcrtomb.m44
-rw-r--r--m4/wcsrtombs.m414
-rw-r--r--m4/wctob.m45
106 files changed, 907 insertions, 347 deletions
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index 102180938a..5e031e0742 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,4 +1,4 @@
-# btowc.m4 serial 10
+# btowc.m4 serial 11
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -50,6 +50,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on Cygwin.
cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_nul="guessing yes" ;;
esac
@@ -65,10 +67,12 @@ changequote([,])dnl
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on IRIX.
- irix*) gl_cv_func_btowc_eof="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none; then
diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index 3a85ee9309..9f9e4f8f8f 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -7,7 +7,7 @@
# Written by Paul Eggert.
-# serial 15
+# serial 16
AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
[
@@ -123,9 +123,15 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
]])],
[ac_cv_sys_stack_overflow_works=yes],
[ac_cv_sys_stack_overflow_works=no],
- [ac_cv_sys_stack_overflow_works=cross-compiling])])
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
+ *) ac_cv_sys_stack_overflow_works=cross-compiling ;;
+ esac
+ ])
+ ])
- if test $ac_cv_sys_stack_overflow_works = yes; then
+ if test "$ac_cv_sys_stack_overflow_works" = yes; then
AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], [1],
[Define to 1 if extending the stack slightly past the limit causes
a SIGSEGV which can be handled on an alternate stack established
@@ -194,7 +200,7 @@ int main ()
fi
AC_CACHE_CHECK([for precise C stack overflow detection],
- ac_cv_sys_xsi_stack_overflow_heuristic,
+ [ac_cv_sys_xsi_stack_overflow_heuristic],
[AC_RUN_IFELSE([AC_LANG_SOURCE(
[[
#include <unistd.h>
diff --git a/m4/calloc.m4 b/m4/calloc.m4
index 6b9d4e5eed..04a1a62692 100644
--- a/m4/calloc.m4
+++ b/m4/calloc.m4
@@ -1,4 +1,4 @@
-# calloc.m4 serial 16
+# calloc.m4 serial 17
# Copyright (C) 2004-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -40,6 +40,8 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
# If we don't know, assume the worst.
*) ac_cv_func_calloc_0_nonnull="guessing no" ;;
esac
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index c04ff8dd00..53b1597d33 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,4 +1,4 @@
-# canonicalize.m4 serial 28
+# canonicalize.m4 serial 29
dnl Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
esac
diff --git a/m4/cbrtf.m4 b/m4/cbrtf.m4
index 290036d98b..e603d1b65e 100644
--- a/m4/cbrtf.m4
+++ b/m4/cbrtf.m4
@@ -1,4 +1,4 @@
-# cbrtf.m4 serial 3
+# cbrtf.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -91,8 +91,10 @@ int main ()
[gl_cv_func_cbrtf_works=yes],
[gl_cv_func_cbrtf_works=no],
[case "$host_os" in
- irix*) gl_cv_func_cbrtf_works="guessing no";;
- *) gl_cv_func_cbrtf_works="guessing yes";;
+ irix*) gl_cv_func_cbrtf_works="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_cbrtf_works="guessing yes";;
+ *) gl_cv_func_cbrtf_works="guessing yes";;
esac
])
])
diff --git a/m4/cbrtl.m4 b/m4/cbrtl.m4
index e3771ae551..3fe797982c 100644
--- a/m4/cbrtl.m4
+++ b/m4/cbrtl.m4
@@ -1,4 +1,4 @@
-# cbrtl.m4 serial 5
+# cbrtl.m4 serial 6
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -74,6 +74,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_cbrtl_ieee="guessing no" ;;
esac
@@ -144,6 +146,8 @@ int main ()
[gl_cv_func_cbrtl_works=no],
[case "$host_os" in
openbsd*) gl_cv_func_cbrtl_works="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_cbrtl_works="guessing yes";;
*) gl_cv_func_cbrtl_works="guessing yes";;
esac
])
diff --git a/m4/ceil.m4 b/m4/ceil.m4
index f58a998991..72443a739c 100644
--- a/m4/ceil.m4
+++ b/m4/ceil.m4
@@ -1,4 +1,4 @@
-# ceil.m4 serial 9
+# ceil.m4 serial 10
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -48,6 +48,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ceil_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceil_ieee="guessing no" ;;
esac
diff --git a/m4/ceilf.m4 b/m4/ceilf.m4
index 9770fb6422..7c83e05ab9 100644
--- a/m4/ceilf.m4
+++ b/m4/ceilf.m4
@@ -1,4 +1,4 @@
-# ceilf.m4 serial 14
+# ceilf.m4 serial 15
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -55,6 +55,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceilf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ceilf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceilf_ieee="guessing no" ;;
esac
diff --git a/m4/ceill.m4 b/m4/ceill.m4
index e981c7bcf7..54bf8dd35d 100644
--- a/m4/ceill.m4
+++ b/m4/ceill.m4
@@ -1,4 +1,4 @@
-# ceill.m4 serial 15
+# ceill.m4 serial 16
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -54,6 +54,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceill_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ceill_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceill_ieee="guessing no" ;;
esac
@@ -83,10 +85,13 @@ int main (int argc, char *argv[])
long double d = 0.3L;]],
[[return (!(ceill (d) == 1)); ]])],
[gl_cv_func_ceill_buggy=no], [gl_cv_func_ceill_buggy=yes],
- [case $host_os in
- openbsd*) gl_cv_func_ceill_buggy="guessing yes";;
- *) gl_cv_func_ceill_buggy="guessing no";;
- esac])
+ [case "$host_os" in
+ openbsd*) gl_cv_func_ceill_buggy="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_ceill_buggy="guessing no" ;;
+ *) gl_cv_func_ceill_buggy="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceill_buggy" in
diff --git a/m4/chown.m4 b/m4/chown.m4
index 36487d9d08..588b6bae4e 100644
--- a/m4/chown.m4
+++ b/m4/chown.m4
@@ -1,4 +1,4 @@
-# serial 27
+# serial 28
# Determine whether we need the chown wrapper.
dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2017 Free Software
@@ -14,8 +14,6 @@ dnl with or without modifications, as long as this notice is preserved.
# From Jim Meyering.
-m4_version_prereq([2.70], [] ,[
-
# This is taken from the following Autoconf patch:
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
AC_DEFUN([AC_FUNC_CHOWN],
@@ -49,21 +47,23 @@ AC_DEFUN([AC_FUNC_CHOWN],
[ac_cv_func_chown_works=no],
[case "$host_os" in # ((
# Guess yes on glibc systems.
- *-gnu*) ac_cv_func_chown_works=yes ;;
+ *-gnu*) ac_cv_func_chown_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) ac_cv_func_chown_works="guessing no" ;;
# If we don't know, assume the worst.
- *) ac_cv_func_chown_works=no ;;
+ *) ac_cv_func_chown_works="guessing no" ;;
esac
])
rm -f conftest.chown
])
- if test $ac_cv_func_chown_works = yes; then
- AC_DEFINE([HAVE_CHOWN], [1],
- [Define to 1 if your system has a working `chown' function.])
- fi
+ case "$ac_cv_func_chown_works" in
+ *yes)
+ AC_DEFINE([HAVE_CHOWN], [1],
+ [Define to 1 if your system has a working `chown' function.])
+ ;;
+ esac
])# AC_FUNC_CHOWN
-])
-
AC_DEFUN_ONCE([gl_FUNC_CHOWN],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
@@ -83,11 +83,13 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN],
fi
dnl Some old systems tried to use uid/gid -1 literally.
- if test $ac_cv_func_chown_works = no; then
- AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1],
- [Define if chown is not POSIX compliant regarding IDs of -1.])
- REPLACE_CHOWN=1
- fi
+ case "$ac_cv_func_chown_works" in
+ *no)
+ AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1],
+ [Define if chown is not POSIX compliant regarding IDs of -1.])
+ REPLACE_CHOWN=1
+ ;;
+ esac
dnl Solaris 9 ignores trailing slash.
dnl FreeBSD 7.2 mishandles trailing slash on symlinks.
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
index fa599ed56d..376045cc3b 100644
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,4 +1,4 @@
-# serial 17
+# serial 18
dnl From Jim Meyering.
dnl
@@ -42,6 +42,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[case "$host_os" in
# Guess yes on glibc systems with Linux kernel.
linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_struct_dirent_d_ino="guessing no" ;;
esac
diff --git a/m4/dup.m4 b/m4/dup.m4
index 75307cbb89..42ef5d7a1a 100644
--- a/m4/dup.m4
+++ b/m4/dup.m4
@@ -1,4 +1,4 @@
-# dup.m4 serial 5
+# dup.m4 serial 6
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_DUP],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
m4_ifdef([gl_MSVC_INVAL], [
AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
@@ -33,7 +34,12 @@ AC_DEFUN([gl_FUNC_DUP],
],
[gl_cv_func_dup_works=yes],
[gl_cv_func_dup_works=no],
- [gl_cv_func_dup_works='guessing yes'])
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_dup_works="guessing no" ;;
+ *) gl_cv_func_dup_works="guessing yes" ;;
+ esac
+ ])
])
case "$gl_cv_func_dup_works" in
*yes) ;;
diff --git a/m4/exp2.m4 b/m4/exp2.m4
index 6aa76f72d3..3c522f6af0 100644
--- a/m4/exp2.m4
+++ b/m4/exp2.m4
@@ -1,4 +1,4 @@
-# exp2.m4 serial 1
+# exp2.m4 serial 2
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -136,8 +136,10 @@ int main ()
[gl_cv_func_exp2_works=yes],
[gl_cv_func_exp2_works=no],
[case "$host_os" in
- openbsd*) gl_cv_func_exp2_works="guessing no";;
- *) gl_cv_func_exp2_works="guessing yes";;
+ openbsd*) gl_cv_func_exp2_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_exp2_works="guessing yes" ;;
+ *) gl_cv_func_exp2_works="guessing yes" ;;
esac
])
])
diff --git a/m4/exp2l.m4 b/m4/exp2l.m4
index a964034236..93edca305a 100644
--- a/m4/exp2l.m4
+++ b/m4/exp2l.m4
@@ -1,4 +1,4 @@
-# exp2l.m4 serial 3
+# exp2l.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -66,6 +66,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_exp2l_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_exp2l_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_exp2l_ieee="guessing no" ;;
esac
diff --git a/m4/expl.m4 b/m4/expl.m4
index 530bad8f4b..2eddf0a19e 100644
--- a/m4/expl.m4
+++ b/m4/expl.m4
@@ -1,4 +1,4 @@
-# expl.m4 serial 9
+# expl.m4 serial 10
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -71,9 +71,12 @@ AC_DEFUN([gl_FUNC_EXPL],
isnan(expl(-0.4)); ]])],
[gl_cv_func_expl_buggy=no], [gl_cv_func_expl_buggy=yes],
[case $host_os in
- openbsd*) gl_cv_func_expl_buggy="guessing yes";;
- *) gl_cv_func_expl_buggy="guessing no";;
- esac])
+ openbsd*) gl_cv_func_expl_buggy="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_expl_buggy="guessing no" ;;
+ *) gl_cv_func_expl_buggy="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_expl_buggy" in
diff --git a/m4/expm1.m4 b/m4/expm1.m4
index d43a08d5d7..fa62f8727c 100644
--- a/m4/expm1.m4
+++ b/m4/expm1.m4
@@ -1,4 +1,4 @@
-# expm1.m4 serial 3
+# expm1.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -87,6 +87,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_expm1_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_expm1_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_expm1_ieee="guessing no" ;;
esac
diff --git a/m4/expm1f.m4 b/m4/expm1f.m4
index 6f00472537..3fa9608049 100644
--- a/m4/expm1f.m4
+++ b/m4/expm1f.m4
@@ -1,4 +1,4 @@
-# expm1f.m4 serial 2
+# expm1f.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -63,8 +63,10 @@ int main ()
[gl_cv_func_expm1f_works=yes],
[gl_cv_func_expm1f_works=no],
[case "$host_os" in
- irix*) gl_cv_func_expm1f_works="guessing no";;
- *) gl_cv_func_expm1f_works="guessing yes";;
+ irix*) gl_cv_func_expm1f_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_expm1f_works="guessing yes" ;;
+ *) gl_cv_func_expm1f_works="guessing yes" ;;
esac
])
])
diff --git a/m4/exponentl.m4 b/m4/exponentl.m4
index c9cb81dd82..ebfebe496b 100644
--- a/m4/exponentl.m4
+++ b/m4/exponentl.m4
@@ -1,4 +1,4 @@
-# exponentl.m4 serial 3
+# exponentl.m4 serial 4
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION],
[
AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([where to find the exponent in a 'long double'],
[gl_cv_cc_long_double_expbit0],
[
@@ -79,9 +80,24 @@ int main ()
[gl_cv_cc_long_double_expbit0=`cat conftest.out`],
[gl_cv_cc_long_double_expbit0="unknown"],
[
- dnl When cross-compiling, we don't know. It depends on the
+ dnl When cross-compiling, in general we don't know. It depends on the
dnl ABI and compiler version. There are too many cases.
gl_cv_cc_long_double_expbit0="unknown"
+ case "$host_os" in
+ mingw*) # On native Windows (little-endian), we know the result
+ # in two cases: mingw, MSVC.
+ AC_EGREP_CPP([Known], [
+#ifdef __MINGW32__
+ Known
+#endif
+ ], [gl_cv_cc_long_double_expbit0="word 2 bit 0"])
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ], [gl_cv_cc_long_double_expbit0="word 1 bit 20"])
+ ;;
+ esac
])
rm -f conftest.out
])
diff --git a/m4/fabsl.m4 b/m4/fabsl.m4
index 9d853483bf..93bf760c77 100644
--- a/m4/fabsl.m4
+++ b/m4/fabsl.m4
@@ -1,4 +1,4 @@
-# fabsl.m4 serial 2
+# fabsl.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -66,8 +66,10 @@ int main ()
[gl_cv_func_fabsl_works=yes],
[gl_cv_func_fabsl_works=no],
[case "$host_os" in
- irix*) gl_cv_func_fabsl_works="guessing no";;
- *) gl_cv_func_fabsl_works="guessing yes";;
+ irix*) gl_cv_func_fabsl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_fabsl_works="guessing yes" ;;
+ *) gl_cv_func_fabsl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/fchdir.m4 b/m4/fchdir.m4
index b3d1b0b20b..0ef04ed8e9 100644
--- a/m4/fchdir.m4
+++ b/m4/fchdir.m4
@@ -1,4 +1,4 @@
-# fchdir.m4 serial 21
+# fchdir.m4 serial 22
dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,8 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_open_directory_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_open_directory_works="guessing no" ;;
esac
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 3c3b63c525..b388d8935a 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,4 +1,4 @@
-# fcntl-o.m4 serial 4
+# fcntl-o.m4 serial 5
dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -18,6 +18,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
@@ -116,7 +117,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
- [gl_cv_header_working_fcntl_h=cross-compiling])])
+ [case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+ ])
+ ])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index 40dc1021c4..4c42176b6f 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,4 +1,4 @@
-# float_h.m4 serial 10
+# float_h.m4 serial 11
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -76,7 +76,9 @@ int main ()
[gl_cv_func_itold_works="guessing no"],
[gl_cv_func_itold_works="guessing yes"])
;;
- *) gl_cv_func_itold_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_itold_works="guessing yes" ;;
+ *) gl_cv_func_itold_works="guessing yes" ;;
esac
])
])
diff --git a/m4/floor.m4 b/m4/floor.m4
index 713e7b346e..0f99200407 100644
--- a/m4/floor.m4
+++ b/m4/floor.m4
@@ -1,4 +1,4 @@
-# floor.m4 serial 8
+# floor.m4 serial 9
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -44,6 +44,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_floor_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_floor_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_floor_ieee="guessing no" ;;
esac
diff --git a/m4/floorf.m4 b/m4/floorf.m4
index f456aaa7b4..2f7e604fa0 100644
--- a/m4/floorf.m4
+++ b/m4/floorf.m4
@@ -1,4 +1,4 @@
-# floorf.m4 serial 13
+# floorf.m4 serial 14
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,6 +51,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_floorf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_floorf_ieee="guessing no" ;;
esac
diff --git a/m4/fma.m4 b/m4/fma.m4
index 9ec564bcaf..4f1686ab86 100644
--- a/m4/fma.m4
+++ b/m4/fma.m4
@@ -1,4 +1,4 @@
-# fma.m4 serial 2
+# fma.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -167,8 +167,18 @@ int main()
}]])],
[gl_cv_func_fma_works=yes],
[gl_cv_func_fma_works=no],
- [dnl Guess no, even on glibc systems.
+ [dnl Guess yes on native Windows with MSVC.
+ dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fma_works="guessing no"
+ case "$host_os" in
+ mingw*)
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ], [gl_cv_func_fma_works="guessing yes"])
+ ;;
+ esac
])
])
LIBS="$save_LIBS"
diff --git a/m4/fmaf.m4 b/m4/fmaf.m4
index 57d553c452..1da8690ca9 100644
--- a/m4/fmaf.m4
+++ b/m4/fmaf.m4
@@ -1,4 +1,4 @@
-# fmaf.m4 serial 3
+# fmaf.m4 serial 4
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -171,8 +171,18 @@ int main()
}]])],
[gl_cv_func_fmaf_works=yes],
[gl_cv_func_fmaf_works=no],
- [dnl Guess no, even on glibc systems.
+ [dnl Guess yes on native Windows with MSVC.
+ dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fmaf_works="guessing no"
+ case "$host_os" in
+ mingw*)
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ], [gl_cv_func_fmaf_works="guessing yes"])
+ ;;
+ esac
])
])
LIBS="$save_LIBS"
diff --git a/m4/fmal.m4 b/m4/fmal.m4
index eb8dc1a062..b8913cdd10 100644
--- a/m4/fmal.m4
+++ b/m4/fmal.m4
@@ -1,4 +1,4 @@
-# fmal.m4 serial 5
+# fmal.m4 serial 6
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -369,8 +369,18 @@ int main()
}]])],
[gl_cv_func_fmal_works=yes],
[gl_cv_func_fmal_works=no],
- [dnl Guess no, even on glibc systems.
+ [dnl Guess yes on native Windows with MSVC.
+ dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fmal_works="guessing no"
+ case "$host_os" in
+ mingw*)
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ], [gl_cv_func_fmal_works="guessing yes"])
+ ;;
+ esac
])
])
LIBS="$save_LIBS"
diff --git a/m4/fmod.m4 b/m4/fmod.m4
index e064b50df0..efc1dc968e 100644
--- a/m4/fmod.m4
+++ b/m4/fmod.m4
@@ -1,4 +1,4 @@
-# fmod.m4 serial 4
+# fmod.m4 serial 5
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -60,6 +60,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_fmod_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_fmod_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_fmod_ieee="guessing no" ;;
esac
diff --git a/m4/fmodf.m4 b/m4/fmodf.m4
index 99944dae1a..fb5c88eabb 100644
--- a/m4/fmodf.m4
+++ b/m4/fmodf.m4
@@ -1,4 +1,4 @@
-# fmodf.m4 serial 6
+# fmodf.m4 serial 7
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -61,6 +61,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_fmodf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_fmodf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_fmodf_ieee="guessing no" ;;
esac
diff --git a/m4/fmodl.m4 b/m4/fmodl.m4
index 74e60b072c..110ba8fed0 100644
--- a/m4/fmodl.m4
+++ b/m4/fmodl.m4
@@ -1,4 +1,4 @@
-# fmodl.m4 serial 6
+# fmodl.m4 serial 7
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_fmodl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_fmodl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_fmodl_ieee="guessing no" ;;
esac
diff --git a/m4/frexp.m4 b/m4/frexp.m4
index 73f50b3e35..425765be92 100644
--- a/m4/frexp.m4
+++ b/m4/frexp.m4
@@ -1,4 +1,4 @@
-# frexp.m4 serial 15
+# frexp.m4 serial 16
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -164,8 +164,17 @@ int main()
[gl_cv_func_frexp_works=yes],
[gl_cv_func_frexp_works=no],
[case "$host_os" in
- netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
- *) gl_cv_func_frexp_works="guessing yes";;
+ netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
+ mingw*) # Guess yes with MSVC, no with mingw.
+ AC_EGREP_CPP([Good], [
+#ifdef _MSC_VER
+ Good
+#endif
+ ],
+ [gl_cv_func_frexp_works="guessing yes"],
+ [gl_cv_func_frexp_works="guessing no"])
+ ;;
+ *) gl_cv_func_frexp_works="guessing yes" ;;
esac
])
])
diff --git a/m4/frexpf.m4 b/m4/frexpf.m4
index 1e35fdd4e9..9b7842537d 100644
--- a/m4/frexpf.m4
+++ b/m4/frexpf.m4
@@ -1,4 +1,4 @@
-# frexpf.m4 serial 5
+# frexpf.m4 serial 6
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -88,8 +88,17 @@ int main()
[gl_cv_func_frexpf_works=yes],
[gl_cv_func_frexpf_works=no],
[case "$host_os" in
- irix* | mingw*) gl_cv_func_frexpf_works="guessing no";;
- *) gl_cv_func_frexpf_works="guessing yes";;
+ irix*) gl_cv_func_frexpf_works="guessing no" ;;
+ mingw*) # Guess yes with MSVC, no with mingw.
+ AC_EGREP_CPP([Good], [
+#ifdef _MSC_VER
+ Good
+#endif
+ ],
+ [gl_cv_func_frexpf_works="guessing yes"],
+ [gl_cv_func_frexpf_works="guessing no"])
+ ;;
+ *) gl_cv_func_frexpf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/ftello.m4 b/m4/ftello.m4
index 8a4cdc5308..cce13ae4bd 100644
--- a/m4/ftello.m4
+++ b/m4/ftello.m4
@@ -1,4 +1,4 @@
-# ftello.m4 serial 12
+# ftello.m4 serial 13
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -53,6 +53,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on Solaris.
solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ftello_works="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_ftello_works="guessing yes" ;;
esac
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 8ee206eea2..efa114dfaf 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 23
+# serial 24
# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac
diff --git a/m4/hypot.m4 b/m4/hypot.m4
index d5bc7f3e85..0684792911 100644
--- a/m4/hypot.m4
+++ b/m4/hypot.m4
@@ -1,4 +1,4 @@
-# hypot.m4 serial 4
+# hypot.m4 serial 5
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -57,6 +57,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_hypot_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_hypot_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_hypot_ieee="guessing no" ;;
esac
diff --git a/m4/hypotf.m4 b/m4/hypotf.m4
index 2876739209..d012cd822f 100644
--- a/m4/hypotf.m4
+++ b/m4/hypotf.m4
@@ -1,4 +1,4 @@
-# hypotf.m4 serial 5
+# hypotf.m4 serial 6
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -73,6 +73,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_hypotf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_hypotf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_hypotf_ieee="guessing no" ;;
esac
@@ -139,8 +141,10 @@ int main ()
[gl_cv_func_hypotf_works=yes],
[gl_cv_func_hypotf_works=no],
[case "$host_os" in
- netbsd* | openbsd*) gl_cv_func_hypotf_works="guessing no";;
- *) gl_cv_func_hypotf_works="guessing yes";;
+ netbsd* | openbsd*) gl_cv_func_hypotf_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_hypotf_works="guessing yes" ;;
+ *) gl_cv_func_hypotf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/hypotl.m4 b/m4/hypotl.m4
index ec39707505..64f7af21cf 100644
--- a/m4/hypotl.m4
+++ b/m4/hypotl.m4
@@ -1,4 +1,4 @@
-# hypotl.m4 serial 6
+# hypotl.m4 serial 7
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -73,6 +73,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_hypotl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_hypotl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_hypotl_ieee="guessing no" ;;
esac
@@ -172,8 +174,10 @@ int main ()
[gl_cv_func_hypotl_works=yes],
[gl_cv_func_hypotl_works=no],
[case "$host_os" in
- openbsd*) gl_cv_func_hypotl_works="guessing no";;
- *) gl_cv_func_hypotl_works="guessing yes";;
+ openbsd*) gl_cv_func_hypotl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_hypotl_works="guessing yes" ;;
+ *) gl_cv_func_hypotl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/ilogb.m4 b/m4/ilogb.m4
index 07639ccb51..1d56ecbf44 100644
--- a/m4/ilogb.m4
+++ b/m4/ilogb.m4
@@ -1,4 +1,4 @@
-# ilogb.m4 serial 1
+# ilogb.m4 serial 2
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -104,8 +104,10 @@ int main (int argc, char *argv[])
[gl_cv_func_ilogb_works=no],
[case "$host_os" in
aix* | openbsd* | netbsd* | solaris*)
- gl_cv_func_ilogb_works="guessing no";;
- *) gl_cv_func_ilogb_works="guessing yes";;
+ gl_cv_func_ilogb_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ilogb_works="guessing yes" ;;
+ *) gl_cv_func_ilogb_works="guessing yes" ;;
esac
])
])
diff --git a/m4/ilogbf.m4 b/m4/ilogbf.m4
index db539021d7..4e16e07aab 100644
--- a/m4/ilogbf.m4
+++ b/m4/ilogbf.m4
@@ -1,4 +1,4 @@
-# ilogbf.m4 serial 1
+# ilogbf.m4 serial 2
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -99,8 +99,11 @@ int main (int argc, char *argv[])
[gl_cv_func_ilogbf_works=yes],
[gl_cv_func_ilogbf_works=no],
[case "$host_os" in
- openbsd* | netbsd*) gl_cv_func_ilogbf_works="guessing no";;
- *) gl_cv_func_ilogbf_works="guessing yes";;
+ openbsd* | netbsd*)
+ gl_cv_func_ilogbf_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ilogbf_works="guessing yes" ;;
+ *) gl_cv_func_ilogbf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/isfinite.m4 b/m4/isfinite.m4
index fab12be863..09bb8cbaec 100644
--- a/m4/isfinite.m4
+++ b/m4/isfinite.m4
@@ -1,4 +1,4 @@
-# isfinite.m4 serial 15
+# isfinite.m4 serial 16
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -143,7 +143,14 @@ int main ()
#endif
return result;
-}]])], [gl_cv_func_isfinitel_works=yes], [gl_cv_func_isfinitel_works=no],
- [gl_cv_func_isfinitel_works="guessing yes"])
+}]])],
+ [gl_cv_func_isfinitel_works=yes],
+ [gl_cv_func_isfinitel_works=no],
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_isfinitel_works="guessing no" ;;
+ *) gl_cv_func_isfinitel_works="guessing yes" ;;
+ esac
+ ])
])
])
diff --git a/m4/isinf.m4 b/m4/isinf.m4
index 146529d9d1..92cbb271f0 100644
--- a/m4/isinf.m4
+++ b/m4/isinf.m4
@@ -1,4 +1,4 @@
-# isinf.m4 serial 11
+# isinf.m4 serial 12
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -150,7 +150,23 @@ int main ()
#endif
return result;
-}]])], [gl_cv_func_isinfl_works=yes], [gl_cv_func_isinfl_works=no],
- [gl_cv_func_isinfl_works="guessing yes"])
+}]])],
+ [gl_cv_func_isinfl_works=yes],
+ [gl_cv_func_isinfl_works=no],
+ [case "$host_os" in
+ mingw*) # Guess yes on mingw, no on MSVC.
+ AC_EGREP_CPP([Known], [
+#ifdef __MINGW32__
+ Known
+#endif
+ ],
+ [gl_cv_func_isinfl_works="guessing yes"],
+ [gl_cv_func_isinfl_works="guessing no"])
+ ;;
+ *)
+ gl_cv_func_isinfl_works="guessing yes"
+ ;;
+ esac
+ ])
])
])
diff --git a/m4/isnanf.m4 b/m4/isnanf.m4
index 1a0d03e636..856234ab8f 100644
--- a/m4/isnanf.m4
+++ b/m4/isnanf.m4
@@ -1,4 +1,4 @@
-# isnanf.m4 serial 14
+# isnanf.m4 serial 15
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -180,8 +180,17 @@ int main()
[gl_cv_func_isnanf_works=yes],
[gl_cv_func_isnanf_works=no],
[case "$host_os" in
- irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
- *) gl_cv_func_isnanf_works="guessing yes";;
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
+ mingw*) # Guess yes on mingw, no on MSVC.
+ AC_EGREP_CPP([Known], [
+#ifdef __MINGW32__
+ Known
+#endif
+ ],
+ [gl_cv_func_isnanf_works="guessing yes"],
+ [gl_cv_func_isnanf_works="guessing no"])
+ ;;
+ *) gl_cv_func_isnanf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/isnanl.m4 b/m4/isnanl.m4
index a42cfc0753..9578d2d2df 100644
--- a/m4/isnanl.m4
+++ b/m4/isnanl.m4
@@ -1,4 +1,4 @@
-# isnanl.m4 serial 19
+# isnanl.m4 serial 20
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -231,6 +231,18 @@ int main ()
}]])],
[gl_cv_func_isnanl_works=yes],
[gl_cv_func_isnanl_works=no],
- [gl_cv_func_isnanl_works="guessing yes"])
+ [case "$host_os" in
+ mingw*) # Guess yes on mingw, no on MSVC.
+ AC_EGREP_CPP([Known], [
+#ifdef __MINGW32__
+ Known
+#endif
+ ],
+ [gl_cv_func_isnanl_works="guessing yes"],
+ [gl_cv_func_isnanl_works="guessing no"])
+ ;;
+ *) gl_cv_func_isnanl_works="guessing yes" ;;
+ esac
+ ])
])
])
diff --git a/m4/ldexpl.m4 b/m4/ldexpl.m4
index 0bffca1e92..5989b9939a 100644
--- a/m4/ldexpl.m4
+++ b/m4/ldexpl.m4
@@ -1,4 +1,4 @@
-# ldexpl.m4 serial 16
+# ldexpl.m4 serial 17
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -124,8 +124,10 @@ int main()
[
changequote(,)dnl
case "$host_os" in
- aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
- *) gl_cv_func_ldexpl_works="guessing yes";;
+ aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
+ *) gl_cv_func_ldexpl_works="guessing yes" ;;
esac
changequote([,])dnl
])
diff --git a/m4/log.m4 b/m4/log.m4
index 90dee2403a..200c0571d1 100644
--- a/m4/log.m4
+++ b/m4/log.m4
@@ -1,4 +1,4 @@
-# log.m4 serial 4
+# log.m4 serial 5
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -60,6 +60,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log_ieee="guessing no" ;;
esac
@@ -99,8 +101,10 @@ int main ()
[gl_cv_func_log_works=yes],
[gl_cv_func_log_works=no],
[case "$host_os" in
- osf*) gl_cv_func_log_works="guessing no";;
- *) gl_cv_func_log_works="guessing yes";;
+ osf*) gl_cv_func_log_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log_works="guessing yes" ;;
+ *) gl_cv_func_log_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log10.m4 b/m4/log10.m4
index ff5be88f39..8b1a34211d 100644
--- a/m4/log10.m4
+++ b/m4/log10.m4
@@ -1,4 +1,4 @@
-# log10.m4 serial 4
+# log10.m4 serial 5
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -60,6 +60,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log10_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log10_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log10_ieee="guessing no" ;;
esac
@@ -99,8 +101,10 @@ int main ()
[gl_cv_func_log10_works=yes],
[gl_cv_func_log10_works=no],
[case "$host_os" in
- osf*) gl_cv_func_log10_works="guessing no";;
- *) gl_cv_func_log10_works="guessing yes";;
+ osf*) gl_cv_func_log10_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log10_works="guessing yes" ;;
+ *) gl_cv_func_log10_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log10f.m4 b/m4/log10f.m4
index 95154f6a24..699e3a1592 100644
--- a/m4/log10f.m4
+++ b/m4/log10f.m4
@@ -1,4 +1,4 @@
-# log10f.m4 serial 7
+# log10f.m4 serial 8
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -70,6 +70,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log10f_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log10f_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log10f_ieee="guessing no" ;;
esac
@@ -123,8 +125,10 @@ int main ()
[gl_cv_func_log10f_works=yes],
[gl_cv_func_log10f_works=no],
[case "$host_os" in
- osf*) gl_cv_func_log10f_works="guessing no";;
- *) gl_cv_func_log10f_works="guessing yes";;
+ osf*) gl_cv_func_log10f_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log10f_works="guessing yes" ;;
+ *) gl_cv_func_log10f_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log10l.m4 b/m4/log10l.m4
index be9e43962e..999910212a 100644
--- a/m4/log10l.m4
+++ b/m4/log10l.m4
@@ -1,4 +1,4 @@
-# log10l.m4 serial 4
+# log10l.m4 serial 5
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -94,8 +94,10 @@ int main ()
[gl_cv_func_log10l_works=yes],
[gl_cv_func_log10l_works=no],
[case "$host_os" in
- aix* | irix* | osf*) gl_cv_func_log10l_works="guessing no";;
- *) gl_cv_func_log10l_works="guessing yes";;
+ aix* | irix* | osf*) gl_cv_func_log10l_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log10l_works="guessing yes" ;;
+ *) gl_cv_func_log10l_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log1p.m4 b/m4/log1p.m4
index f55ac549ee..ae8fc53e62 100644
--- a/m4/log1p.m4
+++ b/m4/log1p.m4
@@ -1,4 +1,4 @@
-# log1p.m4 serial 3
+# log1p.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -54,6 +54,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log1p_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log1p_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log1p_ieee="guessing no" ;;
esac
diff --git a/m4/log1pf.m4 b/m4/log1pf.m4
index 0a47c19a94..8c8a714d09 100644
--- a/m4/log1pf.m4
+++ b/m4/log1pf.m4
@@ -1,4 +1,4 @@
-# log1pf.m4 serial 3
+# log1pf.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -63,6 +63,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log1pf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log1pf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log1pf_ieee="guessing no" ;;
esac
@@ -110,8 +112,10 @@ int main ()
[gl_cv_func_log1pf_works=yes],
[gl_cv_func_log1pf_works=no],
[case "$host_os" in
- irix*) gl_cv_func_log1pf_works="guessing no";;
- *) gl_cv_func_log1pf_works="guessing yes";;
+ irix*) gl_cv_func_log1pf_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log1pf_works="guessing yes" ;;
+ *) gl_cv_func_log1pf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log1pl.m4 b/m4/log1pl.m4
index 92d1a9e538..519507f44f 100644
--- a/m4/log1pl.m4
+++ b/m4/log1pl.m4
@@ -1,4 +1,4 @@
-# log1pl.m4 serial 3
+# log1pl.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -54,6 +54,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log1pl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log1pl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log1pl_ieee="guessing no" ;;
esac
diff --git a/m4/log2.m4 b/m4/log2.m4
index ecda18e840..d7e6d3a6e8 100644
--- a/m4/log2.m4
+++ b/m4/log2.m4
@@ -1,4 +1,4 @@
-# log2.m4 serial 3
+# log2.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -81,6 +81,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log2_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log2_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log2_ieee="guessing no" ;;
esac
@@ -161,8 +163,10 @@ int main ()
[gl_cv_func_log2_works=yes],
[gl_cv_func_log2_works=no],
[case "$host_os" in
- cygwin* | osf*) gl_cv_func_log2_works="guessing no";;
- *) gl_cv_func_log2_works="guessing yes";;
+ cygwin* | osf*) gl_cv_func_log2_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log2_works="guessing yes" ;;
+ *) gl_cv_func_log2_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log2f.m4 b/m4/log2f.m4
index 1743d3c41a..e65db5455c 100644
--- a/m4/log2f.m4
+++ b/m4/log2f.m4
@@ -1,4 +1,4 @@
-# log2f.m4 serial 3
+# log2f.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -82,6 +82,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log2f_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log2f_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log2f_ieee="guessing no" ;;
esac
@@ -168,8 +170,10 @@ int main ()
[gl_cv_func_log2f_works=yes],
[gl_cv_func_log2f_works=no],
[case "$host_os" in
- cygwin* | osf*) gl_cv_func_log2f_works="guessing no";;
- *) gl_cv_func_log2f_works="guessing yes";;
+ cygwin* | osf*) gl_cv_func_log2f_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log2f_works="guessing yes" ;;
+ *) gl_cv_func_log2f_works="guessing yes" ;;
esac
])
])
diff --git a/m4/log2l.m4 b/m4/log2l.m4
index 1497d91f92..fad929548e 100644
--- a/m4/log2l.m4
+++ b/m4/log2l.m4
@@ -1,4 +1,4 @@
-# log2l.m4 serial 1
+# log2l.m4 serial 2
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -100,8 +100,10 @@ int main ()
[gl_cv_func_log2l_works=yes],
[gl_cv_func_log2l_works=no],
[case "$host_os" in
- osf*) gl_cv_func_log2l_works="guessing no";;
- *) gl_cv_func_log2l_works="guessing yes";;
+ osf*) gl_cv_func_log2l_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_log2l_works="guessing yes" ;;
+ *) gl_cv_func_log2l_works="guessing yes" ;;
esac
])
])
diff --git a/m4/logb.m4 b/m4/logb.m4
index 1e0fb30982..1f6a7deb90 100644
--- a/m4/logb.m4
+++ b/m4/logb.m4
@@ -1,4 +1,4 @@
-# logb.m4 serial 6
+# logb.m4 serial 7
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -117,8 +117,17 @@ int main ()
[gl_cv_func_logb_works=yes],
[gl_cv_func_logb_works=no],
[case "$host_os" in
- *gnu* | solaris* | cygwin*) gl_cv_func_logb_works="guessing no";;
- *) gl_cv_func_logb_works="guessing yes";;
+ *gnu* | solaris* | cygwin*) gl_cv_func_logb_works="guessing no" ;;
+ mingw*) # Guess yes on MSVC, no on mingw.
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_logb_works="guessing yes"],
+ [gl_cv_func_logb_works="guessing no"])
+ ;;
+ *) gl_cv_func_logb_works="guessing yes" ;;
esac
])
])
diff --git a/m4/logbf.m4 b/m4/logbf.m4
index 6423644d14..7913dbad1b 100644
--- a/m4/logbf.m4
+++ b/m4/logbf.m4
@@ -1,4 +1,4 @@
-# logbf.m4 serial 1
+# logbf.m4 serial 2
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -73,8 +73,17 @@ int main ()
[gl_cv_func_logbf_works=yes],
[gl_cv_func_logbf_works=no],
[case "$host_os" in
- *gnu* | solaris*) gl_cv_func_logbf_works="guessing no";;
- *) gl_cv_func_logbf_works="guessing yes";;
+ *gnu* | solaris*) gl_cv_func_logbf_works="guessing no" ;;
+ mingw*) # Guess yes on MSVC, no on mingw.
+ AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_logbf_works="guessing yes"],
+ [gl_cv_func_logbf_works="guessing no"])
+ ;;
+ *) gl_cv_func_logbf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/logbl.m4 b/m4/logbl.m4
index 5e236f5de6..42e04f5234 100644
--- a/m4/logbl.m4
+++ b/m4/logbl.m4
@@ -1,4 +1,4 @@
-# logbl.m4 serial 3
+# logbl.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -107,8 +107,10 @@ int main ()
[gl_cv_func_logbl_works=yes],
[gl_cv_func_logbl_works=no],
[case "$host_os" in
- *gnu* | solaris*) gl_cv_func_logbl_works="guessing no";;
- *) gl_cv_func_logbl_works="guessing yes";;
+ *gnu* | solaris*) gl_cv_func_logbl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_logbl_works="guessing yes" ;;
+ *) gl_cv_func_logbl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/logf.m4 b/m4/logf.m4
index d4dcfb0b54..096c679fb2 100644
--- a/m4/logf.m4
+++ b/m4/logf.m4
@@ -1,4 +1,4 @@
-# logf.m4 serial 7
+# logf.m4 serial 8
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -70,6 +70,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_logf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_logf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_logf_ieee="guessing no" ;;
esac
@@ -123,8 +125,10 @@ int main ()
[gl_cv_func_logf_works=yes],
[gl_cv_func_logf_works=no],
[case "$host_os" in
- osf*) gl_cv_func_logf_works="guessing no";;
- *) gl_cv_func_logf_works="guessing yes";;
+ osf*) gl_cv_func_logf_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_logf_works="guessing yes" ;;
+ *) gl_cv_func_logf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/logl.m4 b/m4/logl.m4
index 4d1580daba..b12bfb0580 100644
--- a/m4/logl.m4
+++ b/m4/logl.m4
@@ -1,4 +1,4 @@
-# logl.m4 serial 9
+# logl.m4 serial 10
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -126,8 +126,10 @@ int main ()
[gl_cv_func_logl_works=yes],
[gl_cv_func_logl_works=no],
[case "$host_os" in
- osf*) gl_cv_func_logl_works="guessing no";;
- *) gl_cv_func_logl_works="guessing yes";;
+ osf*) gl_cv_func_logl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_logl_works="guessing yes" ;;
+ *) gl_cv_func_logl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 931f3b2727..0b6e5d70cb 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 28
+# serial 29
# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc.
#
@@ -55,6 +55,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
*-gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ mingw*)
+ # Guess no on native Windows.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
# If we don't know, assume the worst.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 4982b4bf9e..216594eb94 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 28 -*- coding: utf-8 -*-
+# mbrtowc.m4 serial 29 -*- coding: utf-8 -*-
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -563,9 +563,11 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and glibc systems.
+ # Guess no on AIX and glibc systems.
aix* | *-gnu*)
gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
changequote([,])dnl
@@ -592,6 +594,7 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
[gl_cv_C_locale_sans_EILSEQ],
[
@@ -622,7 +625,12 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
]])],
[gl_cv_C_locale_sans_EILSEQ=yes],
[gl_cv_C_locale_sans_EILSEQ=no],
- [:])])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+ ])
+ ])
])
# Prerequisites of lib/mbrtowc.c.
diff --git a/m4/mkdir.m4 b/m4/mkdir.m4
index 5eec622eff..fa15b15789 100644
--- a/m4/mkdir.m4
+++ b/m4/mkdir.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
# Copyright (C) 2001, 2003-2004, 2006, 2008-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -25,6 +25,15 @@ AC_DEFUN([gl_FUNC_MKDIR],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
esac
@@ -51,6 +60,8 @@ AC_DEFUN([gl_FUNC_MKDIR],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
esac
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
index 31b9b8bb67..82f02864f3 100644
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 23
+#serial 24
# Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -59,6 +59,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_working_mkstemp="guessing no" ;;
esac
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 31da65e8b2..85666844e2 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 28
+# serial 29
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -25,6 +25,7 @@ dnl Test whether mktime works. Set gl_cv_func_working_mktime.
AC_DEFUN([gl_FUNC_MKTIME_WORKS],
[
AC_REQUIRE([gl_TIME_T_IS_SIGNED])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained
dnl in Autoconf and because it invokes AC_LIBOBJ.
@@ -239,7 +240,12 @@ main ()
}]])],
[gl_cv_func_working_mktime=yes],
[gl_cv_func_working_mktime=no],
- [gl_cv_func_working_mktime="guessing no"])
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_working_mktime="guessing no" ;;
+ *) gl_cv_func_working_mktime="guessing no" ;;
+ esac
+ ])
])
])
diff --git a/m4/modf.m4 b/m4/modf.m4
index 8a6f708e8b..7cb8c3d60f 100644
--- a/m4/modf.m4
+++ b/m4/modf.m4
@@ -1,4 +1,4 @@
-# modf.m4 serial 3
+# modf.m4 serial 4
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -63,6 +63,15 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_modf_ieee="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_modf_ieee="guessing yes"],
+ [gl_cv_func_modf_ieee="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_modf_ieee="guessing no" ;;
esac
diff --git a/m4/modff.m4 b/m4/modff.m4
index b461018299..e32d5372eb 100644
--- a/m4/modff.m4
+++ b/m4/modff.m4
@@ -1,4 +1,4 @@
-# modff.m4 serial 5
+# modff.m4 serial 6
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -71,6 +71,15 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_modff_ieee="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_modff_ieee="guessing yes"],
+ [gl_cv_func_modff_ieee="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_modff_ieee="guessing no" ;;
esac
diff --git a/m4/modfl.m4 b/m4/modfl.m4
index 1cba70f6d1..152109f77a 100644
--- a/m4/modfl.m4
+++ b/m4/modfl.m4
@@ -1,4 +1,4 @@
-# modfl.m4 serial 3
+# modfl.m4 serial 4
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -65,6 +65,15 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_modfl_ieee="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_modfl_ieee="guessing yes"],
+ [gl_cv_func_modfl_ieee="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_modfl_ieee="guessing no" ;;
esac
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index 5590696b4f..aa1ea9cbbd 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-# serial 36
+# serial 37
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@@ -106,6 +106,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
[case "$host_os" in dnl ((
linux*) # Guess it halfway works when the kernel is Linux.
gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
+ mingw*) # Guess no on native Windows.
+ gl_cv_func_nanosleep='guessing no' ;;
*) # If we don't know, assume the worst.
gl_cv_func_nanosleep='guessing no' ;;
esac
diff --git a/m4/perror.m4 b/m4/perror.m4
index 752cb44be1..ea3cdc74a7 100644
--- a/m4/perror.m4
+++ b/m4/perror.m4
@@ -1,4 +1,4 @@
-# perror.m4 serial 6
+# perror.m4 serial 7
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,7 @@ AC_DEFUN([gl_FUNC_PERROR],
AC_REQUIRE([gl_HEADER_ERRNO_H])
AC_REQUIRE([gl_FUNC_STRERROR_R])
AC_REQUIRE([gl_FUNC_STRERROR_0])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
dnl since on glibc systems, strerror_r is replaced only for signature
dnl issues, and perror is just fine. Rather, we only want to
@@ -46,13 +47,18 @@ AC_DEFUN([gl_FUNC_PERROR],
fi
rm -rf conftest.txt1 conftest.txt2],
[gl_cv_func_perror_works=no],
- [dnl Guess no when cross-compiling.
- gl_cv_func_perror_works="guessing no"
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_perror_works="guessing yes" ;;
+ # Otherwise guess no.
+ *) gl_cv_func_perror_works="guessing no" ;;
+ esac
])
])
- if test "$gl_cv_func_perror_works" != yes; then
- REPLACE_PERROR=1
- fi
+ case "$gl_cv_func_perror_works" in
+ *yes) ;;
+ *) REPLACE_PERROR=1 ;;
+ esac
;;
*)
dnl The system's perror() probably inherits the bugs in the
diff --git a/m4/popen.m4 b/m4/popen.m4
index 101e924db0..d6138a1885 100644
--- a/m4/popen.m4
+++ b/m4/popen.m4
@@ -1,4 +1,4 @@
-# popen.m4 serial 5
+# popen.m4 serial 6
dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_POPEN],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([popen])
if test $ac_cv_func_popen = no; then
HAVE_POPEN=0
@@ -30,12 +31,19 @@ AC_DEFUN([gl_FUNC_POPEN],
]])],
[gl_cv_func_popen_works=yes],
[gl_cv_func_popen_works=no],
- dnl For now, only cygwin 1.5 or older is known to be broken.
- [gl_cv_func_popen_works='guessing yes'])
+ [case "$host_os" in
+ # For now, only cygwin 1.5 or older is known to be broken.
+ cygwin*) gl_cv_func_popen_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_popen_works="guessing yes" ;;
+ *) gl_cv_func_popen_works="guessing yes" ;;
+ esac
+ ])
])
- if test "$gl_cv_func_popen_works" = no; then
- REPLACE_POPEN=1
- fi
+ case "$gl_cv_func_popen_works" in
+ *yes) ;;
+ *) REPLACE_POPEN=1 ;;
+ esac
fi
])
diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4
index 7bc38ba33d..40131dcddf 100644
--- a/m4/posix_spawn.m4
+++ b/m4/posix_spawn.m4
@@ -1,4 +1,4 @@
-# posix_spawn.m4 serial 11
+# posix_spawn.m4 serial 12
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -430,8 +430,10 @@ int main ()
[gl_cv_func_posix_spawn_file_actions_addclose_works=no],
[# Guess no on Solaris, yes otherwise.
case "$host_os" in
- solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
- *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
+ solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
+ *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
esac
])
])
@@ -472,6 +474,8 @@ int main ()
[# Guess no on Solaris, yes otherwise.
case "$host_os" in
solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
esac
])
@@ -515,6 +519,8 @@ int main ()
[# Guess no on Solaris, yes otherwise.
case "$host_os" in
solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
esac
])
diff --git a/m4/printf.m4 b/m4/printf.m4
index 37c9a3c576..d3ee2531de 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 54
+# printf.m4 serial 55
dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -58,8 +58,8 @@ int main ()
[gl_cv_func_printf_sizes_c99=yes],
[gl_cv_func_printf_sizes_c99=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
@@ -79,10 +79,19 @@ changequote(,)dnl
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
gl_cv_func_printf_sizes_c99="guessing no";;
netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_sizes_c99="guessing yes"],
+ [gl_cv_func_printf_sizes_c99="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_sizes_c99="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -122,14 +131,19 @@ int main ()
}]])],
[gl_cv_func_printf_long_double=yes],
[gl_cv_func_printf_long_double=no],
- [
-changequote(,)dnl
- case "$host_os" in
- beos*) gl_cv_func_printf_long_double="guessing no";;
- mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
- *) gl_cv_func_printf_long_double="guessing yes";;
+ [case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_long_double="guessing yes"],
+ [gl_cv_func_printf_long_double="guessing no"])
+ ;;
+ *) gl_cv_func_printf_long_double="guessing yes";;
esac
-changequote([,])dnl
])
])
])
@@ -217,8 +231,8 @@ int main ()
[gl_cv_func_printf_infinite=yes],
[gl_cv_func_printf_infinite=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
@@ -236,10 +250,19 @@ changequote(,)dnl
netbsd*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_printf_infinite="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_infinite="guessing yes"],
+ [gl_cv_func_printf_infinite="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_infinite="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -419,13 +442,12 @@ int main ()
}]])],
[gl_cv_func_printf_infinite_long_double=yes],
[gl_cv_func_printf_infinite_long_double=no],
- [
-changequote(,)dnl
- case "$host_cpu" in
+ [case "$host_cpu" in
# Guess no on ia64, x86_64, i386.
ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
*)
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
@@ -434,12 +456,21 @@ changequote(,)dnl
# Guess yes on HP-UX >= 11.
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_infinite_long_double="guessing yes"],
+ [gl_cv_func_printf_infinite_long_double="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_infinite_long_double="guessing no";;
esac
;;
esac
-changequote([,])dnl
])
])
;;
@@ -535,6 +566,8 @@ int main ()
[gl_cv_func_printf_directive_a="guessing yes"],
[gl_cv_func_printf_directive_a="guessing no"])
;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_directive_a="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_printf_directive_a="guessing no";;
esac
@@ -577,8 +610,8 @@ int main ()
[gl_cv_func_printf_directive_f=yes],
[gl_cv_func_printf_directive_f=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
@@ -590,10 +623,19 @@ changequote(,)dnl
# Guess yes on Solaris >= 2.10.
solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
solaris*) gl_cv_func_printf_directive_f="guessing no";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_directive_f="guessing yes"],
+ [gl_cv_func_printf_directive_f="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_directive_f="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -645,13 +687,11 @@ int main ()
}]])],
[gl_cv_func_printf_directive_n=yes],
[gl_cv_func_printf_directive_n=no],
- [
-changequote(,)dnl
- case "$host_os" in
+ [case "$host_os" in
+ # Guess no on native Windows.
mingw*) gl_cv_func_printf_directive_n="guessing no";;
*) gl_cv_func_printf_directive_n="guessing yes";;
esac
-changequote([,])dnl
])
])
])
@@ -726,12 +766,14 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
- irix*) gl_cv_func_printf_directive_ls="guessing no";;
- solaris*) gl_cv_func_printf_directive_ls="guessing no";;
- cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
- beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
- *) gl_cv_func_printf_directive_ls="guessing yes";;
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
esac
changequote([,])dnl
])
@@ -770,6 +812,7 @@ changequote(,)dnl
netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
gl_cv_func_printf_positions="guessing no";;
beos*) gl_cv_func_printf_positions="guessing no";;
+ # Guess no on native Windows.
mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
*) gl_cv_func_printf_positions="guessing yes";;
esac
@@ -808,6 +851,7 @@ changequote(,)dnl
case "$host_os" in
cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ # Guess no on native Windows.
mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
*) gl_cv_func_printf_flag_grouping="guessing yes";;
esac
@@ -850,6 +894,8 @@ changequote(,)dnl
hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
# Guess no on HP-UX 10 and older.
hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
# Guess yes otherwise.
*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
esac
@@ -893,6 +939,8 @@ changequote(,)dnl
*-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_flag_zero="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_printf_flag_zero="guessing no";;
esac
@@ -1160,6 +1208,8 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_truncation_c99="guessing no";;
esac
@@ -1223,9 +1273,8 @@ int main ()
}]])],
[gl_cv_func_snprintf_retval_c99=yes],
[gl_cv_func_snprintf_retval_c99=no],
- [
+ [case "$host_os" in
changequote(,)dnl
- case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
@@ -1250,10 +1299,19 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_snprintf_retval_c99="guessing yes"],
+ [gl_cv_func_snprintf_retval_c99="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_retval_c99="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -1333,6 +1391,8 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_directive_n="guessing no";;
esac
@@ -1349,6 +1409,7 @@ dnl Result is gl_cv_func_snprintf_size1.
AC_DEFUN([gl_SNPRINTF_SIZE1],
[
AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf respects a size of 1],
[gl_cv_func_snprintf_size1],
@@ -1378,7 +1439,12 @@ int main()
}]])],
[gl_cv_func_snprintf_size1=yes],
[gl_cv_func_snprintf_size1=no],
- [gl_cv_func_snprintf_size1="guessing yes"])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
+ *) gl_cv_func_snprintf_size1="guessing yes" ;;
+ esac
+ ])
])
])
@@ -1474,7 +1540,7 @@ changequote(,)dnl
netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on mingw.
+ # Guess yes on native Windows.
mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# If we don't know, assume the worst.
*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
diff --git a/m4/ptsname_r.m4 b/m4/ptsname_r.m4
index 687872c1f1..362e1003a9 100644
--- a/m4/ptsname_r.m4
+++ b/m4/ptsname_r.m4
@@ -1,4 +1,4 @@
-# ptsname_r.m4 serial 3
+# ptsname_r.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -68,10 +68,19 @@ AC_DEFUN([gl_PREREQ_PTSNAME_R], [
[gl_cv_func_isatty_sets_errno=yes],
[gl_cv_func_isatty_sets_errno=no],
[case "$host_os" in
- irix* | solaris* | mingw*)
- gl_cv_func_isatty_sets_errno="guessing no";;
+ irix* | solaris*)
+ gl_cv_func_isatty_sets_errno="guessing no" ;;
+ mingw*) # Guess yes on mingw, no on MSVC.
+ AC_EGREP_CPP([Known], [
+#ifdef __MINGW32__
+ Known
+#endif
+ ],
+ [gl_cv_func_isatty_sets_errno="guessing yes"],
+ [gl_cv_func_isatty_sets_errno="guessing no"])
+ ;;
*)
- gl_cv_func_isatty_sets_errno="guessing yes";;
+ gl_cv_func_isatty_sets_errno="guessing yes" ;;
esac
])
])
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index a8e3ab33dc..08ae41697a 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 20
+# putenv.m4 serial 21
dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_svid_putenv="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_svid_putenv="guessing no" ;;
esac
diff --git a/m4/regex.m4 b/m4/regex.m4
index 61ff09872b..23fe46a16c 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 66
+# serial 67
# Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc.
#
@@ -13,6 +13,7 @@ AC_PREREQ([2.50])
AC_DEFUN([gl_REGEX],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_ARG_WITH([included-regex],
[AS_HELP_STRING([--without-included-regex],
[don't compile regex; this is the default on systems
@@ -226,13 +227,19 @@ AC_DEFUN([gl_REGEX],
return result;
]])],
- [gl_cv_func_re_compile_pattern_working=yes],
- [gl_cv_func_re_compile_pattern_working=no],
- dnl When crosscompiling, assume it is not working.
- [gl_cv_func_re_compile_pattern_working=no])])
- case $gl_cv_func_re_compile_pattern_working in #(
- yes) ac_use_included_regex=no;; #(
- no) ac_use_included_regex=yes;;
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ # Otherwise, assume it is not working.
+ *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_re_compile_pattern_working" in #(
+ *yes) ac_use_included_regex=no;; #(
+ *no) ac_use_included_regex=yes;;
esac
;;
*) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
diff --git a/m4/remainder.m4 b/m4/remainder.m4
index 518cf68a5f..f9a9177513 100644
--- a/m4/remainder.m4
+++ b/m4/remainder.m4
@@ -1,4 +1,4 @@
-# remainder.m4 serial 4
+# remainder.m4 serial 5
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -94,6 +94,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_remainder_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_remainder_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_remainder_ieee="guessing no" ;;
esac
diff --git a/m4/remainderf.m4 b/m4/remainderf.m4
index 0ddbb3d5fb..fcce7b0808 100644
--- a/m4/remainderf.m4
+++ b/m4/remainderf.m4
@@ -1,4 +1,4 @@
-# remainderf.m4 serial 8
+# remainderf.m4 serial 9
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -97,6 +97,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_remainderf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_remainderf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_remainderf_ieee="guessing no" ;;
esac
@@ -184,8 +186,10 @@ int main ()
[gl_cv_func_remainderf_works=yes],
[gl_cv_func_remainderf_works=no],
[case "$host_os" in
- irix*) gl_cv_func_remainderf_works="guessing no";;
- *) gl_cv_func_remainderf_works="guessing yes";;
+ irix*) gl_cv_func_remainderf_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_remainderf_works="guessing yes" ;;
+ *) gl_cv_func_remainderf_works="guessing yes" ;;
esac
])
])
diff --git a/m4/remainderl.m4 b/m4/remainderl.m4
index 3c291e3b7f..294ec093d2 100644
--- a/m4/remainderl.m4
+++ b/m4/remainderl.m4
@@ -1,4 +1,4 @@
-# remainderl.m4 serial 7
+# remainderl.m4 serial 8
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -102,6 +102,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_remainderl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_remainderl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_remainderl_ieee="guessing no" ;;
esac
@@ -183,8 +185,10 @@ int main ()
[gl_cv_func_remainderl_works=yes],
[gl_cv_func_remainderl_works=no],
[case "$host_os" in
- openbsd*) gl_cv_func_remainderl_works="guessing no";;
- *) gl_cv_func_remainderl_works="guessing yes";;
+ openbsd*) gl_cv_func_remainderl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_remainderl_works="guessing yes" ;;
+ *) gl_cv_func_remainderl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/rename.m4 b/m4/rename.m4
index 7c3ffe7c28..9a3730735c 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,4 +1,4 @@
-# serial 26
+# serial 27
# Copyright (C) 2001, 2003, 2005-2006, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -57,6 +57,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
@@ -109,6 +111,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
@@ -158,6 +162,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_link_works="guessing no" ;;
esac
@@ -207,6 +213,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_dest_works="guessing no" ;;
esac
diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4
index 65fb8a88f9..8ed15462b6 100644
--- a/m4/rmdir-errno.m4
+++ b/m4/rmdir-errno.m4
@@ -1,4 +1,4 @@
-# serial 12
+# serial 13
# Copyright (C) 2000-2001, 2005-2006, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -12,6 +12,7 @@
# test runs a test to determine the actual numeric value.
AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
[dnl
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([for rmdir-not-empty errno value],
[gl_cv_func_rmdir_errno_not_empty],
@@ -39,11 +40,16 @@ AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
]])],
[gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`],
[gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4'],
- [gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY])
+ [case "$host_os" in
+ # Guess ENOTEMPTY = 41 on native Windows.
+ mingw*) gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY ;;
+ *) gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY ;;
+ esac
+ ])
]
)
AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY],
- $gl_cv_func_rmdir_errno_not_empty,
+ [$gl_cv_func_rmdir_errno_not_empty],
[the value to which errno is set when rmdir fails on a nonempty directory])
])
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
index f585c27697..37237d2afe 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 13
+# rmdir.m4 serial 14
dnl Copyright (C) 2002, 2005, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,6 +35,8 @@ AC_DEFUN([gl_FUNC_RMDIR],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rmdir_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rmdir_works="guessing no" ;;
esac
diff --git a/m4/round.m4 b/m4/round.m4
index ede34b29d6..d982e592cd 100644
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 17
+# round.m4 serial 18
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -60,8 +60,17 @@ int main()
return (x < 0.5 && round (x) != 0.0);
}]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
[case "$host_os" in
- netbsd* | aix*) gl_cv_func_round_works="guessing no";;
- *) gl_cv_func_round_works="guessing yes";;
+ netbsd* | aix*) gl_cv_func_round_works="guessing no" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_round_works="guessing yes"],
+ [gl_cv_func_round_works="guessing no"])
+ ;;
+ *) gl_cv_func_round_works="guessing yes" ;;
esac
])
LIBS="$save_LIBS"
@@ -106,6 +115,15 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_round_ieee="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_round_ieee="guessing yes"],
+ [gl_cv_func_round_ieee="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_round_ieee="guessing no" ;;
esac
diff --git a/m4/roundf.m4 b/m4/roundf.m4
index f623b554a7..0baacc9f51 100644
--- a/m4/roundf.m4
+++ b/m4/roundf.m4
@@ -1,4 +1,4 @@
-# roundf.m4 serial 18
+# roundf.m4 serial 19
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -57,8 +57,16 @@ int main()
return (x < 0.5f && roundf (x) != 0.0f);
}]])], [gl_cv_func_roundf_works=yes], [gl_cv_func_roundf_works=no],
[case "$host_os" in
- mingw*) gl_cv_func_roundf_works="guessing no";;
- *) gl_cv_func_roundf_works="guessing yes";;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_roundf_works="guessing yes"],
+ [gl_cv_func_roundf_works="guessing no"])
+ ;;
+ *) gl_cv_func_roundf_works="guessing yes" ;;
esac
])
LIBS="$save_LIBS"
@@ -107,6 +115,15 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_roundf_ieee="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_roundf_ieee="guessing yes"],
+ [gl_cv_func_roundf_ieee="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_roundf_ieee="guessing no" ;;
esac
diff --git a/m4/roundl.m4 b/m4/roundl.m4
index 7f8c03b747..47db26b9cc 100644
--- a/m4/roundl.m4
+++ b/m4/roundl.m4
@@ -1,4 +1,4 @@
-# roundl.m4 serial 15
+# roundl.m4 serial 16
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -66,6 +66,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_roundl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_roundl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_roundl_ieee="guessing no" ;;
esac
diff --git a/m4/signbit.m4 b/m4/signbit.m4
index f387ee91d6..db60ab724a 100644
--- a/m4/signbit.m4
+++ b/m4/signbit.m4
@@ -1,4 +1,4 @@
-# signbit.m4 serial 14
+# signbit.m4 serial 15
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_signbit="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_signbit="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_signbit="guessing no" ;;
esac
@@ -60,6 +62,13 @@ AC_DEFUN([gl_SIGNBIT],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
+ # Guess yes on mingw, no on MSVC.
+ mingw*) if test -n "$GCC"; then
+ gl_cv_func_signbit_gcc="guessing yes"
+ else
+ gl_cv_func_signbit_gcc="guessing no"
+ fi
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_signbit_gcc="guessing no" ;;
esac
diff --git a/m4/sleep.m4 b/m4/sleep.m4
index 2d92ea8e2d..e2d27be275 100644
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,4 +1,4 @@
-# sleep.m4 serial 7
+# sleep.m4 serial 8
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -48,6 +48,8 @@ handle_alarm (int sig)
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_sleep_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_sleep_works="guessing no" ;;
esac
diff --git a/m4/sqrtl.m4 b/m4/sqrtl.m4
index 1c2b0e11da..e114da89cb 100644
--- a/m4/sqrtl.m4
+++ b/m4/sqrtl.m4
@@ -1,4 +1,4 @@
-# sqrtl.m4 serial 9
+# sqrtl.m4 serial 10
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -154,8 +154,10 @@ int main ()
[gl_cv_func_sqrtl_works=yes],
[gl_cv_func_sqrtl_works=no],
[case "$host_os" in
- openbsd*) gl_cv_func_sqrtl_works="guessing no";;
- *) gl_cv_func_sqrtl_works="guessing yes";;
+ openbsd*) gl_cv_func_sqrtl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_sqrtl_works="guessing yes" ;;
+ *) gl_cv_func_sqrtl_works="guessing yes" ;;
esac
])
])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 4ac854d519..4bf3e47451 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 50
+# stdint.m4 serial 51
dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T])
@@ -288,8 +289,12 @@ static const char *macro_values[] =
]])],
[gl_cv_header_working_stdint_h=yes],
[],
- [dnl When cross-compiling, assume it works.
- gl_cv_header_working_stdint_h=yes
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # In general, assume it works.
+ *) gl_cv_header_working_stdint_h="guessing yes" ;;
+ esac
])
])
])
@@ -299,15 +304,16 @@ static const char *macro_values[] =
HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h
- if test "$gl_cv_header_working_stdint_h" = yes; then
- HAVE_C99_STDINT_H=1
- dnl Now see whether the system <stdint.h> works without
- dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
- AC_CACHE_CHECK([whether stdint.h predates C++11],
- [gl_cv_header_stdint_predates_cxx11_h],
- [gl_cv_header_stdint_predates_cxx11_h=yes
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
+ case "$gl_cv_header_working_stdint_h" in
+ *yes)
+ HAVE_C99_STDINT_H=1
+ dnl Now see whether the system <stdint.h> works without
+ dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+ AC_CACHE_CHECK([whether stdint.h predates C++11],
+ [gl_cv_header_stdint_predates_cxx11_h],
+ [gl_cv_header_stdint_predates_cxx11_h=yes
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
@@ -315,45 +321,47 @@ gl_STDINT_INCLUDES
[
intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);
- ]])],
- [gl_cv_header_stdint_predates_cxx11_h=no])])
+ ]])],
+ [gl_cv_header_stdint_predates_cxx11_h=no])])
- if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
- AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- AC_DEFINE([__STDC_LIMIT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- fi
- AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
- [gl_cv_header_stdint_width],
- [gl_cv_header_stdint_width=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- /* Work if build is not clean. */
- #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
- #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
- #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
- #endif
- #include <stdint.h>
- ]gl_STDINT_INCLUDES[
- int iw = UINTMAX_WIDTH;
- ]])],
- [gl_cv_header_stdint_width=yes])])
- if test "$gl_cv_header_stdint_width" = yes; then
- STDINT_H=
- fi
- else
- dnl Check for <sys/inttypes.h>, and for
- dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
- AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
- if test $ac_cv_header_sys_inttypes_h = yes; then
- HAVE_SYS_INTTYPES_H=1
- fi
- if test $ac_cv_header_sys_bitypes_h = yes; then
- HAVE_SYS_BITYPES_H=1
- fi
- gl_STDINT_TYPE_PROPERTIES
- fi
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+ AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ fi
+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+ [gl_cv_header_stdint_width],
+ [gl_cv_header_stdint_width=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
+ ]gl_STDINT_INCLUDES[
+ int iw = UINTMAX_WIDTH;
+ ]])],
+ [gl_cv_header_stdint_width=yes])])
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
+ ;;
+ *)
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ fi
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ fi
+ gl_STDINT_TYPE_PROPERTIES
+ ;;
+ esac
dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 460ddc9571..279efd60f6 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,4 +1,4 @@
-# strerror.m4 serial 17
+# strerror.m4 serial 18
dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -80,6 +80,8 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_strerror_0_works="guessing no" ;;
esac
diff --git a/m4/strncat.m4 b/m4/strncat.m4
index 27d15ee0a9..e77ecb38b7 100644
--- a/m4/strncat.m4
+++ b/m4/strncat.m4
@@ -1,4 +1,4 @@
-# strncat.m4 serial 2
+# strncat.m4 serial 3
dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -84,9 +84,11 @@ AC_DEFUN_ONCE([gl_FUNC_STRNCAT],
[
case "$host_os" in
# Guess no on Solaris.
- solaris*) gl_cv_func_strncat_works="guessing no";;
+ solaris*) gl_cv_func_strncat_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strncat_works="guessing yes" ;;
# Guess yes otherwise.
- *) gl_cv_func_strncat_works="guessing yes";;
+ *) gl_cv_func_strncat_works="guessing yes" ;;
esac
])
])
diff --git a/m4/strtod.m4 b/m4/strtod.m4
index ca12cd5278..cad57993df 100644
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -1,4 +1,4 @@
-# strtod.m4 serial 22
+# strtod.m4 serial 23
dnl Copyright (C) 2002-2003, 2006-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOD],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
m4_ifdef([gl_FUNC_STRTOD_OBSOLETE], [
dnl Test whether strtod is declared.
dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess
@@ -113,7 +114,14 @@ numeric_equal (double x, double y)
#endif
],
[gl_cv_func_strtod_works="guessing yes"],
- [gl_cv_func_strtod_works="guessing no"])])])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strtod_works="guessing yes" ;;
+ *) gl_cv_func_strtod_works="guessing no" ;;
+ esac
+ ])
+ ])
+ ])
case "$gl_cv_func_strtod_works" in
*yes) ;;
*)
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index f0586f1a80..61809c8b5d 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,4 +1,4 @@
-# strtoimax.m4 serial 14
+# strtoimax.m4 serial 15
dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -61,10 +61,12 @@ int main ()
[gl_cv_func_strtoimax=yes],
[gl_cv_func_strtoimax=no],
[case "$host_os" in
- # Guess no on AIX 5.
- aix5*) gl_cv_func_strtoimax="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_strtoimax="guessing yes" ;;
+ # Guess no on AIX 5.
+ aix5*) gl_cv_func_strtoimax="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strtoimax="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_strtoimax="guessing yes" ;;
esac
])
])
diff --git a/m4/strtok_r.m4 b/m4/strtok_r.m4
index cb551cc61d..65c2148c45 100644
--- a/m4/strtok_r.m4
+++ b/m4/strtok_r.m4
@@ -1,4 +1,4 @@
-# strtok_r.m4 serial 13
+# strtok_r.m4 serial 14
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -41,14 +41,13 @@ AC_DEFUN([gl_FUNC_STRTOK_R],
],
[gl_cv_func_strtok_r_works=yes],
[gl_cv_func_strtok_r_works=no],
- [
-changequote(,)dnl
- case "$host_os" in
+ [case "$host_os" in
# Guess no on glibc systems.
- *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
- *) gl_cv_func_strtok_r_works="guessing yes";;
+ *-gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
+ *) gl_cv_func_strtok_r_works="guessing yes" ;;
esac
-changequote([,])dnl
])
])
case "$gl_cv_func_strtok_r_works" in
diff --git a/m4/trunc.m4 b/m4/trunc.m4
index a070d78285..f13bb3c7ec 100644
--- a/m4/trunc.m4
+++ b/m4/trunc.m4
@@ -1,4 +1,4 @@
-# trunc.m4 serial 9
+# trunc.m4 serial 10
dnl Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_trunc_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_trunc_ieee="guessing no" ;;
esac
diff --git a/m4/truncf.m4 b/m4/truncf.m4
index 83eaf0be3c..fd29ea389b 100644
--- a/m4/truncf.m4
+++ b/m4/truncf.m4
@@ -1,4 +1,4 @@
-# truncf.m4 serial 9
+# truncf.m4 serial 10
dnl Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_truncf_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_truncf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_truncf_ieee="guessing no" ;;
esac
diff --git a/m4/truncl.m4 b/m4/truncl.m4
index 37d2b717c5..5fd0411c18 100644
--- a/m4/truncl.m4
+++ b/m4/truncl.m4
@@ -1,4 +1,4 @@
-# truncl.m4 serial 11
+# truncl.m4 serial 12
dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -62,8 +62,10 @@ int main()
[gl_cv_func_truncl_works=yes],
[gl_cv_func_truncl_works=no],
[case "$host_os" in
- osf4*) gl_cv_func_truncl_works="guessing no";;
- *) gl_cv_func_truncl_works="guessing yes";;
+ osf4*) gl_cv_func_truncl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_truncl_works="guessing yes" ;;
+ *) gl_cv_func_truncl_works="guessing yes" ;;
esac
])
])
@@ -103,6 +105,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_truncl_ieee="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_truncl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_truncl_ieee="guessing no" ;;
esac
diff --git a/m4/tsearch.m4 b/m4/tsearch.m4
index 24b35ce2d0..8e45124c75 100644
--- a/m4/tsearch.m4
+++ b/m4/tsearch.m4
@@ -1,4 +1,4 @@
-# tsearch.m4 serial 6
+# tsearch.m4 serial 7
dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -38,8 +38,10 @@ main ()
return result;
}]])], [gl_cv_func_tdelete_works=yes], [gl_cv_func_tdelete_works=no],
[case "$host_os" in
- openbsd*) gl_cv_func_tdelete_works="guessing no";;
- *) gl_cv_func_tdelete_works="guessing yes";;
+ openbsd*) gl_cv_func_tdelete_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_tdelete_works="guessing yes" ;;
+ *) gl_cv_func_tdelete_works="guessing yes" ;;
esac
])
])
diff --git a/m4/tzset.m4 b/m4/tzset.m4
index f8f7736548..11ceeabed6 100644
--- a/m4/tzset.m4
+++ b/m4/tzset.m4
@@ -1,4 +1,4 @@
-# serial 9
+# serial 10
# Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -70,6 +70,8 @@ main ()
[case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_tzset_clobber="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_tzset_clobber="guessing yes" ;;
esac
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4
index 72e833490f..9f41c0e1b6 100644
--- a/m4/ungetc.m4
+++ b/m4/ungetc.m4
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 4
+# ungetc.m4 serial 5
dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -42,8 +42,10 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
[gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
[case "$host_os" in
# Guess yes on glibc and bionic systems.
- *-gnu*|*-android*)
+ *-gnu* | *-android*)
gl_cv_func_ungetc_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ungetc_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ungetc_works="guessing no" ;;
esac
diff --git a/m4/unlink-busy.m4 b/m4/unlink-busy.m4
index 331ac7a61c..9f51353bca 100644
--- a/m4/unlink-busy.m4
+++ b/m4/unlink-busy.m4
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
dnl From J. David Anglin.
@@ -29,12 +29,17 @@ AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
}]])],
[gl_cv_func_unlink_busy_text=yes],
[gl_cv_func_unlink_busy_text=no],
- [gl_cv_func_unlink_busy_text=no]
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_unlink_busy_text="guessing no" ;;
+ *) gl_cv_func_unlink_busy_text="guessing no" ;;
+ esac
+ ]
)
]
)
- if test $gl_cv_func_unlink_busy_text = no; then
- INSTALL=$ac_install_sh
- fi
+ case "$gl_cv_func_unlink_busy_text" in
+ *no) INSTALL=$ac_install_sh ;;
+ esac
])
diff --git a/m4/unlink.m4 b/m4/unlink.m4
index dee6c35695..ac86e7fe31 100644
--- a/m4/unlink.m4
+++ b/m4/unlink.m4
@@ -1,4 +1,4 @@
-# unlink.m4 serial 11
+# unlink.m4 serial 12
dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -45,6 +45,8 @@ AC_DEFUN([gl_FUNC_UNLINK],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
esac
diff --git a/m4/usleep.m4 b/m4/usleep.m4
index caa580adf9..e69ed85b24 100644
--- a/m4/usleep.m4
+++ b/m4/usleep.m4
@@ -1,4 +1,4 @@
-# usleep.m4 serial 3
+# usleep.m4 serial 4
dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,8 @@ AC_DEFUN([gl_FUNC_USLEEP],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_usleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_usleep_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_usleep_works="guessing no" ;;
esac
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 518824f218..847b2eba78 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,5 +1,5 @@
# Detect some bugs in glibc's implementation of utimes.
-# serial 4
+# serial 5
dnl Copyright (C) 2003-2005, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -20,10 +20,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_UTIMES],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the utimes function works],
[gl_cv_func_working_utimes],
- [
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -142,9 +142,17 @@ main ()
]])],
[gl_cv_func_working_utimes=yes],
[gl_cv_func_working_utimes=no],
- [gl_cv_func_working_utimes=no])])
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_working_utimes="guessing no" ;;
+ *) gl_cv_func_working_utimes="guessing no" ;;
+ esac
+ ])
+ ])
- if test $gl_cv_func_working_utimes = yes; then
- AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
- fi
+ case "$gl_cv_func_working_utimes" in
+ *yes)
+ AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
+ ;;
+ esac
])
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index 0aa040df3d..fcc3f8c82a 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,4 +1,4 @@
-# wcrtomb.m4 serial 11
+# wcrtomb.m4 serial 12
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,6 +51,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on AIX 4, OSF/1 and Solaris.
aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
esac
diff --git a/m4/wcsrtombs.m4 b/m4/wcsrtombs.m4
index 2c3bf8dbf2..51a2e5cb05 100644
--- a/m4/wcsrtombs.m4
+++ b/m4/wcsrtombs.m4
@@ -1,4 +1,4 @@
-# wcsrtombs.m4 serial 11
+# wcsrtombs.m4 serial 12
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -71,10 +71,12 @@ AC_DEFUN([gl_WCSRTOMBS_TERMINATION],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on OSF/1.
- osf*) gl_cv_func_wcsrtombs_termination="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_wcsrtombs_termination="guessing yes" ;;
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_wcsrtombs_termination="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_wcsrtombs_termination="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcsrtombs_termination="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none; then
@@ -135,6 +137,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on HP-UX, OSF/1, mingw.
hpux* | osf* | mingw*) gl_cv_func_wcsrtombs_null="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_wcsrtombs_null="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_wcsrtombs_null="guessing yes" ;;
esac
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 492f4c8d71..9de4960149 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,4 +1,4 @@
-# wctob.m4 serial 10
+# wctob.m4 serial 11
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,9 @@ changequote(,)dnl
# Guess no on Solaris <= 9 and Cygwin.
solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
gl_cv_func_wctob_works="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*)
+ gl_cv_func_wctob_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_wctob_works="guessing yes" ;;
esac