]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Avoid failing a configure test due to CFLAGS="-Werror".
authorBruno Haible <bruno@clisp.org>
Sat, 14 Sep 2019 11:30:24 +0000 (13:30 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:13:59 +0000 (13:13 +0200)
Reported by Florian Weimer <fweimer@redhat.com>.

* gettext-runtime/m4/intdiv0.m4 (gt_INTDIV0): In the test program, include
<unistd.h>, for the declaration of _exit().

gettext-runtime/m4/intdiv0.m4

index e63fcf1006539f23c86f18ba9bc54790896fc81f..3dbc944f7778b6f846a3ac89f5206deddeea70a5 100644 (file)
@@ -1,4 +1,4 @@
-# intdiv0.m4 serial 6 (gettext-0.18.2)
+# intdiv0.m4 serial 7 (gettext-0.21)
 dnl Copyright (C) 2002, 2007-2008, 2010-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -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)