diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /gl/m4/ulonglong.m4 | |
parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/ulonglong.m4')
-rw-r--r-- | gl/m4/ulonglong.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gl/m4/ulonglong.m4 b/gl/m4/ulonglong.m4 new file mode 100644 index 00000000..9fae98e3 --- /dev/null +++ b/gl/m4/ulonglong.m4 | |||
@@ -0,0 +1,48 @@ | |||
1 | # ulonglong.m4 serial 6 | ||
2 | dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Paul Eggert. | ||
8 | |||
9 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned 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 | |||
13 | # Note: If the type 'unsigned long long int' exists but is only 32 bits | ||
14 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT | ||
15 | # will not be defined. In this case you can treat 'unsigned long long int' | ||
16 | # like 'unsigned long int'. | ||
17 | |||
18 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], | ||
19 | [ | ||
20 | AC_CACHE_CHECK([for unsigned long long int], | ||
21 | [ac_cv_type_unsigned_long_long_int], | ||
22 | [AC_LINK_IFELSE( | ||
23 | [AC_LANG_PROGRAM( | ||
24 | [[unsigned long long int ull = 18446744073709551615ULL; | ||
25 | typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 | ||
26 | ? 1 : -1)]; | ||
27 | int i = 63;]], | ||
28 | [[unsigned long long int ullmax = 18446744073709551615ull; | ||
29 | return (ull << 63 | ull >> 63 | ull << i | ull >> i | ||
30 | | ullmax / ull | ullmax % ull);]])], | ||
31 | [ac_cv_type_unsigned_long_long_int=yes], | ||
32 | [ac_cv_type_unsigned_long_long_int=no])]) | ||
33 | if test $ac_cv_type_unsigned_long_long_int = yes; then | ||
34 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, | ||
35 | [Define to 1 if the system has the type `unsigned long long int'.]) | ||
36 | fi | ||
37 | ]) | ||
38 | |||
39 | # This macro is obsolescent and should go away soon. | ||
40 | AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], | ||
41 | [ | ||
42 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) | ||
43 | ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int | ||
44 | if test $ac_cv_type_unsigned_long_long = yes; then | ||
45 | AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, | ||
46 | [Define if you have the 'unsigned long long' type.]) | ||
47 | fi | ||
48 | ]) | ||