Mercurial > gnulib
annotate m4/longlong.m4 @ 39944:eb64273b66c2
Assume Autoconf >= 2.63.
* DEPENDENCIES: Mention the requirement.
* gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63.
(func_get_filelist): Don't list m4/onceonly.m4 any more.
* pygnulib/GLModuleSystem.py (getFiles): Likewise.
* m4/onceonly.m4: Remove file.
* m4/openmp.m4: Remove file.
* modules/openmp (Files): Remove m4/openmp.m4.
* m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir,
htmldir, dvidir, pdfdir, psdir, localedir.
* m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir.
* m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for
Autoconf < 2.60.
(AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62.
(AC_PROG_SED): Remove fallback for Autoconf < 2.60.
* m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61.
* m4/size_max.m4 (AC_COMPUTE_INT): Likewise.
* m4/stdint.m4 (AC_COMPUTE_INT): Likewise.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS
exists.
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise,
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for
Autoconf < 2.61.
* m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro.
(AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of
Autoconf >= 2.52.
* m4/longlong.m4: Require Autoconf >= 2.62. Update comments.
* m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments.
* m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 23 Oct 2018 00:06:52 +0200 |
parents | 10eb9086bea0 |
children | 41ae0b9a3d53 |
rev | line source |
---|---|
39944 | 1 # longlong.m4 serial 18 |
19484
10eb9086bea0
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
18626
diff
changeset
|
2 dnl Copyright (C) 1999-2007, 2009-2018 Free Software Foundation, Inc. |
5585
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
5078
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
5078
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
5078
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
3355 | 6 |
7 dnl From Paul Eggert. | |
8 | |
39944 | 9 AC_PREREQ([2.62]) |
10 | |
6906
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
11 # Define HAVE_LONG_LONG_INT if 'long long int' works. |
39944 | 12 # This can be faster than what's in Autoconf 2.62 through 2.68. |
3356
8f113648d4ec
(jm_AC_TYPE_LONG_LONG): New macro.
Jim Meyering <jim@meyering.net>
parents:
3355
diff
changeset
|
13 |
7474 | 14 # Note: If the type 'long long int' exists but is only 32 bits large |
7620
40449f2d490e
* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
Paul Eggert <eggert@cs.ucla.edu>
parents:
7474
diff
changeset
|
15 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be |
7474 | 16 # defined. In this case you can treat 'long long int' like 'long int'. |
17 | |
6906
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
18 AC_DEFUN([AC_TYPE_LONG_LONG_INT], |
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
19 [ |
14356
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
20 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) |
6906
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
21 AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], |
14356
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
22 [ac_cv_type_long_long_int=yes |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
23 if test "x${ac_cv_prog_cc_c99-no}" = xno; then |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
24 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
25 if test $ac_cv_type_long_long_int = yes; then |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
26 dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
27 dnl If cross compiling, assume the bug is not important, since |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
28 dnl nobody cross compiles for this platform as far as we know. |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
29 AC_RUN_IFELSE( |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
30 [AC_LANG_PROGRAM( |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
31 [[@%:@include <limits.h> |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
32 @%:@ifndef LLONG_MAX |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
33 @%:@ define HALF \ |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
34 (1LL << (sizeof (long long int) * CHAR_BIT - 2)) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
35 @%:@ define LLONG_MAX (HALF - 1 + HALF) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
36 @%:@endif]], |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
37 [[long long int n = 1; |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
38 int i; |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
39 for (i = 0; ; i++) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
40 { |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
41 long long int m = n << i; |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
42 if (m >> i != n) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
43 return 1; |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
44 if (LLONG_MAX / 2 < m) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
45 break; |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
46 } |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
47 return 0;]])], |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
48 [], |
14366
4da22ca0951d
longlong: skip, rather than fail, on cross-compilation
Eric Blake <eblake@redhat.com>
parents:
14356
diff
changeset
|
49 [ac_cv_type_long_long_int=no], |
4da22ca0951d
longlong: skip, rather than fail, on cross-compilation
Eric Blake <eblake@redhat.com>
parents:
14356
diff
changeset
|
50 [:]) |
14356
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
51 fi |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
52 fi]) |
7628
8815c160826e
* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
Paul Eggert <eggert@cs.ucla.edu>
parents:
7620
diff
changeset
|
53 if test $ac_cv_type_long_long_int = yes; then |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9473
diff
changeset
|
54 AC_DEFINE([HAVE_LONG_LONG_INT], [1], |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
55 [Define to 1 if the system has the type 'long long int'.]) |
6906
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
56 fi |
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
57 ]) |
b912515df187
Simplification rewrite for stdint module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5585
diff
changeset
|
58 |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
59 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. |
39944 | 60 # This fixes can be faster than what's in Autoconf 2.62 through 2.68. |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
61 |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
62 # Note: If the type 'unsigned long long int' exists but is only 32 bits |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
63 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
64 # will not be defined. In this case you can treat 'unsigned long long int' |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
65 # like 'unsigned long int'. |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
66 |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
67 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
68 [ |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
69 AC_CACHE_CHECK([for unsigned long long int], |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
70 [ac_cv_type_unsigned_long_long_int], |
14356
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
71 [ac_cv_type_unsigned_long_long_int=yes |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
72 if test "x${ac_cv_prog_cc_c99-no}" = xno; then |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
73 AC_LINK_IFELSE( |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
74 [_AC_TYPE_LONG_LONG_SNIPPET], |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
75 [], |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
76 [ac_cv_type_unsigned_long_long_int=no]) |
42153542d24a
longlong: tune, particularly for common case of c99
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
77 fi]) |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
78 if test $ac_cv_type_unsigned_long_long_int = yes; then |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
9473
diff
changeset
|
79 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
80 [Define to 1 if the system has the type 'unsigned long long int'.]) |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
81 fi |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
82 ]) |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
83 |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
84 # Expands to a C program that can be used to test for simultaneous support |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
85 # of 'long long' and 'unsigned long long'. We don't want to say that |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
86 # 'long long' is available if 'unsigned long long' is not, or vice versa, |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
87 # because too many programs rely on the symmetry between signed and unsigned |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
88 # integer types (excluding 'bool'). |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
89 AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
90 [ |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
91 AC_LANG_PROGRAM( |
9473
8c3f82d802ec
Don't insist on 'long long int' support in the preprocessor. It
Paul Eggert <eggert@cs.ucla.edu>
parents:
9432
diff
changeset
|
92 [[/* For now, do not test the preprocessor; as of 2007 there are too many |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
93 implementations with broken preprocessors. Perhaps this can |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
94 be revisited in 2012. In the meantime, code should not expect |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
95 #if to work with literals wider than 32 bits. */ |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
96 /* Test literals. */ |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
97 long long int ll = 9223372036854775807ll; |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
98 long long int nll = -9223372036854775807LL; |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
99 unsigned long long int ull = 18446744073709551615ULL; |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
100 /* Test constant expressions. */ |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
101 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
102 ? 1 : -1)]; |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
103 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
104 ? 1 : -1)]; |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
105 int i = 63;]], |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
106 [[/* Test availability of runtime routines for shift and division. */ |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
107 long long int llmax = 9223372036854775807ll; |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
108 unsigned long long int ullmax = 18446744073709551615ull; |
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
109 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
110 | (llmax / ll) | (llmax % ll) |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
111 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
112 | (ullmax / ull) | (ullmax % ull));]]) |
9431
5ba286cacd14
Ensure AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT are consistent.
Bruno Haible <bruno@clisp.org>
parents:
9350
diff
changeset
|
113 ]) |