NetBSD-Bugs archive

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

Re: toolchain/41435: build.sh tools from netbsd-4 fails on cygwin-1.7.0



>Synopsis:       build.sh tools from netbsd-4 fails on cygwin-1.7.0

This also occurs on -current and cygwin-1.7.1.

> >Description:
> Running build.sh -m i386 tools under Cygwin 1.7.0 and a netbsd-5 tree 
> eventually
>  fails:
> 
> #   compile  asn1_compile/gen.lo
 :
> /home/jmcneill/branches/netbsd-5/src/include/heimdal/roken.h:93: error: 
> conflict
> ing types for 'asnprintf'
> /usr/include/stdio.h:248: error: previous declaration of 'asnprintf' was here

The problem here is including src/include/heimdal/roken.h which is
"an OS dependent, generated file" configured for NetBSD
as noted in itself on building tools on a host,
which is possibly not NetBSD.

ans1_compile (and compile_et) itself doesn't require asnprintf()
and vasnprint(), so including <roken-common.h> (which is included
from generated <roken.h> and required for TRUE and FALSE definitions)
in #ifdef HAVE_NBTOOL_CONFIG_H case could be the easiest workaround.

At least build.sh tools works fine with it. (build.sh release is ongoing)

Comments?
---
Index: crypto/dist/heimdal/lib/asn1/gen_locl.h
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/asn1/gen_locl.h,v
retrieving revision 1.2
diff -u -r1.2 gen_locl.h
--- crypto/dist/heimdal/lib/asn1/gen_locl.h     22 Mar 2008 08:37:04 -0000      
1.2
+++ crypto/dist/heimdal/lib/asn1/gen_locl.h     29 Dec 2009 10:37:06 -0000
@@ -49,7 +49,11 @@
 #include <time.h>
 #include <errno.h>
 #include <err.h>
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include <roken-common.h>
+#else
 #include <roken.h>
+#endif
 #include "hash.h"
 #include "symbol.h"
 #include "asn1-common.h"
Index: crypto/dist/heimdal/lib/asn1/lex.h
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/asn1/lex.h,v
retrieving revision 1.2
diff -u -r1.2 lex.h
--- crypto/dist/heimdal/lib/asn1/lex.h  22 Mar 2008 08:37:04 -0000      1.2
+++ crypto/dist/heimdal/lib/asn1/lex.h  29 Dec 2009 10:37:06 -0000
@@ -34,7 +34,12 @@
 /* $Heimdal: lex.h 15617 2005-07-12 06:27:42Z lha $
    $NetBSD: lex.h,v 1.2 2008/03/22 08:37:04 mlelstv Exp $ */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#include <roken-common.h>
+#else
 #include <roken.h>
+#endif
 
 void error_message (const char *, ...)
 __attribute__ ((format (printf, 1, 2)));
Index: crypto/dist/heimdal/lib/com_err/compile_et.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/com_err/compile_et.c,v
retrieving revision 1.6
diff -u -r1.6 compile_et.c
--- crypto/dist/heimdal/lib/com_err/compile_et.c        18 Feb 2009 01:18:57 
-0000      1.6
+++ crypto/dist/heimdal/lib/com_err/compile_et.c        29 Dec 2009 10:37:06 
-0000
@@ -38,7 +38,6 @@
 __RCSID("$Heimdal: compile_et.c 15426 2005-06-16 19:21:42Z lha $"
         "$NetBSD: compile_et.c,v 1.6 2009/02/18 01:18:57 uebayasi Exp $");
 
-#include <roken.h>
 #include <err.h>
 #include "parse.h"
 
Index: crypto/dist/heimdal/lib/com_err/compile_et.h
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/com_err/compile_et.h,v
retrieving revision 1.2
diff -u -r1.2 compile_et.h
--- crypto/dist/heimdal/lib/com_err/compile_et.h        22 Mar 2008 08:37:06 
-0000      1.2
+++ crypto/dist/heimdal/lib/com_err/compile_et.h        29 Dec 2009 10:37:06 
-0000
@@ -47,7 +47,11 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <ctype.h>
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include <roken-common.h>
+#else
 #include <roken.h>
+#endif
 
 extern long base_id;
 extern int number;
Index: crypto/dist/heimdal/lib/roken/get_window_size.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/get_window_size.c,v
retrieving revision 1.3
diff -u -r1.3 get_window_size.c
--- crypto/dist/heimdal/lib/roken/get_window_size.c     22 Mar 2008 08:37:21 
-0000      1.3
+++ crypto/dist/heimdal/lib/roken/get_window_size.c     29 Dec 2009 10:37:06 
-0000
@@ -59,7 +59,11 @@
 #include <termios.h>
 #endif
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 
 int ROKEN_LIB_FUNCTION
 get_window_size(int fd, struct winsize *wp)
Index: crypto/dist/heimdal/lib/roken/getarg.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/getarg.c,v
retrieving revision 1.3
diff -u -r1.3 getarg.c
--- crypto/dist/heimdal/lib/roken/getarg.c      22 Mar 2008 08:37:21 -0000      
1.3
+++ crypto/dist/heimdal/lib/roken/getarg.c      29 Dec 2009 10:37:06 -0000
@@ -40,7 +40,15 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#ifdef HAVE_TERMIOS_H  /* XXX for struct winsize */
+#include <termios.h>
+#endif
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 #include "getarg.h"
 
 #define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)
Index: crypto/dist/heimdal/lib/roken/strlcat.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/strlcat.c,v
retrieving revision 1.5
diff -u -r1.5 strlcat.c
--- crypto/dist/heimdal/lib/roken/strlcat.c     22 Mar 2008 08:37:22 -0000      
1.5
+++ crypto/dist/heimdal/lib/roken/strlcat.c     29 Dec 2009 10:37:07 -0000
@@ -34,7 +34,11 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 
 __RCSID("$Heimdal: strlcat.c 14773 2005-04-12 11:29:18Z lha $"
         "$NetBSD: strlcat.c,v 1.5 2008/03/22 08:37:22 mlelstv Exp $");
Index: crypto/dist/heimdal/lib/roken/strlcpy.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/strlcpy.c,v
retrieving revision 1.5
diff -u -r1.5 strlcpy.c
--- crypto/dist/heimdal/lib/roken/strlcpy.c     22 Mar 2008 08:37:22 -0000      
1.5
+++ crypto/dist/heimdal/lib/roken/strlcpy.c     29 Dec 2009 10:37:07 -0000
@@ -34,7 +34,11 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 
 __RCSID("$Heimdal: strlcpy.c 14773 2005-04-12 11:29:18Z lha $"
         "$NetBSD: strlcpy.c,v 1.5 2008/03/22 08:37:22 mlelstv Exp $");
Index: crypto/dist/heimdal/lib/roken/strupr.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/strupr.c,v
retrieving revision 1.5
diff -u -r1.5 strupr.c
--- crypto/dist/heimdal/lib/roken/strupr.c      22 Mar 2008 08:37:22 -0000      
1.5
+++ crypto/dist/heimdal/lib/roken/strupr.c      29 Dec 2009 10:37:07 -0000
@@ -39,7 +39,12 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 
 #ifndef HAVE_STRUPR
 char * ROKEN_LIB_FUNCTION
Index: crypto/dist/heimdal/lib/roken/warnerr.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/roken/warnerr.c,v
retrieving revision 1.3
diff -u -r1.3 warnerr.c
--- crypto/dist/heimdal/lib/roken/warnerr.c     22 Mar 2008 08:37:22 -0000      
1.3
+++ crypto/dist/heimdal/lib/roken/warnerr.c     29 Dec 2009 10:37:07 -0000
@@ -37,7 +37,13 @@
         "$NetBSD: warnerr.c,v 1.3 2008/03/22 08:37:22 mlelstv Exp $");
 #endif
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
+
 #include "err.h"
 
 void ROKEN_LIB_FUNCTION
Index: crypto/dist/heimdal/lib/vers/print_version.c
===================================================================
RCS file: /cvsroot/src/crypto/dist/heimdal/lib/vers/print_version.c,v
retrieving revision 1.8
diff -u -r1.8 print_version.c
--- crypto/dist/heimdal/lib/vers/print_version.c        22 Mar 2008 08:37:23 
-0000      1.8
+++ crypto/dist/heimdal/lib/vers/print_version.c        29 Dec 2009 10:37:07 
-0000
@@ -36,7 +36,13 @@
 __RCSID("$Heimdal: print_version.c 22428 2008-01-13 09:58:05Z lha $"
         "$NetBSD: print_version.c,v 1.8 2008/03/22 08:37:23 mlelstv Exp $");
 #endif
+
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#include "roken-common.h"
+#else
 #include "roken.h"
+#endif
 
 #include "print_version.h"
 

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index