pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/mtree/files sync with -current:
details: https://anonhg.NetBSD.org/pkgsrc/rev/9d94dac99c52
branches: trunk
changeset: 465059:9d94dac99c52
user: grant <grant%pkgsrc.org@localhost>
date: Sat Dec 20 04:52:50 2003 +0000
description:
sync with -current:
#include <util.h>
this is needed by fparseln on macos/darwin and is harmless on netbsd
Include filename in:
'existing entry for `sha1.h', type `file' does not match type `link'
realloc pedant
diffstat:
pkgtools/mtree/files/spec.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r f47ad4ad1170 -r 9d94dac99c52 pkgtools/mtree/files/spec.c
--- a/pkgtools/mtree/files/spec.c Sat Dec 20 04:48:05 2003 +0000
+++ b/pkgtools/mtree/files/spec.c Sat Dec 20 04:52:50 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spec.c,v 1.1 2003/09/05 18:39:00 jlam Exp $ */
+/* $NetBSD: spec.c,v 1.2 2003/12/20 04:52:50 grant Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -76,7 +76,7 @@
#if 0
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: spec.c,v 1.1 2003/09/05 18:39:00 jlam Exp $");
+__RCSID("$NetBSD: spec.c,v 1.2 2003/12/20 04:52:50 grant Exp $");
#endif
#endif /* not lint */
@@ -114,6 +114,9 @@
#if HAVE_VIS_H
#include <vis.h>
#endif
+#if HAVE_UTIL_H
+#include <util.h>
+#endif
#include "extern.h"
#include "pack_dev.h"
@@ -132,7 +135,7 @@
NODE *centry, *last, *pathparent, *cur;
char *p, *e, *next;
NODE ginfo, *root;
- char *buf, *tname;
+ char *buf, *tname, *ntname;
size_t tnamelen, plen;
root = NULL;
@@ -190,9 +193,10 @@
plen = strlen(p) + 1;
if (plen > tnamelen) {
+ if ((ntname = realloc(tname, plen)) == NULL)
+ mtree_err("realloc: %s", strerror(errno));
+ tname = ntname;
tnamelen = plen;
- if ((tname = realloc(tname, tnamelen)) == NULL)
- mtree_err("realloc: %s", strerror(errno));
}
if (strunvis(tname, p) == -1)
mtree_err("strunvis failed on `%s'", p);
@@ -434,8 +438,8 @@
{
if (cur->type != new->type)
- mtree_err("existing entry type `%s' does not match type `%s'",
- nodetype(cur->type), nodetype(new->type));
+ mtree_err("existing entry for `%s', type `%s' does not match type `%s'",
+ cur->name, nodetype(cur->type), nodetype(new->type));
#define REPLACE(x) cur->x = new->x
#define REPLACESTR(x) if (cur->x) free(cur->x); cur->x = new->x
Home |
Main Index |
Thread Index |
Old Index