annotate m4/inttypes.m4 @ 17476:6057744acd2c default tip master

autoupdate
author Karl Berry <karl@freefriends.org>
date Fri, 16 Aug 2013 06:32:22 -0700 (2013-08-16)
parents e542fd46ad6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16230
f9e137049132 strtoimax: Work around AIX 5.1 bug.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
1 # inttypes.m4 serial 26
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16230
diff changeset
2 dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl From Derek Price, Bruno Haible.
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 dnl Test whether <inttypes.h> is supported or must be substituted.
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_DEFUN([gl_INTTYPES_H],
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 [
14621
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
12 AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
13 gl_INTTYPES_PRI_SCN
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
14 ])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
15
14747
1ed391f686fa inttypes: avoid autoconf warning
Eric Blake <eblake@redhat.com>
parents: 14623
diff changeset
16 AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
14621
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
17 [
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_REQUIRE([gl_STDINT_H])
12563
21ecefd9dc81 headers: make check of system header explicit
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
19 AC_CHECK_HEADERS_ONCE([inttypes.h])
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
8185
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
21 dnl Override <inttypes.h> always, so that the portability warnings work.
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
22 AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
23 gl_CHECK_NEXT_HEADERS([inttypes.h])
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
25 AC_REQUIRE([gl_MULTIARCH])
10972
cf1b1ca0bb08 Add support for universal builds to <inttypes.h>.
Bruno Haible <bruno@clisp.org>
parents: 9921
diff changeset
26
14621
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
27 dnl Check for declarations of anything we want to poison if the
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
28 dnl corresponding gnulib module is not in use.
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
29 gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
30 ]], [imaxabs imaxdiv strtoimax strtoumax])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
31 ])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
32
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
33 # Ensure that the PRI* and SCN* macros are defined appropriately.
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
34 AC_DEFUN([gl_INTTYPES_PRI_SCN],
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
35 [
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
36 AC_REQUIRE([gt_INTTYPES_PRI])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
37
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
38 PRIPTR_PREFIX=
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
39 if test -n "$STDINT_H"; then
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
40 dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
41 PRIPTR_PREFIX='"l"'
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
42 else
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
43 dnl Using the system's <stdint.h>.
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
44 for glpfx in '' l ll I64; do
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
45 case $glpfx in
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
46 '') gltype1='int';;
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
47 l) gltype1='long int';;
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
48 ll) gltype1='long long int';;
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
49 I64) gltype1='__int64';;
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
50 esac
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
51 AC_COMPILE_IFELSE(
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
52 [AC_LANG_PROGRAM([[#include <stdint.h>
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
53 extern intptr_t foo;
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
54 extern $gltype1 foo;]])],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
55 [PRIPTR_PREFIX='"'$glpfx'"'])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
56 test -n "$PRIPTR_PREFIX" && break
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
57 done
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
58 fi
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
59 AC_SUBST([PRIPTR_PREFIX])
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
61 gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
62 [INT32_MAX_LT_INTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
63 [defined INT32_MAX && defined INTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
64 [INT32_MAX < INTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
65 [sizeof (int) < sizeof (long long int)])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
66 if test $APPLE_UNIVERSAL_BUILD = 0; then
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
67 gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
68 [INT64_MAX_EQ_LONG_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
69 [defined INT64_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
70 [INT64_MAX == LONG_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
71 [sizeof (long long int) == sizeof (long int)])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
72 else
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
73 INT64_MAX_EQ_LONG_MAX=-1
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
74 fi
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
75 gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
76 [UINT32_MAX_LT_UINTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
77 [defined UINT32_MAX && defined UINTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
78 [UINT32_MAX < UINTMAX_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
79 [sizeof (unsigned int) < sizeof (unsigned long long int)])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
80 if test $APPLE_UNIVERSAL_BUILD = 0; then
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
81 gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
82 [UINT64_MAX_EQ_ULONG_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
83 [defined UINT64_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
84 [UINT64_MAX == ULONG_MAX],
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
85 [sizeof (unsigned long long int) == sizeof (unsigned long int)])
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
86 else
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
87 UINT64_MAX_EQ_ULONG_MAX=-1
7204
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 fi
a402f0d05767 Rewritten 'inttypes' module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 ])
8185
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
90
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
91 # Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
92 # If $2 is true, the condition is $3; otherwise if long long int is supported
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
93 # approximate the condition with $4; otherwise, assume the condition is false.
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
94 # The condition should work on all C99 platforms; the approximations should be
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
95 # good enough to work on all practical pre-C99 platforms.
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
96 # $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
97 AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
98 [
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
99 AC_CACHE_CHECK([whether $3],
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
100 [gl_cv_test_$1],
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
101 [AC_COMPILE_IFELSE(
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
102 [AC_LANG_PROGRAM(
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
103 [[/* Work also in C++ mode. */
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
104 #define __STDC_LIMIT_MACROS 1
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
105
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
106 /* Work if build is not clean. */
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
107 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
108
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
109 #include <limits.h>
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
110 #if HAVE_STDINT_H
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
111 #include <stdint.h>
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
112 #endif
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
113
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
114 #if $2
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
115 #define CONDITION ($3)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
116 #elif HAVE_LONG_LONG_INT
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
117 #define CONDITION ($4)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
118 #else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
119 #define CONDITION 0
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
120 #endif
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
121 int test[CONDITION ? 1 : -1];]])],
9473
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
122 [gl_cv_test_$1=yes],
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
123 [gl_cv_test_$1=no])])
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
124 if test $gl_cv_test_$1 = yes; then
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
125 $1=1;
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
126 else
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
127 $1=0;
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
128 fi
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
129 AC_SUBST([$1])
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
130 ])
8c3f82d802ec Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents: 9139
diff changeset
131
8185
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
132 AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
133 [
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
134 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
135 AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
136 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
8185
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
137 ])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
138
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
139 AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
140 [
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
141 GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
142 GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
143 GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
144 GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
145 dnl Assume proper GNU behavior unless another module says otherwise.
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
146 HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
147 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
148 HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
149 HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
16230
f9e137049132 strtoimax: Work around AIX 5.1 bug.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
150 REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
14623
623e25e9826b inttypes: also provide default values for 32-bit tests
Paul Eggert <eggert@cs.ucla.edu>
parents: 14621
diff changeset
151 INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
14621
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
152 INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
153 PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
154 PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX])
14623
623e25e9826b inttypes: also provide default values for 32-bit tests
Paul Eggert <eggert@cs.ucla.edu>
parents: 14621
diff changeset
155 UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
14621
94f2b4a2e01c inttypes-incomplete: new module
Paul Eggert <eggert@cs.ucla.edu>
parents: 14620
diff changeset
156 UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
8185
a1e147e70a3b Emit linker warnings for imaxabs, imaxdiv, strtoimax, strtoumax when these
Bruno Haible <bruno@clisp.org>
parents: 7658
diff changeset
157 ])