summaryrefslogtreecommitdiffstats
path: root/gl/m4/intmax_t.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/intmax_t.m4')
-rw-r--r--gl/m4/intmax_t.m415
1 files changed, 10 insertions, 5 deletions
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index 975caac..6ea7053 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
1# intmax_t.m4 serial 7 1# intmax_t.m4 serial 8
2dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation, 2dnl Copyright (C) 1997-2004, 2006-2007, 2009-2013 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
7 7
8dnl From Paul Eggert. 8dnl From Paul Eggert.
9 9
10AC_PREREQ([2.13]) 10AC_PREREQ([2.53])
11 11
12# Define intmax_t to 'long' or 'long long' 12# Define intmax_t to 'long' or 'long long'
13# if it is not already defined in <stdint.h> or <inttypes.h>. 13# if it is not already defined in <stdint.h> or <inttypes.h>.
@@ -38,7 +38,9 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
38 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 38 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
39 AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 39 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
40 AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], 40 AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
41 [AC_TRY_COMPILE([ 41 [AC_COMPILE_IFELSE(
42 [AC_LANG_PROGRAM(
43 [[
42#include <stddef.h> 44#include <stddef.h>
43#include <stdlib.h> 45#include <stdlib.h>
44#if HAVE_STDINT_H_WITH_UINTMAX 46#if HAVE_STDINT_H_WITH_UINTMAX
@@ -47,7 +49,10 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
47#if HAVE_INTTYPES_H_WITH_UINTMAX 49#if HAVE_INTTYPES_H_WITH_UINTMAX
48#include <inttypes.h> 50#include <inttypes.h>
49#endif 51#endif
50], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) 52 ]],
53 [[intmax_t x = -1; return !x;]])],
54 [gt_cv_c_intmax_t=yes],
55 [gt_cv_c_intmax_t=no])])
51 if test $gt_cv_c_intmax_t = yes; then 56 if test $gt_cv_c_intmax_t = yes; then
52 AC_DEFINE([HAVE_INTMAX_T], [1], 57 AC_DEFINE([HAVE_INTMAX_T], [1],
53 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) 58 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])