NetBSD Problem Report #41435
From www@NetBSD.org Fri May 15 16:02:03 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 4D6B663C233
for <gnats-bugs@gnats.netbsd.org>; Fri, 15 May 2009 16:02:03 +0000 (UTC)
Message-Id: <20090515160202.961A563BAB3@www.NetBSD.org>
Date: Fri, 15 May 2009 16:02:02 +0000 (UTC)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@NetBSD.org
Subject: build.sh tools from netbsd-4 fails on cygwin-1.7.0
X-Send-Pr-Version: www-1.0
>Number: 41435
>Category: toolchain
>Synopsis: build.sh tools from netbsd-4 fails on cygwin-1.7.0
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: christos
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 15 16:05:00 +0000 2009
>Closed-Date: Wed Nov 03 12:46:51 +0000 2010
>Last-Modified: Wed Nov 03 12:46:51 +0000 2010
>Originator: Jared D. McNeill
>Release: netbsd-5
>Organization:
>Environment:
CYGWIN_NT-5.1 EEEHA 1.7.0(0.210/5/3) 2009-05-06 14:21 i686 Cygwin
>Description:
Running build.sh -m i386 tools under Cygwin 1.7.0 and a netbsd-5 tree eventually fails:
# compile asn1_compile/gen.lo
cc -O -I/home/jmcneill/branches/netbsd-5/src/tools/compat/obj -I/home/jmcneill/b
ranches/netbsd-5/src/tools/compat/obj/include -I/home/jmcneill/branches/netbsd-
5/src/tools/asn1_compile/../compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS
=64 -I. -I/home/jmcneill/branches/netbsd-5/src/include/
heimdal -I/home/jmcneill/branches/netbsd-5/src/crypto/dist/heimdal/lib/asn1 -I/
home/jmcneill/branches/netbsd-5/src/crypto/dist/heimdal/lib/roken -DKRB5=
1 -DHAVE_CONFIG_H -DHAVE_IPV6 -c -o gen.lo.o
/home/jmcneill/branches/netbsd-5/src/crypto/dist/heimdal/lib/asn1/gen.c
In file included from /home/jmcneill/branches/netbsd-5/src/crypto/dist/heimdal/l
ib/asn1/gen_locl.h:52,
from /home/jmcneill/branches/netbsd-5/src/crypto/dist/heimdal/l
ib/asn1/gen.c:34:
/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
/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
/home/jmcneill/branches/netbsd-5/src/include/heimdal/roken.h:97: error: conflict
ing types for 'vasnprintf'
/usr/include/stdio.h:278: error: previous declaration of 'vasnprintf' was here
/home/jmcneill/branches/netbsd-5/src/include/heimdal/roken.h:97: error: conflict
ing types for 'vasnprintf'
/usr/include/stdio.h:278: error: previous declaration of 'vasnprintf' was here
*** Failed target: gen.lo
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails on cygwin-1.7.0
Date: Fri, 15 May 2009 12:12:46 -0400
Sorry, this should read netbsd-5
--------------------------------------------------
From: <gnats-admin@netbsd.org>
Sent: Friday, May 15, 2009 12:05 PM
To: <jmcneill@invisible.ca>
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails on
cygwin-1.7.0
> Thank you very much for your problem report.
> It has the internal identification `toolchain/41435'.
> The individual assigned to look at your
> report is: toolchain-manager.
>
>>Category: toolchain
>>Responsible: toolchain-manager
>>Synopsis: build.sh tools from netbsd-4 fails on cygwin-1.7.0
>>Arrival-Date: Fri May 15 16:05:00 +0000 2009
>
>
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails on
cygwin-1.7.0
Date: Fri, 15 May 2009 20:35:57 +0300
On Fri, 15 May 2009, jmcneill@invisible.ca wrote:
> /home/jmcneill/branches/netbsd-5/src/include/heimdal/roken.h:93: error:
> conflicting types for 'asnprintf'
> /usr/include/stdio.h:248: error: previous declaration of 'asnprintf' was here
Please let us know what the cygwin-1.7.0 declaration of asnprintf looks
like. Similarly for the other conflicts.
--apb (Alan Barrett)
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: <gnats-bugs@NetBSD.org>,
<toolchain-manager@netbsd.org>,
<gnats-admin@netbsd.org>,
<netbsd-bugs@netbsd.org>
Cc:
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails oncygwin-1.7.0
Date: Fri, 15 May 2009 15:28:50 -0400
char * _EXFUN(asnprintf, (char *, size_t *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
FYI, wrapping the two prototypes in roken.h with #if defined (__NetBSD__)
allowed me to successfully build a toolchain, and from there I was able to
build GENERIC.
--------------------------------------------------
From: "Alan Barrett" <apb@cequrux.com>
Sent: Friday, May 15, 2009 1:40 PM
To: <toolchain-manager@netbsd.org>; <gnats-admin@netbsd.org>;
<netbsd-bugs@netbsd.org>; <jmcneill@invisible.ca>
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails
oncygwin-1.7.0
> The following reply was made to PR toolchain/41435; it has been noted by
> GNATS.
>
> From: Alan Barrett <apb@cequrux.com>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails on
> cygwin-1.7.0
> Date: Fri, 15 May 2009 20:35:57 +0300
>
> On Fri, 15 May 2009, jmcneill@invisible.ca wrote:
> > /home/jmcneill/branches/netbsd-5/src/include/heimdal/roken.h:93: error:
> > conflicting types for 'asnprintf'
> > /usr/include/stdio.h:248: error: previous declaration of 'asnprintf' was
> > here
>
> Please let us know what the cygwin-1.7.0 declaration of asnprintf looks
> like. Similarly for the other conflicts.
>
> --apb (Alan Barrett)
>
>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/41435: build.sh tools from netbsd-4 fails on cygwin-1.7.0
Date: Tue, 29 Dec 2009 22:29:21 +0900
>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
Responsible-Changed-From-To: toolchain-manager->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sat, 02 Jan 2010 18:13:16 +0900
Responsible-Changed-Why:
I have a patch
State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 02 Jan 2010 18:13:16 +0900
State-Changed-Why:
Possible fix provided.
From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41435 CVS commit: src/crypto/dist/heimdal/lib
Date: Wed, 20 Jan 2010 12:54:17 +0000
Module Name: src
Committed By: tsutsui
Date: Wed Jan 20 12:54:17 UTC 2010
Modified Files:
src/crypto/dist/heimdal/lib/asn1: gen_locl.h lex.h
src/crypto/dist/heimdal/lib/com_err: compile_et.c compile_et.h
src/crypto/dist/heimdal/lib/roken: get_window_size.c getarg.c strlcat.c
strlcpy.c strupr.c warnerr.c
src/crypto/dist/heimdal/lib/vers: print_version.c
Log Message:
Don't include src/include heimdal/roken.h on tools build because
it's "an OS dependent, generated file" configured for the target NetBSD
as noted in itself. Instead, include <roken-common.h>
(which is included from generated <roken.h> and required
for TRUE and fALSE definitions) and "nbtool_config.h" on tools build.
Fixes PR toolchain/41435 and makes cross build on Cygwin-1.7 work.
No particular comments in the PR.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/lib/asn1/gen_locl.h \
src/crypto/dist/heimdal/lib/asn1/lex.h
cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/heimdal/lib/com_err/compile_et.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/lib/com_err/compile_et.h
cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/heimdal/lib/roken/get_window_size.c \
src/crypto/dist/heimdal/lib/roken/getarg.c \
src/crypto/dist/heimdal/lib/roken/warnerr.c
cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/heimdal/lib/roken/strlcat.c \
src/crypto/dist/heimdal/lib/roken/strlcpy.c \
src/crypto/dist/heimdal/lib/roken/strupr.c
cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/heimdal/lib/vers/print_version.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Wed, 20 Jan 2010 22:03:59 +0900
State-Changed-Why:
Fix committed.
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: toolchain/41435 (build.sh tools from netbsd-4 fails on cygwin-1.7.0)
Date: Wed, 20 Jan 2010 08:20:08 -0500
Please pull this up to the netbsd-5 and netbsd-5-0 branches.
--------------------------------------------------
From: <tsutsui@NetBSD.org>
Sent: Wednesday, January 20, 2010 8:04 AM
To: <tsutsui@NetBSD.org>; <netbsd-bugs@netbsd.org>;
<gnats-admin@netbsd.org>; <tsutsui@NetBSD.org>; <jmcneill@invisible.ca>
Subject: 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
>
> State-Changed-From-To: feedback->closed
> State-Changed-By: tsutsui@NetBSD.org
> State-Changed-When: Wed, 20 Jan 2010 22:03:59 +0900
> State-Changed-Why:
> Fix committed.
>
>
>
>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: jmcneill@invisible.ca
Cc: tsutsui@NetBSD.org, gnats-bugs@NetBSD.org
Subject: Re: toolchain/41435 (build.sh tools from netbsd-4 fails on cygwin-1.7.0)
Date: Wed, 20 Jan 2010 23:24:28 +0900
> Please pull this up to the netbsd-5 and netbsd-5-0 branches.
How do you think about PRs kern/42573 and toolchain/42574?
(tools makefs(8) on Cygwin creates corrupted ffs image)
Is it acceptable to add a kludge "#undef DEV_BSIZE"
in src/tools/compat/compat_defs.h for now?
---
Izumi Tsutsui
State-Changed-From-To: closed->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 21 Jan 2010 02:00:59 +0900
State-Changed-Why:
Needs more workaround for struct winsize in getarg.c and get_window_size.c.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org, tsutsui@NetBSD.org,
jmcneill@invisible.ca
Subject: Re: toolchain/41435 (build.sh tools from netbsd-4 fails on cygwin-1.7.0)
Date: Fri, 22 Jan 2010 02:38:00 +0900
> Synopsis: build.sh tools from netbsd-4 fails on cygwin-1.7.0
:
> Needs more workaround for struct winsize in getarg.c and get_window_size.c.
Here is a revised patch:
- prepare src/tools/asn1_compile/roken.h based on
src/crypto/dist/heimdal/lib/roken/roken.h.in
and use it to build src/tools/asn1_compile and src/tools/compile_et
(it has #includes for roken-common.h and decls for get_windows_size.c)
- add checks for system headers used in the new
src/tools/asn1_compile/roken.h into src/tools/compat/configure.ac
- add a check for HAVE_STRUCT_WINSIZE to src/tools/compat/configure.ac
taken from src/crypto/dist/heimdal/cf/krb-struct-winsize.m4
Tested on NetBSD/i386 5.99.22 and Cygwin 1.7.1.
Note this patch doesn't include generated files so regenerate
src/tools/compat/configure and src/tools/compat/nbtool_config.h.in
per description in src/tools/compat/configure.ac after applying patch.
Index: tools/asn1_compile/Makefile
===================================================================
RCS file: /cvsroot/src/tools/asn1_compile/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- tools/asn1_compile/Makefile 8 Dec 2002 20:19:57 -0000 1.4
+++ tools/asn1_compile/Makefile 21 Jan 2010 16:35:47 -0000
@@ -2,5 +2,6 @@
HOSTPROGNAME= ${_TOOL_PREFIX}asn1_compile
HOST_SRCDIR= lib/libasn1/asn1_compile
+HOST_CPPFLAGS+= -I${.CURDIR}
.include "${.CURDIR}/../Makefile.host"
Index: tools/compat/configure.ac
===================================================================
RCS file: /cvsroot/src/tools/compat/configure.ac,v
retrieving revision 1.71
diff -u -r1.71 configure.ac
--- tools/compat/configure.ac 15 Jan 2010 11:26:25 -0000 1.71
+++ tools/compat/configure.ac 21 Jan 2010 16:35:48 -0000
@@ -81,8 +81,7 @@
AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h \
getopt.h features.h malloc.h sys/poll.h stddef.h)
AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h sys/endian.h \
- sys/featuretest.h err.h inttypes.h libgen.h paths.h stdint.h util.h \
- resolv.h arpa/nameser.h,,
+ sys/featuretest.h err.h inttypes.h libgen.h paths.h stdint.h util.h,,
[test -f include/$ac_header || touch include/$ac_header])
AC_CHECK_HEADERS(rpc/types.h netconfig.h,,
[echo '#include "nbtool_config.h"' >include/$ac_header.new
@@ -225,4 +224,25 @@
)
])
+# Check headers required by heimdal/lib/roken for asn1_compile and compile_et
+AC_CHECK_HEADERS(resolv.h syslog.h arpa/nameser.h \
+ bind/bitypes.h sys/bitypes.h netinet/in6_machtypes.h \
+ netinet/in.h netinet/in6.h netinet6/in6.h sys/uio.h)
+
+# Check struct winsize required by asn1_compile and compile_et in heimdal
+AC_MSG_CHECKING(for struct winsize)
+AC_CACHE_VAL(ac_cv_struct_winsize, [
+ac_cv_struct_winsize=no
+for i in sys/ioctl.h termios.h; do
+AC_EGREP_HEADER(
+struct[[ ]]*winsize,dnl
+$i, ac_cv_struct_winsize=yes; break)dnl
+done
+])
+if test "$ac_cv_struct_winsize" = "yes"; then
+ AC_DEFINE(HAVE_STRUCT_WINSIZE, 1,
+ [Define if struct winsize is declared in <sys/ioctl.h> or <termios.h>])
+fi
+AC_MSG_RESULT($ac_cv_struct_winsize)
+
AC_OUTPUT
Index: tools/compile_et/Makefile
===================================================================
RCS file: /cvsroot/src/tools/compile_et/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- tools/compile_et/Makefile 16 Nov 2003 14:14:18 -0000 1.5
+++ tools/compile_et/Makefile 21 Jan 2010 16:35:48 -0000
@@ -3,7 +3,7 @@
HOSTPROGNAME= ${_TOOL_PREFIX}compile_et
HOST_SRCDIR= usr.bin/compile_et
HOST_SRCS= getarg.c print_version.c warnerr.c strupr.c get_window_size.c
-HOST_CPPFLAGS= -I${DIST}/heimdal/lib/roken
+HOST_CPPFLAGS= -I${.CURDIR}/../asn1_compile -I${DIST}/heimdal/lib/roken
# uncommon library functions
.PATH: ${.CURDIR}/../../lib/libc/string
--- /dev/null 2010-01-22 01:27:36.000000000 +0900
+++ tools/asn1_compile/roken.h 2010-01-21 04:44:35.000000000 +0900
@@ -0,0 +1,156 @@
+#ifndef __ROKEN_H__
+#define __ROKEN_H__
+
+/* -*- C -*- */
+/*
+ * Copyright (c) 1995-2005 Kungliga Tekniska H skolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the Institute nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* $Heimdal: roken.h.in 18612 2006-10-19 16:35:16Z lha $
+ $NetBSD: roken.h.in,v 1.5 2008/03/22 08:37:21 mlelstv Exp $ */
+
+#include "nbtool_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <string.h>
+#include <signal.h>
+
+#ifdef _AIX
+struct ether_addr;
+struct sockaddr_dl;
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+#ifdef HAVE_BIND_BITYPES_H
+#include <bind/bitypes.h>
+#endif
+#ifdef HAVE_NETINET_IN6_MACHTYPES_H
+#include <netinet/in6_machtypes.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_NETINET6_IN6_H
+#include <netinet6/in6.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <err.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
+#include <sys/ioctl.h>
+#endif
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#elif defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#include <roken-common.h>
+
+#ifndef HAVE_STRUCT_WINSIZE
+struct winsize {
+ unsigned short ws_row, ws_col;
+ unsigned short ws_xpixel, ws_ypixel;
+};
+#endif
+
+int ROKEN_LIB_FUNCTION get_window_size(int fd, struct winsize *);
+
+ROKEN_CPP_END
+#define ROKEN_VERSION 1.1
+
+#endif /* __ROKEN_H__ */
---
Izumi Tsutsui
State-Changed-From-To: analyzed->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 22 Jan 2010 02:45:03 +0900
State-Changed-Why:
A new patch provided.
Responsible-Changed-From-To: tsutsui->christos
Responsible-Changed-By: christos@NetBSD.org
Responsible-Changed-When: Sun, 24 Jan 2010 13:33:45 -0500
Responsible-Changed-Why:
I supplied a different patch to avoid the issue
.
State-Changed-From-To: feedback->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Wed, 03 Nov 2010 12:46:51 +0000
State-Changed-Why:
no longer an issue
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.