summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgtools/pkg_install/Makefile5
-rw-r--r--pkgtools/pkg_install/files/lib/dewey.c29
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
3 files changed, 22 insertions, 16 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 8b440525347..a94fd2fd91f 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.142 2007/09/08 21:57:59 jlam Exp $
+# $NetBSD: Makefile,v 1.143 2007/09/27 13:30:27 joerg Exp $
# Notes to package maintainers:
#
@@ -137,7 +137,8 @@ pre-configure:
cd ${WRKDIR}/libarchive && \
${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
- ./configure --disable-shared --disable-bsdtar
+ ./configure --disable-shared --disable-bsdtar \
+ --disable-dependency-tracking
cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
.endif
diff --git a/pkgtools/pkg_install/files/lib/dewey.c b/pkgtools/pkg_install/files/lib/dewey.c
index 015dc0da163..a6ece428ea2 100644
--- a/pkgtools/pkg_install/files/lib/dewey.c
+++ b/pkgtools/pkg_install/files/lib/dewey.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dewey.c,v 1.7 2007/09/16 19:03:52 joerg Exp $ */
+/* $NetBSD: dewey.c,v 1.8 2007/09/27 13:30:28 joerg Exp $ */
/*
* Copyright © 2002 Alistair G. Crooks. All rights reserved.
@@ -127,14 +127,17 @@ mkcomponent(arr_t *ap, const char *num)
int n;
const char *cp;
- if (ap->size == 0) {
- ap->size = 62;
- if ((ap->v = malloc(ap->size * sizeof(int))) == NULL)
- err(EXIT_FAILURE, "mkver malloc failed");
- } else {
- ap->size *= 2;
- if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
- err(EXIT_FAILURE, "mkver realloc failed");
+ if (ap->c == ap->size) {
+ if (ap->size == 0) {
+ ap->size = 62;
+ if ((ap->v = malloc(ap->size * sizeof(int))) == NULL)
+ err(EXIT_FAILURE, "mkver malloc failed");
+ } else {
+ ap->size *= 2;
+ if ((ap->v = realloc(ap->v, ap->size * sizeof(int)))
+ == NULL)
+ err(EXIT_FAILURE, "mkver realloc failed");
+ }
}
if (isdigit((unsigned char)*num)) {
for (cp = num, n = 0 ; isdigit((unsigned char)*num) ; num++) {
@@ -159,9 +162,11 @@ mkcomponent(arr_t *ap, const char *num)
if (isalpha((unsigned char)*num)) {
ap->v[ap->c++] = Dot;
cp = strchr(alphas, tolower((unsigned char)*num));
- ap->size *= 2;
- if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
- err(EXIT_FAILURE, "mkver realloc failed");
+ if (ap->c == ap->size) {
+ ap->size *= 2;
+ if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
+ err(EXIT_FAILURE, "mkver realloc failed");
+ }
ap->v[ap->c++] = (int)(cp - alphas) + 1;
return 1;
}
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 30cb41b3fd3..e706b6c88c3 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.82 2007/09/16 19:03:52 joerg Exp $ */
+/* $NetBSD: version.h,v 1.83 2007/09/27 13:30:28 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20070916"
+#define PKGTOOLS_VERSION "20070927"
#endif /* _INST_LIB_VERSION_H_ */