summaryrefslogtreecommitdiff
path: root/pkgtools/digest
diff options
context:
space:
mode:
authorjoerg <joerg>2009-05-09 01:45:10 +0000
committerjoerg <joerg>2009-05-09 01:45:10 +0000
commitc65886d2e89d3b7e2bcf666e53c5d852404de2dd (patch)
treefc73bc9638c50ca04785075b4d259fd03c10c772 /pkgtools/digest
parente25793ed0a06068ccca42ed128495b09fdc02bcf (diff)
downloadpkgsrc-c65886d2e89d3b7e2bcf666e53c5d852404de2dd.tar.gz
Define int64_t if missing. Should fix PR 41396.
Diffstat (limited to 'pkgtools/digest')
-rw-r--r--pkgtools/digest/files/config.h.in4
-rwxr-xr-xpkgtools/digest/files/configure116
-rw-r--r--pkgtools/digest/files/configure.ac3
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