summaryrefslogtreecommitdiff
path: root/pkgtools/libnbcompat
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2007-09-04 09:47:38 +0000
committerobache <obache@pkgsrc.org>2007-09-04 09:47:38 +0000
commita22621e7ed9467ac998be30ffe32a3609465f8ce (patch)
treefc8bbab89302edf26e85721436d1e92021583d17 /pkgtools/libnbcompat
parentbf6beaf8cb99acaf3f0afbc9873e7d848e60aa26 (diff)
downloadpkgsrc-a22621e7ed9467ac998be30ffe32a3609465f8ce.tar.gz
Ensure undef before typedef, to avoid error when a application detect missing
types by itself and define (ex, pkgtools/pkg_install).
Diffstat (limited to 'pkgtools/libnbcompat')
-rw-r--r--pkgtools/libnbcompat/files/bits.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgtools/libnbcompat/files/bits.c b/pkgtools/libnbcompat/files/bits.c
index a0561e2c41f..9d3842a2304 100644
--- a/pkgtools/libnbcompat/files/bits.c
+++ b/pkgtools/libnbcompat/files/bits.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $ */
+/* $NetBSD: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $ */
/*
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
@@ -35,7 +35,7 @@
#include "nbcompat/config.h"
#if 0
-__RCSID("$NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $");
+__RCSID("$NetBSD: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $");
#endif
#include <stdio.h>
#include <string.h>
@@ -51,6 +51,7 @@ __RCSID("$NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $");
int tabs; \
sprintf(tmp, "%sint%d_t" , pre, len); \
sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
+ fprintf(f, "#undef %s\n", tmp); \
tabs = 5 - strlen(tmp2) / 8; \
fprintf(f, "%s", tmp2); \
while(tabs-- > 0) fprintf(f, "\t"); \
@@ -129,7 +130,7 @@ int main(int argc, char **argv)
}
fprintf(f, "/* %s -- this file was generated by\n", fn);
fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "",
- "$Id: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $");
+ "$Id: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $");
fprintf(f, "#ifndef %s\n", hb);
fprintf(f, "#define %s\n", hb);
fprintf(f, "\n");