pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/digest/files Define int64_t if missing. Shoul...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/891066e907bb
branches:  trunk
changeset: 392759:891066e907bb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat May 09 01:45:10 2009 +0000

description:
Define int64_t if missing. Should fix PR 41396.

diffstat:

 pkgtools/digest/files/config.h.in  |    4 +
 pkgtools/digest/files/configure    |  116 +++++++++++++++++++++++++++++++++++++
 pkgtools/digest/files/configure.ac |    3 +-
 3 files changed, 122 insertions(+), 1 deletions(-)

diffs (157 lines):

diff -r c7c8c8b56e47 -r 891066e907bb pkgtools/digest/files/config.h.in
--- a/pkgtools/digest/files/config.h.in Fri May 08 21:36:09 2009 +0000
+++ b/pkgtools/digest/files/config.h.in Sat May 09 01:45:10 2009 +0000
@@ -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 -r c7c8c8b56e47 -r 891066e907bb pkgtools/digest/files/configure
--- a/pkgtools/digest/files/configure   Fri May 08 21:36:09 2009 +0000
+++ b/pkgtools/digest/files/configure   Sat May 09 01:45:10 2009 +0000
@@ -4208,6 +4208,122 @@
   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 -r c7c8c8b56e47 -r 891066e907bb pkgtools/digest/files/configure.ac
--- a/pkgtools/digest/files/configure.ac        Fri May 08 21:36:09 2009 +0000
+++ b/pkgtools/digest/files/configure.ac        Sat May 09 01:45:10 2009 +0000
@@ -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@localhost])
@@ -30,6 +30,7 @@
 AC_TYPE_UINT8_T
 AC_TYPE_UINT16_T
 AC_TYPE_UINT32_T
+AC_TYPE_INT64_T
 AC_TYPE_UINT64_T
 
 AC_C_BIGENDIAN



Home | Main Index | Thread Index | Old Index