summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-18 15:55:38 +0000
committerJim Meyering <jim@meyering.net>2001-08-18 15:55:38 +0000
commit1443d5fffa9dfadf7774fa4641da816445d594ad (patch)
tree792f3a3df846f55dc6616a1f5e1099896356c635
parent24844c63327835b85c421d78402eb1655b6832d6 (diff)
downloadcoreutils-1443d5fffa9dfadf7774fa4641da816445d594ad.tar.xz
(jm_AC_TYPE_LONG_LONG): New macro.
-rw-r--r--m4/longlong.m420
1 files changed, 19 insertions, 1 deletions
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index 44f7ce360..daa95c075 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,7 +1,25 @@
-#serial 3
+#serial 2
dnl From Paul Eggert.
+# Define HAVE_LONG_LONG if 'long long' works.
+
+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
+[
+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
+ [AC_TRY_LINK([long long ll = 1; int i = 63;],
+ [long long llmax = (long long) -1;
+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
+ ac_cv_type_long_long=yes,
+ ac_cv_type_long_long=no)])
+ if test $ac_cv_type_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1,
+ [Define if you have the long long type.])
+ fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
+
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
[
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,