pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Ensure undef before typedef...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/027e496e568e
branches:  trunk
changeset: 532906:027e496e568e
user:      obache <obache%pkgsrc.org@localhost>
date:      Tue Sep 04 09:47:38 2007 +0000

description:
Ensure undef before typedef, to avoid error when a application detect missing
types by itself and define (ex, pkgtools/pkg_install).

diffstat:

 pkgtools/libnbcompat/files/bits.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r f4dbe982e7b3 -r 027e496e568e pkgtools/libnbcompat/files/bits.c
--- a/pkgtools/libnbcompat/files/bits.c Tue Sep 04 09:44:07 2007 +0000
+++ b/pkgtools/libnbcompat/files/bits.c Tue Sep 04 09:47:38 2007 +0000
@@ -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 @@
         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 @@
     }
     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");



Home | Main Index | Thread Index | Old Index