aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert2013-10-03 00:06:52 -0700
committerPaul Eggert2013-10-03 00:06:52 -0700
commit0a858ebfc57a072ae8ab65f509d8a4901a2ec073 (patch)
treedd81bcdf11f3d3efa32ffe00f7cdc90d3c1144d9 /m4
parentb52f569dcfc5c2e1b764c89d27ea8699a44228e6 (diff)
downloademacs-0a858ebfc57a072ae8ab65f509d8a4901a2ec073.tar.gz
emacs-0a858ebfc57a072ae8ab65f509d8a4901a2ec073.zip
Merge from gnulib.
* src/conf_post.h (__has_builtin, assume): Remove; gnulib now does these. * src/lisp.h: Include <verify.h>, for 'assume'. This also incorpoprates: 2013-10-02 verify: new macro 'assume' 2013-09-26 dup2, dup3: work around another cygwin crasher 2013-09-26 getdtablesize: work around cygwin issue
Diffstat (limited to 'm4')
-rw-r--r--m4/dup2.m47
-rw-r--r--m4/getdtablesize.m431
-rw-r--r--m4/gnulib-comp.m42
-rw-r--r--m4/unistd_h.m43
4 files changed, 37 insertions, 6 deletions
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 269cfdc1123..dc3070c0d9a 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,4 +1,4 @@
1#serial 19 1#serial 20
2dnl Copyright (C) 2002, 2005, 2007, 2009-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -39,9 +39,11 @@ AC_DEFUN([gl_FUNC_DUP2],
39 /* Many gnulib modules require POSIX conformance of EBADF. */ 39 /* Many gnulib modules require POSIX conformance of EBADF. */
40 if (dup2 (2, 1000000) == -1 && errno != EBADF) 40 if (dup2 (2, 1000000) == -1 && errno != EBADF)
41 result |= 16; 41 result |= 16;
42 /* Flush out a cygwin core dump. */ 42 /* Flush out some cygwin core dumps. */
43 if (dup2 (2, -1) != -1 || errno != EBADF) 43 if (dup2 (2, -1) != -1 || errno != EBADF)
44 result |= 32; 44 result |= 32;
45 dup2 (2, 255);
46 dup2 (2, 256);
45 return result; 47 return result;
46 ]) 48 ])
47 ], 49 ],
@@ -65,6 +67,7 @@ AC_DEFUN([gl_FUNC_DUP2],
65 *yes) ;; 67 *yes) ;;
66 *) 68 *)
67 REPLACE_DUP2=1 69 REPLACE_DUP2=1
70 AC_CHECK_FUNCS([setdtablesize])
68 ;; 71 ;;
69 esac 72 esac
70 fi 73 fi
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 8f04b3b8c2a..b3fa1af6a5a 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,4 +1,4 @@
1# getdtablesize.m4 serial 4 1# getdtablesize.m4 serial 5
2dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -7,8 +7,35 @@ dnl with or without modifications, as long as this notice is preserved.
7AC_DEFUN([gl_FUNC_GETDTABLESIZE], 7AC_DEFUN([gl_FUNC_GETDTABLESIZE],
8[ 8[
9 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 9 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
10 AC_REQUIRE([AC_CANONICAL_HOST])
10 AC_CHECK_FUNCS_ONCE([getdtablesize]) 11 AC_CHECK_FUNCS_ONCE([getdtablesize])
11 if test $ac_cv_func_getdtablesize != yes; then 12 if test $ac_cv_func_getdtablesize = yes; then
13 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
14 # up to an unchangeable hard limit; all other platforms correctly
15 # require setrlimit before getdtablesize() can report a larger value.
16 AC_CACHE_CHECK([whether getdtablesize works],
17 [gl_cv_func_getdtablesize_works],
18 [AC_RUN_IFELSE([
19 AC_LANG_PROGRAM([[#include <unistd.h>]],
20 [int size = getdtablesize();
21 if (dup2 (0, getdtablesize()) != -1)
22 return 1;
23 if (size != getdtablesize())
24 return 2;
25 ])],
26 [gl_cv_func_getdtablesize_works=yes],
27 [gl_cv_func_getdtablesize_works=no],
28 [case "$host_os" in
29 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
30 gl_cv_func_getdtablesize_works="guessing no" ;;
31 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
32 esac])
33 ])
34 case "$gl_cv_func_getdtablesize_works" in
35 *yes) ;;
36 *) REPLACE_GETDTABLESIZE=1 ;;
37 esac
38 else
12 HAVE_GETDTABLESIZE=0 39 HAVE_GETDTABLESIZE=0
13 fi 40 fi
14]) 41])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 7c5f22861b5..2e5a9cf97d1 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -433,7 +433,7 @@ AC_DEFUN([gl_INIT],
433 { 433 {
434 if ! $gl_gnulib_enabled_getdtablesize; then 434 if ! $gl_gnulib_enabled_getdtablesize; then
435 gl_FUNC_GETDTABLESIZE 435 gl_FUNC_GETDTABLESIZE
436 if test $HAVE_GETDTABLESIZE = 0; then 436 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
437 AC_LIBOBJ([getdtablesize]) 437 AC_LIBOBJ([getdtablesize])
438 gl_PREREQ_GETDTABLESIZE 438 gl_PREREQ_GETDTABLESIZE
439 fi 439 fi
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 32dcfa58204..4231578cf24 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
1# unistd_h.m4 serial 66 1# unistd_h.m4 serial 67
2dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -160,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
160 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) 160 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
161 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) 161 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
162 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) 162 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
163 REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
163 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) 164 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
164 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) 165 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
165 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) 166 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])