X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=5878b039313530f9f2c74e559f104844e3ceac0e;hp=bd38209b8baa1054005a0513f4ce2a9adb7079ee;hb=d30f99439fcc8d4bb4c38e5c4afb4f6555fc6ad4;hpb=b661daf1160a873609d70843999cd46eff25d1f0;ds=sidebyside diff --git a/aclocal.m4 b/aclocal.m4 index bd38209b..5878b039 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.955 2021/03/23 00:39:18 tom Exp $ +dnl $Id: aclocal.m4,v 1.957 2021/04/03 20:43:02 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -794,7 +794,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 2 updated: 2021/03/22 20:37:21 +dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ @@ -811,7 +811,7 @@ AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, #include #include #include -static void giveup(void) { exit(0); } +static _Noreturn void giveup(void) { exit(0); } ], [if (feof(stdin)) giveup()], cf_cv_c11_noreturn=yes, @@ -822,7 +822,7 @@ else fi if test "$cf_cv_c11_noreturn" = yes; then - AC_DEFINE(HAVE_STDNORETURN_H, 1) + AC_DEFINE(HAVE_STDNORETURN_H, 1,[Define if header is available and working]) AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported]) HAVE_STDNORETURN_H=1 else @@ -830,6 +830,7 @@ else fi AC_SUBST(HAVE_STDNORETURN_H) +AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 @@ -1898,7 +1899,7 @@ CF_ARG_DISABLE(gnat-projects, AC_MSG_RESULT($enable_gnat_projects) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_LEAKS version: 8 updated: 2021/01/05 20:05:09 +dnl CF_DISABLE_LEAKS version: 9 updated: 2021/04/03 16:41:50 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. @@ -1911,9 +1912,9 @@ AC_REQUIRE([CF_WITH_VALGRIND]) AC_MSG_CHECKING(if you want to perform memory-leak testing) AC_ARG_ENABLE(leaks, [ --disable-leaks test: free permanent memory, analyze leaks], - [enable_leaks=no], + [enable_leaks=$enableval], [enable_leaks=yes]) -dnl TODO - drop with_no_leaks +dnl with_no_leaks is more readable... if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi AC_MSG_RESULT($with_no_leaks) @@ -5093,11 +5094,14 @@ AC_SUBST(BROKEN_LINKER) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LINK_FUNCS version: 9 updated: 2017/01/21 11:11:02 +dnl CF_LINK_FUNCS version: 10 updated: 2021/04/03 15:45:02 dnl ------------- dnl Most Unix systems have both link and symlink, a few don't have symlink. dnl A few non-Unix systems implement symlink, but not link. dnl A few non-systems implement neither (or have nonfunctional versions). +dnl +dnl This allows for a 2-second difference in modification times to allow for +dnl some marginal NFS implementations. AC_DEFUN([CF_LINK_FUNCS], [ AC_CHECK_HEADERS( \ @@ -5130,9 +5134,17 @@ int main(void) struct stat dst_sb; stat(src, &src_sb); - fail = ($cf_func("config.log", "conftest.chk") < 0) - || (stat(dst, &dst_sb) < 0) - || (dst_sb.st_mtime != src_sb.st_mtime); + if ($cf_func("config.log", "conftest.chk") < 0) { + fail = 1; + } else if (stat(dst, &dst_sb) < 0) { + fail = 2; + } else { + long diff = (dst_sb.st_mtime - src_sb.st_mtime); + if (diff < 0) + diff = -diff; + if (diff > 2) + fail = 3; + } #ifdef HAVE_UNLINK unlink(dst); #else