diff options
author | joerg <joerg> | 2009-05-09 01:45:10 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-05-09 01:45:10 +0000 |
commit | 0cb9d7121bb3363f6055a277c0ea25f588306b94 (patch) | |
tree | fc73bc9638c50ca04785075b4d259fd03c10c772 /pkgtools/digest | |
parent | 731fb1ddfe60a0e8e65ecb6d6e1330ff30c36d62 (diff) | |
download | pkgsrc-0cb9d7121bb3363f6055a277c0ea25f588306b94.tar.gz |
Define int64_t if missing. Should fix PR 41396.
Diffstat (limited to 'pkgtools/digest')
-rw-r--r-- | pkgtools/digest/files/config.h.in | 4 | ||||
-rwxr-xr-x | pkgtools/digest/files/configure | 116 | ||||
-rw-r--r-- | pkgtools/digest/files/configure.ac | 3 |
3 files changed, 122 insertions, 1 deletions
diff --git a/pkgtools/digest/files/config.h.in b/pkgtools/digest/files/config.h.in index fcb7a8ebc27..9af98157a1d 100644 --- a/pkgtools/digest/files/config.h.in +++ b/pkgtools/digest/files/config.h.in @@ -124,6 +124,10 @@ #define below would cause a syntax error. */ #undef _UINT8_T +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +#undef int64_t + /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t diff --git a/pkgtools/digest/files/configure b/pkgtools/digest/files/configure index f1267f59197..333d29014b4 100755 --- a/pkgtools/digest/files/configure +++ b/pkgtools/digest/files/configure @@ -4208,6 +4208,122 @@ _ACEOF esac + { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 +$as_echo_n "checking for int64_t... " >&6; } +if test "${ac_cv_c_int64_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; +esac + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 +$as_echo "$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; + esac + + { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 $as_echo_n "checking for uint64_t... " >&6; } if test "${ac_cv_c_uint64_t+set}" = set; then diff --git a/pkgtools/digest/files/configure.ac b/pkgtools/digest/files/configure.ac index 9398580d6f9..ddb3809870e 100644 --- a/pkgtools/digest/files/configure.ac +++ b/pkgtools/digest/files/configure.ac @@ -1,4 +1,4 @@ -dnl $Id: configure.ac,v 1.15 2008/05/11 18:39:21 joerg Exp $ +dnl $Id: configure.ac,v 1.16 2009/05/09 01:45:10 joerg Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT([nbsd-digest],[20080510],[agc@netbsd.org]) @@ -30,6 +30,7 @@ AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/param.h]) AC_TYPE_UINT8_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T +AC_TYPE_INT64_T AC_TYPE_UINT64_T AC_C_BIGENDIAN |