sigsegv: avoid unlikely undefined behavior
[gnulib.git] / m4 / imaxabs.m4
blob40fefb64318d69150b078925ea99034e2310dafb
1 # imaxabs.m4
2 # serial 6
3 dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_IMAXABS],
10   AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
12   dnl On OSF/1 5.1 with cc, this function is declared but not defined.
13   gl_CHECK_FUNCS_ANDROID([imaxabs], [[#include <inttypes.h>]])
14   if test $ac_cv_func_imaxabs = no; then
15     HAVE_IMAXABS=0
16     case "$gl_cv_onwards_func_imaxabs" in
17       future*) REPLACE_IMAXABS=1 ;;
18     esac
19   fi
20   AC_CHECK_DECLS_ONCE([imaxabs])
21   if test "$ac_cv_have_decl_imaxabs" != yes; then
22     HAVE_DECL_IMAXABS=0
23   fi
26 # Prerequisites of lib/imaxabs.c.
27 AC_DEFUN([gl_PREREQ_IMAXABS], [:])