diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-07-13 19:24:06 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-07-13 19:24:49 -0700 |
commit | 3128d5d10e702ccb0732d947370e539a54046fc9 (patch) | |
tree | a2a3c95dcf1263d55ca63fb4675b43286a8351de /m4/utimes.m4 | |
parent | ab87dbad1d26fba4e33b62b4b5a840be77ae9aa5 (diff) | |
download | emacs-3128d5d10e702ccb0732d947370e539a54046fc9.tar.gz |
Merge from gnulib
This incorporates:
2017-07-13 Improve cross-compilation guesses for native Windows
2017-07-11 More systematic m4 quoting and indentation
2017-07-10 Make sure $host and $host_os are defined when used
2017-07-03 stdioext: Port to OpenVMS
2017-06-24 xalloc-oversized: port to icc
* doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
* lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
* m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
* m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
Copy from Gnulib.
Diffstat (limited to 'm4/utimes.m4')
-rw-r--r-- | m4/utimes.m4 | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/m4/utimes.m4 b/m4/utimes.m4 index 518824f218f..847b2eba78f 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 ]) |