|
version 1.1.1.1, 2012/02/21 22:57:49
|
version 1.1.1.3, 2021/03/17 13:38:46
|
|
Line 1
|
Line 1
|
| # intdiv0.m4 serial 3 (gettext-0.18) | # intdiv0.m4 serial 6 (gettext-0.18.2) |
| dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc. | dnl Copyright (C) 2002, 2007-2008, 2010-2019 Free Software Foundation, Inc. |
| dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
| dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
| dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
|
Line 18 AC_DEFUN([gt_INTDIV0],
|
Line 18 AC_DEFUN([gt_INTDIV0],
|
| changequote(,)dnl |
changequote(,)dnl |
| case "$host_os" in |
case "$host_os" in |
| macos* | darwin[6-9]* | darwin[1-9][0-9]*) |
macos* | darwin[6-9]* | darwin[1-9][0-9]*) |
| # On MacOS X 10.2 or newer, just assume the same as when cross- | # On Mac OS X 10.2 or newer, just assume the same as when cross- |
| # compiling. If we were to perform the real test, 1 Crash Report |
# compiling. If we were to perform the real test, 1 Crash Report |
| # dialog window would pop up. |
# dialog window would pop up. |
| case "$host_cpu" in |
case "$host_cpu" in |
|
Line 29 changequote(,)dnl
|
Line 29 changequote(,)dnl
|
| esac |
esac |
| changequote([,])dnl |
changequote([,])dnl |
| if test -z "$gt_cv_int_divbyzero_sigfpe"; then |
if test -z "$gt_cv_int_divbyzero_sigfpe"; then |
| AC_TRY_RUN([ | AC_RUN_IFELSE( |
| | [AC_LANG_SOURCE([[ |
| #include <stdlib.h> |
#include <stdlib.h> |
| #include <signal.h> |
#include <signal.h> |
| |
|
|
Line 37 static void
|
Line 38 static void
|
| sigfpe_handler (int sig) |
sigfpe_handler (int sig) |
| { |
{ |
| /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ |
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ |
| exit (sig != SIGFPE); | _exit (sig != SIGFPE); |
| } |
} |
| |
|
| int x = 1; |
int x = 1; |
|
Line 59 int main ()
|
Line 60 int main ()
|
| |
|
| z = x / y; |
z = x / y; |
| nan = y / y; |
nan = y / y; |
| exit (1); | exit (2); |
| } |
} |
| ], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no], | ]])], |
| | [gt_cv_int_divbyzero_sigfpe=yes], |
| | [gt_cv_int_divbyzero_sigfpe=no], |
| [ |
[ |
| # Guess based on the CPU. |
# Guess based on the CPU. |
| changequote(,)dnl |
changequote(,)dnl |