summaryrefslogtreecommitdiffstats
path: root/gl/m4/intdiv0.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 (GMT)
commitbd7029a99b0c2974265c6665638ef14a052f42ab (patch)
treef5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/m4/intdiv0.m4
parentf99612320d6eda67644c07be04bb21aa4d7789db (diff)
downloadmonitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/intdiv0.m4')
-rw-r--r--gl/m4/intdiv0.m446
1 files changed, 30 insertions, 16 deletions
diff --git a/gl/m4/intdiv0.m4 b/gl/m4/intdiv0.m4
index b8d7817..8c8a670 100644
--- a/gl/m4/intdiv0.m4
+++ b/gl/m4/intdiv0.m4
@@ -1,5 +1,5 @@
1# intdiv0.m4 serial 1 (gettext-0.11.3) 1# intdiv0.m4 serial 2 (gettext-0.17)
2dnl Copyright (C) 2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2007 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,16 +14,27 @@ AC_DEFUN([gt_INTDIV0],
14 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 14 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
15 gt_cv_int_divbyzero_sigfpe, 15 gt_cv_int_divbyzero_sigfpe,
16 [ 16 [
17 AC_TRY_RUN([ 17 gt_cv_int_divbyzero_sigfpe=
18changequote(,)dnl
19 case "$host_os" in
20 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
21 # On MacOS X 10.2 or newer, just assume the same as when cross-
22 # compiling. If we were to perform the real test, 1 Crash Report
23 # dialog window would pop up.
24 case "$host_cpu" in
25 i[34567]86 | x86_64)
26 gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
27 esac
28 ;;
29 esac
30changequote([,])dnl
31 if test -z "$gt_cv_int_divbyzero_sigfpe"; then
32 AC_TRY_RUN([
18#include <stdlib.h> 33#include <stdlib.h>
19#include <signal.h> 34#include <signal.h>
20 35
21static void 36static void
22#ifdef __cplusplus
23sigfpe_handler (int sig) 37sigfpe_handler (int sig)
24#else
25sigfpe_handler (sig) int sig;
26#endif
27{ 38{
28 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 39 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
29 exit (sig != SIGFPE); 40 exit (sig != SIGFPE);
@@ -51,15 +62,18 @@ int main ()
51 exit (1); 62 exit (1);
52} 63}
53], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 64], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
54 [ 65 [
55 # Guess based on the CPU. 66 # Guess based on the CPU.
56 case "$host_cpu" in 67changequote(,)dnl
57 alpha* | i[34567]86 | m68k | s390*) 68 case "$host_cpu" in
58 gt_cv_int_divbyzero_sigfpe="guessing yes";; 69 alpha* | i[34567]86 | x86_64 | m68k | s390*)
59 *) 70 gt_cv_int_divbyzero_sigfpe="guessing yes";;
60 gt_cv_int_divbyzero_sigfpe="guessing no";; 71 *)
61 esac 72 gt_cv_int_divbyzero_sigfpe="guessing no";;
62 ]) 73 esac
74changequote([,])dnl
75 ])
76 fi
63 ]) 77 ])
64 case "$gt_cv_int_divbyzero_sigfpe" in 78 case "$gt_cv_int_divbyzero_sigfpe" in
65 *yes) value=1;; 79 *yes) value=1;;