aboutsummaryrefslogtreecommitdiff
path: root/m4/longlong.m4
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-02-08 20:45:54 +0000
committerChristian Grothoff <christian@grothoff.org>2007-02-08 20:45:54 +0000
commit84ddc15a76bea41cfe2f3aabd01262297d5beca2 (patch)
treeedb9f83227fb1551247edfd9412a2cadbc53e0ed /m4/longlong.m4
parentc1e8a74921872524d75543f9863c8a9a9ac30786 (diff)
downloadgnunet-gtk-84ddc15a76bea41cfe2f3aabd01262297d5beca2.tar.gz
gnunet-gtk-84ddc15a76bea41cfe2f3aabd01262297d5beca2.zip
gettext update
Diffstat (limited to 'm4/longlong.m4')
-rw-r--r--m4/longlong.m453
1 files changed, 38 insertions, 15 deletions
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index d7d7350b..3716c09f 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,23 +1,46 @@
1# longlong.m4 serial 4 1# longlong.m4 serial 8
2dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. 2dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
11# Define HAVE_LONG_LONG if 'long long' works. 9# Define HAVE_LONG_LONG_INT if 'long long int' works.
10# This fixes a bug in Autoconf 2.60, but can be removed once we
11# assume 2.61 everywhere.
12 12
13AC_DEFUN([jm_AC_TYPE_LONG_LONG], 13# Note: If the type 'long long int' exists but is only 32 bits large
14# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
15# defined. In this case you can treat 'long long int' like 'long int'.
16
17AC_DEFUN([AC_TYPE_LONG_LONG_INT],
18[
19 AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
20 [AC_LINK_IFELSE(
21 [AC_LANG_PROGRAM(
22 [[long long int ll = 9223372036854775807ll;
23 long long int nll = -9223372036854775807LL;
24 typedef int a[((-9223372036854775807LL < 0
25 && 0 < 9223372036854775807ll)
26 ? 1 : -1)];
27 int i = 63;]],
28 [[long long int llmax = 9223372036854775807ll;
29 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
30 | (llmax / ll) | (llmax % ll));]])],
31 [ac_cv_type_long_long_int=yes],
32 [ac_cv_type_long_long_int=no])])
33 if test $ac_cv_type_long_long_int = yes; then
34 AC_DEFINE([HAVE_LONG_LONG_INT], 1,
35 [Define to 1 if the system has the type `long long int'.])
36 fi
37])
38
39# This macro is obsolescent and should go away soon.
40AC_DEFUN([gl_AC_TYPE_LONG_LONG],
14[ 41[
15 AC_CACHE_CHECK([for long long], ac_cv_type_long_long, 42 AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
16 [AC_TRY_LINK([long long ll = 1LL; int i = 63;], 43 ac_cv_type_long_long=$ac_cv_type_long_long_int
17 [long long llmax = (long long) -1;
18 return ll << i | ll >> i | llmax / ll | llmax % ll;],
19 ac_cv_type_long_long=yes,
20 ac_cv_type_long_long=no)])
21 if test $ac_cv_type_long_long = yes; then 44 if test $ac_cv_type_long_long = yes; then
22 AC_DEFINE(HAVE_LONG_LONG, 1, 45 AC_DEFINE(HAVE_LONG_LONG, 1,
23 [Define if you have the 'long long' type.]) 46 [Define if you have the 'long long' type.])