diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-10-27 21:09:25 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-10-27 21:09:25 +0200 |
commit | b01c59681ab6cc941426adbf195e0edc74b2da6d (patch) | |
tree | 998fab691c06bc25ba085b1d94b436e495d67dab /lgl | |
parent | d32e73c82e1a7842245413f812b0995de3f33eb8 (diff) | |
download | gnutls-b01c59681ab6cc941426adbf195e0edc74b2da6d.tar.gz |
Update gnulib files.
Diffstat (limited to 'lgl')
-rw-r--r-- | lgl/m4/gnulib-common.m4 | 45 | ||||
-rw-r--r-- | lgl/m4/ulonglong.m4 | 4 | ||||
-rw-r--r-- | lgl/stdbool.in.h | 7 | ||||
-rw-r--r-- | lgl/stdint.in.h | 5 |
4 files changed, 55 insertions, 6 deletions
diff --git a/lgl/m4/gnulib-common.m4 b/lgl/m4/gnulib-common.m4 index 539801080d..9336d72605 100644 --- a/lgl/m4/gnulib-common.m4 +++ b/lgl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 2 +# gnulib-common.m4 serial 3 dnl Copyright (C) 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -20,3 +20,46 @@ m4_ifdef([AC_PROG_MKDIR_P], [], [ [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) + +# AC_C_RESTRICT +# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, +# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ +# works. +# This definition can be removed once autoconf >= 2.62 can be assumed. +AC_DEFUN([AC_C_RESTRICT], +[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict, + [ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + }]], + [[int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t)]])], + [ac_cv_c_restrict=$ac_kw]) + test "$ac_cv_c_restrict" != no && break + done + ]) + AH_VERBATIM([restrict], +[/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif]) + case $ac_cv_c_restrict in + restrict) ;; + no) AC_DEFINE([restrict], []) ;; + *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; + esac +]) diff --git a/lgl/m4/ulonglong.m4 b/lgl/m4/ulonglong.m4 index e9807895a7..34f06e4c95 100644 --- a/lgl/m4/ulonglong.m4 +++ b/lgl/m4/ulonglong.m4 @@ -1,4 +1,4 @@ -# ulonglong.m4 serial 7 +# ulonglong.m4 serial 8 dnl Copyright (C) 1999-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[#if ! (18446744073709551615ULL <= -1u) + [[#if ! (18446744073709551615ULL <= -1ull) error in preprocessor; #endif unsigned long long int ull = 18446744073709551615ULL; diff --git a/lgl/stdbool.in.h b/lgl/stdbool.in.h index 4762a5c301..4e043a0b0b 100644 --- a/lgl/stdbool.in.h +++ b/lgl/stdbool.in.h @@ -97,10 +97,11 @@ typedef bool _Bool; "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". - The only benefit of the enum type, debuggability, is not important - with these compilers. So use 'signed char' and no typedef. */ + Even the existence of an enum type, without a typedef, + "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. + The only benefit of the enum, debuggability, is not important + with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char -enum { false = 0, true = 1 }; # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ diff --git a/lgl/stdint.in.h b/lgl/stdint.in.h index 163378ce7d..cb0f8e771c 100644 --- a/lgl/stdint.in.h +++ b/lgl/stdint.in.h @@ -247,6 +247,11 @@ # define uintmax_t unsigned long int #endif +/* Verify that intmax_t and uintmax_t have the same size. Too much code + breaks if this is not the case. If this check fails, the reason is likely + to be found in the autoconf macros. */ +typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; + /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS |