pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files add autoconf test for missi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0d3d4877bddc
branches: trunk
changeset: 495447:0d3d4877bddc
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Fri Jun 10 01:37:21 2005 +0000
description:
add autoconf test for missing (like in openbsd-3.6) or broken (like
in AIX-4.3.2) PRIu64. If it is missing or broken, provide one. Should
address PR30375. Welcome to pkg_install-20050607
diffstat:
pkgtools/pkg_install/files/add/perform.c | 25 +-
pkgtools/pkg_install/files/configure | 1357 +++++++++++++++++++++++++++-
pkgtools/pkg_install/files/configure.ac | 46 +-
pkgtools/pkg_install/files/lib/config.h.in | 12 +
pkgtools/pkg_install/files/lib/version.h | 4 +-
5 files changed, 1429 insertions(+), 15 deletions(-)
diffs (truncated from 1583 to 300 lines):
diff -r bff381fbbd56 -r 0d3d4877bddc pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Thu Jun 09 21:10:59 2005 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Fri Jun 10 01:37:21 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.30 2005/05/28 02:50:46 dmcmahill Exp $ */
+/* $NetBSD: perform.c,v 1.31 2005/06/10 01:37:21 dmcmahill Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.30 2005/05/28 02:50:46 dmcmahill Exp $");
+__RCSID("$NetBSD: perform.c,v 1.31 2005/06/10 01:37:21 dmcmahill Exp $");
#endif
#endif
@@ -67,6 +67,26 @@
static package_t Plist;
static char *Home;
+/*
+ * Some systems such as OpenBSD-3.6 do not provide PRIu64.
+ * Others such as AIX-4.3.2 have a broken PRIu64 which includes
+ * a leading "%".
+ */
+#ifdef NEED_PRI_MACRO
+# ifdef PRIu64
+# undef PRIu64
+# endif
+# if SIZEOF_INT == 8
+# define PRIu64 "u"
+# elif SIZEOF_LONG == 8
+# define PRIu64 "lu"
+# elif SIZEOF_LONG_LONG == 8
+# define PRIu64 "llu"
+# else
+# error "unable to find a suitable PRIu64"
+# endif
+#endif
+
/* used in build information */
enum {
Good,
@@ -323,7 +343,6 @@
* take up once it's unpacked. I've noticed that most packages
* compress an average of 75%, so multiply by 4 for good measure.
*/
-
needed = 4 * (uint64_t) sb.st_size;
if (!inPlace && min_free(playpen) < needed) {
warnx("projected size of %" PRIu64 " bytes exceeds available free space\n"
diff -r bff381fbbd56 -r 0d3d4877bddc pkgtools/pkg_install/files/configure
--- a/pkgtools/pkg_install/files/configure Thu Jun 09 21:10:59 2005 +0000
+++ b/pkgtools/pkg_install/files/configure Fri Jun 10 01:37:21 2005 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for pkg_install 20050527.
+# Generated by GNU Autoconf 2.59 for pkg_install 20050607.
#
# Report bugs to <grant%NetBSD.org@localhost>.
#
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='pkg_install'
PACKAGE_TARNAME='pkg_install'
-PACKAGE_VERSION='20050527'
-PACKAGE_STRING='pkg_install 20050527'
+PACKAGE_VERSION='20050607'
+PACKAGE_STRING='pkg_install 20050607'
PACKAGE_BUGREPORT='grant%NetBSD.org@localhost'
ac_unique_file="lib/plist.c"
@@ -780,7 +780,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pkg_install 20050527 to adapt to many kinds of systems.
+\`configure' configures pkg_install 20050607 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -841,7 +841,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pkg_install 20050527:";;
+ short | recursive ) echo "Configuration of pkg_install 20050607:";;
esac
cat <<\_ACEOF
@@ -962,7 +962,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-pkg_install configure 20050527
+pkg_install configure 20050607
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -976,7 +976,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pkg_install $as_me 20050527, which was
+It was created by pkg_install $as_me 20050607, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -4523,6 +4523,1345 @@
done
+need_priu64=no
+echo "$as_me:$LINENO: checking for a working PRIu64" >&5
+echo $ECHO_N "checking for a working PRIu64... $ECHO_C" >&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test "$cross_compiling" = yes; then
+
+ # we are cross compiling
+ echo "$as_me:$LINENO: result: unable to check when crosscompiling" >&5
+echo "${ECHO_T}unable to check when crosscompiling" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_PRI_MACRO 1
+_ACEOF
+
+ need_priu64=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <stdio.h>
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+
+int
+main ()
+{
+
+ char *x;
+ #if !defined(PRIu64)
+ return -1;
+ #else
+ x = PRIu64;
+ if( x[0] == '%' ) {
+ return -1;
+ } else {
+ return 0;
+ }
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ # program worked correctly
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+ # program failed
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_PRI_MACRO 1
+_ACEOF
+
+ need_priu64=yes
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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 ()
+{
+if ((int *) 0)
+ return 0;
+if (sizeof (int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6
+
+echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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 * !(((long) (sizeof (int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
Home |
Main Index |
Thread Index |
Old Index