summaryrefslogtreecommitdiff
blob: f610a1c380655bbf5c22c39267d34205c6bd3c33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
https://bugs.gentoo.org/900130

Refresh macro from gettext.
--- a/m4/intdiv0.m4
+++ b/m4/intdiv0.m4
@@ -1,5 +1,5 @@
-# intdiv0.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002, 2007-2008, 2010-2016 Free Software Foundation, Inc.
+# intdiv0.m4 serial 9 (gettext-0.21.1)
+dnl Copyright (C) 2002, 2007-2008, 2010-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ AC_DEFUN([gt_INTDIV0],
   AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-    gt_cv_int_divbyzero_sigfpe,
+    [gt_cv_int_divbyzero_sigfpe],
     [
       gt_cv_int_divbyzero_sigfpe=
 changequote(,)dnl
@@ -31,8 +31,11 @@ changequote([,])dnl
       if test -z "$gt_cv_int_divbyzero_sigfpe"; then
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
-#include <stdlib.h>
+#include <stdlib.h> /* for exit() */
 #include <signal.h>
+#if !(defined _WIN32 && !defined __CYGWIN__)
+#include <unistd.h> /* for _exit() */
+#endif
 
 static void
 sigfpe_handler (int sig)
@@ -44,7 +47,7 @@ sigfpe_handler (int sig)
 int x = 1;
 int y = 0;
 int z;
-int nan;
+int inan;
 
 int main ()
 {
@@ -59,7 +62,7 @@ int main ()
 #endif
 
   z = x / y;
-  nan = y / y;
+  inan = y / y;
   exit (2);
 }
 ]])],
@@ -79,8 +82,8 @@ changequote([,])dnl
       fi
     ])
   case "$gt_cv_int_divbyzero_sigfpe" in
-    *yes) value=1;;
-    *) value=0;;
+    *yes) value=1 ;;
+    *)    value=0 ;;
   esac
   AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
     [Define if integer division by zero raises signal SIGFPE.])