"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "m4/stdint.m4" between
gcal-4.tar.gz and gcal-4.1.tar.gz

About: Gcal displays month/year calendar sheets, eternal holiday and fixed date lists in many ways.

stdint.m4  (gcal-4):stdint.m4  (gcal-4.1)
# stdint.m4 serial 43 # stdint.m4 serial 50
dnl Copyright (C) 2001-2015 Free Software Foundation, Inc. dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Bruno Haible. dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted. dnl Test whether <stdint.h> is supported or must be substituted.
AC_DEFUN_ONCE([gl_STDINT_H], AC_DEFUN_ONCE([gl_STDINT_H],
[ [
AC_PREREQ([2.59])dnl AC_PREREQ([2.59])dnl
AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T])
dnl Check for long long int and unsigned long long int. dnl Check for long long int and unsigned long long int.
AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
if test $ac_cv_type_long_long_int = yes; then if test $ac_cv_type_long_long_int = yes; then
HAVE_LONG_LONG_INT=1 HAVE_LONG_LONG_INT=1
else else
HAVE_LONG_LONG_INT=0 HAVE_LONG_LONG_INT=0
fi fi
AC_SUBST([HAVE_LONG_LONG_INT]) AC_SUBST([HAVE_LONG_LONG_INT])
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
if test $ac_cv_type_unsigned_long_long_int = yes; then if test $ac_cv_type_unsigned_long_long_int = yes; then
skipping to change at line 73 skipping to change at line 76
AC_SUBST([HAVE_STDINT_H]) AC_SUBST([HAVE_STDINT_H])
dnl Now see whether we need a substitute <stdint.h>. dnl Now see whether we need a substitute <stdint.h>.
if test $ac_cv_header_stdint_h = yes; then if test $ac_cv_header_stdint_h = yes; then
AC_CACHE_CHECK([whether stdint.h conforms to C99], AC_CACHE_CHECK([whether stdint.h conforms to C99],
[gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h],
[gl_cv_header_working_stdint_h=no [gl_cv_header_working_stdint_h=no
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h> #include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX) #if !(defined WCHAR_MIN && defined WCHAR_MAX)
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
#endif #endif
] ]
gl_STDINT_INCLUDES gl_STDINT_INCLUDES
[ [
#ifdef INT8_MAX #ifdef INT8_MAX
int8_t a1 = INT8_MAX; int8_t a1 = INT8_MAX;
skipping to change at line 153 skipping to change at line 158
#ifdef INTPTR_MAX #ifdef INTPTR_MAX
intptr_t g = INTPTR_MAX; intptr_t g = INTPTR_MAX;
intptr_t gmin = INTPTR_MIN; intptr_t gmin = INTPTR_MIN;
#endif #endif
#ifdef UINTPTR_MAX #ifdef UINTPTR_MAX
uintptr_t h = UINTPTR_MAX; uintptr_t h = UINTPTR_MAX;
#endif #endif
intmax_t i = INTMAX_MAX; intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX; uintmax_t j = UINTMAX_MAX;
/* Check that SIZE_MAX has the correct type, if possible. */
#if 201112 <= __STDC_VERSION__
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
|| (0x5110 <= __SUNPRO_C && !__STDC__))
extern size_t k;
extern __typeof__ (SIZE_MAX) k;
#endif
#include <limits.h> /* for CHAR_BIT */ #include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \ #define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
#define TYPE_MAXIMUM(t) \ #define TYPE_MAXIMUM(t) \
((t) ((t) 0 < (t) -1 \ ((t) ((t) 0 < (t) -1 \
? (t) -1 \ ? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
struct s { struct s {
int check_PTRDIFF: int check_PTRDIFF:
PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
skipping to change at line 221 skipping to change at line 235
}; };
]])], ]])],
[dnl Determine whether the various *_MIN, *_MAX macros are usable [dnl Determine whether the various *_MIN, *_MAX macros are usable
dnl in preprocessor expression. We could do it by compiling a test dnl in preprocessor expression. We could do it by compiling a test
dnl program for each of these macros. It is faster to run a program dnl program for each of these macros. It is faster to run a program
dnl that inspects the macro expansion. dnl that inspects the macro expansion.
dnl This detects a bug on HP-UX 11.23/ia64. dnl This detects a bug on HP-UX 11.23/ia64.
AC_RUN_IFELSE([ AC_RUN_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h> #include <stdint.h>
] ]
gl_STDINT_INCLUDES gl_STDINT_INCLUDES
[ [
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#define MVAL(macro) MVAL1(macro) #define MVAL(macro) MVAL1(macro)
#define MVAL1(expression) #expression #define MVAL1(expression) #expression
static const char *macro_values[] = static const char *macro_values[] =
{ {
skipping to change at line 281 skipping to change at line 297
return 0; return 0;
]])], ]])],
[gl_cv_header_working_stdint_h=yes], [gl_cv_header_working_stdint_h=yes],
[], [],
[dnl When cross-compiling, assume it works. [dnl When cross-compiling, assume it works.
gl_cv_header_working_stdint_h=yes gl_cv_header_working_stdint_h=yes
]) ])
]) ])
]) ])
fi fi
HAVE_C99_STDINT_H=0
HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then if test "$gl_cv_header_working_stdint_h" = yes; then
STDINT_H= HAVE_C99_STDINT_H=1
dnl Now see whether the system <stdint.h> works without
dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
AC_CACHE_CHECK([whether stdint.h predates C++11],
[gl_cv_header_stdint_predates_cxx11_h],
[gl_cv_header_stdint_predates_cxx11_h=yes
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
gl_STDINT_INCLUDES
[
intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);
]])],
[gl_cv_header_stdint_predates_cxx11_h=no])])
if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
[Define to 1 if the system <stdint.h> predates C++11.])
AC_DEFINE([__STDC_LIMIT_MACROS], [1],
[Define to 1 if the system <stdint.h> predates C++11.])
fi
AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
[gl_cv_header_stdint_width],
[gl_cv_header_stdint_width=no
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
/* Work if build is not clean. */
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#endif
#include <stdint.h>
]gl_STDINT_INCLUDES[
int iw = UINTMAX_WIDTH;
]])],
[gl_cv_header_stdint_width=yes])])
if test "$gl_cv_header_stdint_width" = yes; then
STDINT_H=
fi
else else
dnl Check for <sys/inttypes.h>, and for dnl Check for <sys/inttypes.h>, and for
dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
if test $ac_cv_header_sys_inttypes_h = yes; then if test $ac_cv_header_sys_inttypes_h = yes; then
HAVE_SYS_INTTYPES_H=1 HAVE_SYS_INTTYPES_H=1
else
HAVE_SYS_INTTYPES_H=0
fi fi
AC_SUBST([HAVE_SYS_INTTYPES_H])
if test $ac_cv_header_sys_bitypes_h = yes; then if test $ac_cv_header_sys_bitypes_h = yes; then
HAVE_SYS_BITYPES_H=1 HAVE_SYS_BITYPES_H=1
else
HAVE_SYS_BITYPES_H=0
fi fi
AC_SUBST([HAVE_SYS_BITYPES_H])
gl_STDINT_TYPE_PROPERTIES gl_STDINT_TYPE_PROPERTIES
STDINT_H=stdint.h
fi fi
dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h
AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
AC_SUBST([HAVE_C99_STDINT_H])
AC_SUBST([HAVE_SYS_BITYPES_H])
AC_SUBST([HAVE_SYS_INTTYPES_H])
AC_SUBST([STDINT_H]) AC_SUBST([STDINT_H])
AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
]) ])
dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
dnl Determine the size of each of the given types in bits. dnl Determine the size of each of the given types in bits.
AC_DEFUN([gl_STDINT_BITSIZEOF], AC_DEFUN([gl_STDINT_BITSIZEOF],
[ [
dnl Use a shell loop, to avoid bloating configure, and dnl Use a shell loop, to avoid bloating configure, and
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
skipping to change at line 470 skipping to change at line 532
gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
[gl_STDINT_INCLUDES]) [gl_STDINT_INCLUDES])
fi fi
gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
[gl_STDINT_INCLUDES]) [gl_STDINT_INCLUDES])
dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99
dnl requirement that wint_t is "unchanged by default argument promotions". dnl requirement that wint_t is "unchanged by default argument promotions".
dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t. dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
dnl Set the variable BITSIZEOF_WINT_T accordingly. dnl Set the variable BITSIZEOF_WINT_T accordingly.
if test $BITSIZEOF_WINT_T -lt 32; then if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32 BITSIZEOF_WINT_T=32
fi fi
]) ])
dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
dnl Remove this when we can assume autoconf >= 2.61. dnl Remove this when we can assume autoconf >= 2.61.
m4_ifdef([AC_COMPUTE_INT], [], [ m4_ifdef([AC_COMPUTE_INT], [], [
AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
]) ])
# Hey Emacs!
# Local Variables:
# indent-tabs-mode: nil
# End:
 End of changes. 15 change blocks. 
12 lines changed or deleted 74 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS