aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-09-11 09:52:58 -0700
committerPaul Eggert2011-09-11 09:52:58 -0700
commit3f44249e19c27e3cf87a0676dfdc4136f49539b3 (patch)
tree0b842bf77a6121a2d9da02a119726ab025456f6b
parenta98e7468321a83381758bd894b94f7c1c40c2991 (diff)
downloademacs-3f44249e19c27e3cf87a0676dfdc4136f49539b3.tar.gz
emacs-3f44249e19c27e3cf87a0676dfdc4136f49539b3.zip
Merge from gnulib, porting to Tru64.
* lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4: * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4: Merge from gnulib. This fixes a compilation error on Tru64 UNIX aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that doesn't affect Emacs.
-rw-r--r--ChangeLog9
-rw-r--r--lib/lstat.c5
-rw-r--r--lib/stat.c5
-rw-r--r--m4/include_next.m431
-rw-r--r--m4/nocrash.m430
-rw-r--r--m4/signal_h.m45
-rw-r--r--m4/time_h.m45
-rw-r--r--m4/unistd_h.m45
8 files changed, 82 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 437c6dba2f1..d86762a2d03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
12011-09-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, porting to Tru64.
4 * lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4:
5 * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4:
6 Merge from gnulib. This fixes a compilation error on Tru64 UNIX
7 aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that
8 doesn't affect Emacs.
9
12011-09-06 Paul Eggert <eggert@cs.ucla.edu> 102011-09-06 Paul Eggert <eggert@cs.ucla.edu>
2 11
3 * configure.in (isnan): Remove now-unnecessary check. 12 * configure.in (isnan): Remove now-unnecessary check.
diff --git a/lib/lstat.c b/lib/lstat.c
index 29fc6d25f90..d786288f2b7 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -42,7 +42,10 @@ orig_lstat (const char *filename, struct stat *buf)
42} 42}
43 43
44/* Specification. */ 44/* Specification. */
45# include <sys/stat.h> 45/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
46 eliminates this include because of the preliminary #include <sys/stat.h>
47 above. */
48# include "sys/stat.h"
46 49
47# include <string.h> 50# include <string.h>
48# include <errno.h> 51# include <errno.h>
diff --git a/lib/stat.c b/lib/stat.c
index 6c354d1d357..1002f161bfa 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -34,7 +34,10 @@ orig_stat (const char *filename, struct stat *buf)
34} 34}
35 35
36/* Specification. */ 36/* Specification. */
37#include <sys/stat.h> 37/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
38 eliminates this include because of the preliminary #include <sys/stat.h>
39 above. */
40#include "sys/stat.h"
38 41
39#include <errno.h> 42#include <errno.h>
40#include <limits.h> 43#include <limits.h>
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index ebf081a1101..14a1009b5d4 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,4 +1,4 @@
1# include_next.m4 serial 20 1# include_next.m4 serial 21
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2011 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,
@@ -207,17 +207,34 @@ dnl until we can assume autoconf 2.64 or newer.
207 aix*) gl_absname_cpp="$ac_cpp -C" ;; 207 aix*) gl_absname_cpp="$ac_cpp -C" ;;
208 *) gl_absname_cpp="$ac_cpp" ;; 208 *) gl_absname_cpp="$ac_cpp" ;;
209 esac 209 esac
210changequote(,)
211 case "$host_os" in
212 mingw*)
213 dnl For the sake of native Windows compilers (excluding gcc),
214 dnl treat backslash as a directory separator, like /.
215 dnl Actually, these compilers use a double-backslash as
216 dnl directory separator, inside the
217 dnl # line "filename"
218 dnl directives.
219 gl_dirsep_regex='[/\\]'
220 ;;
221 *)
222 gl_dirsep_regex='/'
223 ;;
224 esac
225changequote([,])
226 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[#{
227 s#.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*#\1#
228 s#^/[^/]#//&#
229 p
230 q
231 }'
210 dnl eval is necessary to expand gl_absname_cpp. 232 dnl eval is necessary to expand gl_absname_cpp.
211 dnl Ultrix and Pyramid sh refuse to redirect output of eval, 233 dnl Ultrix and Pyramid sh refuse to redirect output of eval,
212 dnl so use subshell. 234 dnl so use subshell.
213 AS_VAR_SET(gl_next_header, 235 AS_VAR_SET(gl_next_header,
214 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | 236 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
215 sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ 237 sed -n "$gl_absolute_header_sed"`'"'])
216 s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
217 s#^/[^/]#//&#
218 p
219 q
220 }'`'"'])
221 m4_if([$2], [check], 238 m4_if([$2], [check],
222 [else 239 [else
223 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) 240 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 0cc0d53ebf7..60aad952956 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,4 +1,4 @@
1# nocrash.m4 serial 2 1# nocrash.m4 serial 3
2dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2011 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,
@@ -79,6 +79,34 @@ nocrash_init (void)
79 } 79 }
80 } 80 }
81} 81}
82#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
83/* Avoid a crash on native Windows. */
84#define WIN32_LEAN_AND_MEAN
85#include <windows.h>
86#include <winerror.h>
87static LONG WINAPI
88exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
89{
90 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
91 {
92 case EXCEPTION_ACCESS_VIOLATION:
93 case EXCEPTION_IN_PAGE_ERROR:
94 case EXCEPTION_STACK_OVERFLOW:
95 case EXCEPTION_GUARD_PAGE:
96 case EXCEPTION_PRIV_INSTRUCTION:
97 case EXCEPTION_ILLEGAL_INSTRUCTION:
98 case EXCEPTION_DATATYPE_MISALIGNMENT:
99 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
100 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
101 exit (1);
102 }
103 return EXCEPTION_CONTINUE_SEARCH;
104}
105static void
106nocrash_init (void)
107{
108 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
109}
82#else 110#else
83/* Avoid a crash on POSIX systems. */ 111/* Avoid a crash on POSIX systems. */
84#include <signal.h> 112#include <signal.h>
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index b9536fb0e3c..c3f25386ca2 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,4 +1,4 @@
1# signal_h.m4 serial 16 1# signal_h.m4 serial 17
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2011 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,
@@ -17,6 +17,9 @@ AC_DEFUN([gl_SIGNAL_H],
17#include <signal.h> 17#include <signal.h>
18 ]]) 18 ]])
19 19
20 dnl Ensure the type pid_t gets defined.
21 AC_REQUIRE([AC_TYPE_PID_T])
22
20 AC_REQUIRE([AC_TYPE_UID_T]) 23 AC_REQUIRE([AC_TYPE_UID_T])
21 24
22 dnl Persuade glibc <signal.h> to define sighandler_t. 25 dnl Persuade glibc <signal.h> to define sighandler_t.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 615da1cfd39..6e6394fdc90 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
2 2
3# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
4 4
5# serial 4 5# serial 5
6 6
7# This file is free software; the Free Software Foundation 7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it, 8# gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,9 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
23 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) 23 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
24 gl_NEXT_HEADERS([time.h]) 24 gl_NEXT_HEADERS([time.h])
25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) 25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
26
27 dnl Ensure the type pid_t gets defined.
28 AC_REQUIRE([AC_TYPE_PID_T])
26]) 29])
27 30
28dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared 31dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index fb6fe077265..6483b815d60 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
1# unistd_h.m4 serial 56 1# unistd_h.m4 serial 57
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2011 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,
@@ -21,6 +21,9 @@ AC_DEFUN([gl_UNISTD_H],
21 fi 21 fi
22 AC_SUBST([HAVE_UNISTD_H]) 22 AC_SUBST([HAVE_UNISTD_H])
23 23
24 dnl Ensure the type pid_t gets defined.
25 AC_REQUIRE([AC_TYPE_PID_T])
26
24 dnl Check for declarations of anything we want to poison if the 27 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use. 28 dnl corresponding gnulib module is not in use.
26 gl_WARN_ON_USE_PREPARE([[#include <unistd.h> 29 gl_WARN_ON_USE_PREPARE([[#include <unistd.h>