Clipboard/m4/longlong.m4
Cristian Henzel 2ccc2c6846 ClipIt-v1.3.7-12122010001
+ Fixed: Changed E-Mail address and Project website.
+ Fixed: Included all files that get generated by autogen.sh, so
                that now you don't need to run it anymore.

Changes to be committed:

	new file:   ABOUT-NLS
	modified:   AUTHORS
	modified:   ChangeLog
	new file:   Makefile.in
	modified:   NEWS
	modified:   README
	new file:   aclocal.m4
	new file:   autom4te.cache/output.0
	new file:   autom4te.cache/output.1
	new file:   autom4te.cache/requests
	new file:   autom4te.cache/traces.0
	new file:   autom4te.cache/traces.1
	new file:   config.h.in
	new file:   configure
	modified:   configure.in
	new file:   data/Makefile.in
	new file:   doc/Makefile.in
	modified:   doc/clipit.1
	new file:   intltool-extract.in
	new file:   intltool-merge.in
	new file:   intltool-update.in
	new file:   m4/codeset.m4
	new file:   m4/fcntl-o.m4
	new file:   m4/glibc2.m4
	new file:   m4/glibc21.m4
	new file:   m4/intdiv0.m4
	new file:   m4/intl.m4
	new file:   m4/intldir.m4
	new file:   m4/intlmacosx.m4
	new file:   m4/intmax.m4
	new file:   m4/inttypes-pri.m4
	new file:   m4/inttypes_h.m4
	new file:   m4/lcmessage.m4
	new file:   m4/lock.m4
	new file:   m4/longlong.m4
	new file:   m4/printf-posix.m4
	new file:   m4/size_max.m4
	new file:   m4/stdint_h.m4
	new file:   m4/threadlib.m4
	new file:   m4/uintmax_t.m4
	new file:   m4/visibility.m4
	new file:   m4/wchar_t.m4
	new file:   m4/wint_t.m4
	new file:   m4/xsize.m4
	new file:   po/Makefile.in.in~
	new file:   po/Makevars.template
	new file:   po/Rules-quot
	new file:   po/boldquot.sed
	new file:   po/en@boldquot.header
	new file:   po/en@quot.header
	new file:   po/insert-header.sin
	new file:   po/quot.sed
	new file:   po/remove-potcdate.sin
	modified:   po/zh_CN.po
	new file:   src/Makefile.in
	modified:   src/daemon.c
	modified:   src/daemon.h
	modified:   src/history.c
	modified:   src/history.h
	modified:   src/main.c
	modified:   src/main.h
	modified:   src/manage.c
	modified:   src/manage.h
	modified:   src/preferences.c
	modified:   src/preferences.h
	modified:   src/utils.c
	modified:   src/utils.h
2010-12-22 22:17:33 +02:00

107 lines
4.4 KiB
Plaintext

# longlong.m4 serial 14
dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert.
# Define HAVE_LONG_LONG_INT if 'long long int' works.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'long long int' exists but is only 32 bits large
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
# defined. In this case you can treat 'long long int' like 'long int'.
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
[
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[AC_LINK_IFELSE(
[_AC_TYPE_LONG_LONG_SNIPPET],
[dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
dnl If cross compiling, assume the bug isn't important, since
dnl nobody cross compiles for this platform as far as we know.
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[@%:@include <limits.h>
@%:@ifndef LLONG_MAX
@%:@ define HALF \
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
@%:@ define LLONG_MAX (HALF - 1 + HALF)
@%:@endif]],
[[long long int n = 1;
int i;
for (i = 0; ; i++)
{
long long int m = n << i;
if (m >> i != n)
return 1;
if (LLONG_MAX / 2 < m)
break;
}
return 0;]])],
[ac_cv_type_long_long_int=yes],
[ac_cv_type_long_long_int=no],
[ac_cv_type_long_long_int=yes])],
[ac_cv_type_long_long_int=no])])
if test $ac_cv_type_long_long_int = yes; then
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
[Define to 1 if the system has the type `long long int'.])
fi
])
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'unsigned long long int' exists but is only 32 bits
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
# will not be defined. In this case you can treat 'unsigned long long int'
# like 'unsigned long int'.
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
[
AC_CACHE_CHECK([for unsigned long long int],
[ac_cv_type_unsigned_long_long_int],
[AC_LINK_IFELSE(
[_AC_TYPE_LONG_LONG_SNIPPET],
[ac_cv_type_unsigned_long_long_int=yes],
[ac_cv_type_unsigned_long_long_int=no])])
if test $ac_cv_type_unsigned_long_long_int = yes; then
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
[Define to 1 if the system has the type `unsigned long long int'.])
fi
])
# Expands to a C program that can be used to test for simultaneous support
# of 'long long' and 'unsigned long long'. We don't want to say that
# 'long long' is available if 'unsigned long long' is not, or vice versa,
# because too many programs rely on the symmetry between signed and unsigned
# integer types (excluding 'bool').
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
[
AC_LANG_PROGRAM(
[[/* For now, do not test the preprocessor; as of 2007 there are too many
implementations with broken preprocessors. Perhaps this can
be revisited in 2012. In the meantime, code should not expect
#if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
int i = 63;]],
[[/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));]])
])