aboutsummaryrefslogtreecommitdiff
path: root/m4/intdiv0.m4
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-18 19:57:24 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-18 19:57:24 +0000
commit755b04521a5b37ceac529df984c9ca1e466741c6 (patch)
treef44b464dcad4c03281027aa95ca5e1dd11b2e7b9 /m4/intdiv0.m4
parent55406e60956ebbd4e50e0907e0bcd94df5f71d55 (diff)
downloadgnunet-755b04521a5b37ceac529df984c9ca1e466741c6.tar.gz
gnunet-755b04521a5b37ceac529df984c9ca1e466741c6.zip
-gettext and libtoolize updates
Diffstat (limited to 'm4/intdiv0.m4')
-rw-r--r--m4/intdiv0.m455
1 files changed, 36 insertions, 19 deletions
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
index b8d78176a..afa9acb82 100644
--- a/m4/intdiv0.m4
+++ b/m4/intdiv0.m4
@@ -1,5 +1,5 @@
1# intdiv0.m4 serial 1 (gettext-0.11.3) 1# intdiv0.m4 serial 6 (gettext-0.18.2)
2dnl Copyright (C) 2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2007-2008, 2010-2014 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,28 @@ 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 Mac OS 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_RUN_IFELSE(
33 [AC_LANG_SOURCE([[
18#include <stdlib.h> 34#include <stdlib.h>
19#include <signal.h> 35#include <signal.h>
20 36
21static void 37static void
22#ifdef __cplusplus
23sigfpe_handler (int sig) 38sigfpe_handler (int sig)
24#else
25sigfpe_handler (sig) int sig;
26#endif
27{ 39{
28 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 40 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
29 exit (sig != SIGFPE); 41 exit (sig != SIGFPE);
@@ -48,23 +60,28 @@ int main ()
48 60
49 z = x / y; 61 z = x / y;
50 nan = y / y; 62 nan = y / y;
51 exit (1); 63 exit (2);
52} 64}
53], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 65]])],
54 [ 66 [gt_cv_int_divbyzero_sigfpe=yes],
55 # Guess based on the CPU. 67 [gt_cv_int_divbyzero_sigfpe=no],
56 case "$host_cpu" in 68 [
57 alpha* | i[34567]86 | m68k | s390*) 69 # Guess based on the CPU.
58 gt_cv_int_divbyzero_sigfpe="guessing yes";; 70changequote(,)dnl
59 *) 71 case "$host_cpu" in
60 gt_cv_int_divbyzero_sigfpe="guessing no";; 72 alpha* | i[34567]86 | x86_64 | m68k | s390*)
61 esac 73 gt_cv_int_divbyzero_sigfpe="guessing yes";;
62 ]) 74 *)
75 gt_cv_int_divbyzero_sigfpe="guessing no";;
76 esac
77changequote([,])dnl
78 ])
79 fi
63 ]) 80 ])
64 case "$gt_cv_int_divbyzero_sigfpe" in 81 case "$gt_cv_int_divbyzero_sigfpe" in
65 *yes) value=1;; 82 *yes) value=1;;
66 *) value=0;; 83 *) value=0;;
67 esac 84 esac
68 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, 85 AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
69 [Define if integer division by zero raises signal SIGFPE.]) 86 [Define if integer division by zero raises signal SIGFPE.])
70]) 87])