NetBSD Problem Report #706
From gnats Fri Jan 6 15:38:07 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id PAA01038 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 6 Jan 1995 15:38:06 -0800
Message-Id: <199501062339.KAA04121@splode.mame.mu.OZ.AU>
Date: Sat, 7 Jan 1995 10:39:23 +1100
From: matthew green <mrg@splode.mame.mu.OZ.AU>
Reply-To: mrg@mame.mu.oz.au
To: gnats-bugs@NetBSD.ORG
Subject: kdump doesn't build a full ioctl.c
X-Send-Pr-Version: 3.2
>Number: 706
>Category: bin
>Synopsis: kdump doesn't build a full ioctl.c
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 06 19:20:12 +0000 1995
>Closed-Date: Sun Jan 15 07:51:46 +0000 1995
>Last-Modified:
>Originator: matthew green
>Release: 6-jan-95
>Organization:
bozotic softwar foundation.
>Environment:
System: NetBSD splode.mame.mu.OZ.AU 1.0A NetBSD 1.0A (_splode_) #112: Fri Jan 6 22:48:01 EST 1995 mrg@splode.mame.mu.OZ.AU:/splode/build/src/sys/arch/sparc/compile/_splode_ sparc
>Description:
when kdump builds it just called awk directly on sys/ioctl{_compat,}.h
directly without using cpp on it to get all the #include'ed files as
well. this results in a very very short ioctl.c that's relatively
useless.
>How-To-Repeat:
cd /usr/src/usr.bin/kdump; make
and then view ioctl.c
>Fix:
using gcc -dM option to cpp, we get at all the #define's.
Index: Makefile
===================================================================
RCS file: /local/cvs/src/usr.bin/kdump/Makefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Makefile
*** 1.1.1.1 1995/01/06 23:24:23
--- Makefile 1995/01/06 23:32:07
***************
*** 6,12 ****
CFLAGS+=-I${.CURDIR}/../ktrace
SRCS= kdump.c ioctl.c subr.c
.PATH: ${.CURDIR}/../ktrace
! CLEANFILES+=ioctl.c
ioctl.c: mkioctls
/bin/sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include/sys/ioctl.h \
--- 6,12 ----
CFLAGS+=-I${.CURDIR}/../ktrace
SRCS= kdump.c ioctl.c subr.c
.PATH: ${.CURDIR}/../ktrace
! CLEANFILES+=ioctl.c mkioctl.c
ioctl.c: mkioctls
/bin/sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include/sys/ioctl.h \
Index: mkioctls
===================================================================
RCS file: /local/cvs/src/usr.bin/kdump/mkioctls,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 mkioctls
*** 1.1.1.1 1995/01/06 23:24:24
--- mkioctls 1995/01/06 23:31:14
***************
*** 1,6 ****
# $Id: mkioctls,v 1.4 1994/12/24 16:47:28 cgd Exp $
#
! awk '
BEGIN {
print "#include <sys/param.h>"
print "#include <sys/socket.h>"
--- 1,14 ----
# $Id: mkioctls,v 1.4 1994/12/24 16:47:28 cgd Exp $
#
!
! >mkioctl.c
!
! for file
! do
! echo "#include <$file>" >> mkioctl.c
! done
!
! cpp -dM mkioctl.c | awk '
BEGIN {
print "#include <sys/param.h>"
print "#include <sys/socket.h>"
***************
*** 33,36 ****
print "\n\treturn(NULL);"
print "}"
}
! ' $1 $2
--- 41,44 ----
print "\n\treturn(NULL);"
print "}"
}
! '
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Sat Jan 14 23:51:46 PST 1995
State-Changed-Why:
Done (slightly differently).
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.