NetBSD Problem Report #627

From gnats  Sat Dec 10 11:24:42 1994
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 LAA02640 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 10 Dec 1994 11:24:42 -0800
Message-Id: <199412100532.QAA00403@nemeton.com.au>
Date: Sat, 10 Dec 1994 16:32:42 +1100
From: Giles Lean <giles@nemeton.com.au>
Reply-To: giles@nemeton.com.au
To: gnats-bugs@NetBSD.ORG
Subject: bug in /usr/bin/cpp script
X-Send-Pr-Version: 3.2

>Number:         627
>Category:       misc
>Synopsis:       /usr/bin/cpp wrapper doesn't handle -idirafter option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 10 11:35:03 +0000 1994
>Closed-Date:    Mon Dec 19 09:32:30 +0000 1994
>Last-Modified:  
>Originator:     Giles Lean
>Release:        1.0, -current (sup 9th December)
>Organization:
Giles Lean   			  Nemeton Pty Ltd
<giles@nemeton.com.au>      phone: +61 3 480 2118
>Environment:
System: NetBSD nemeton.com.au 1.0 NetBSD 1.0 (NEMETON) #8: Sat Nov 26 17:12:42 EST 1994 giles@nemeton.com.au:/usr/src/sys/arch/i386/compile/NEMETON i386


>Description:
	/usr/bin/cpp cannot handle '-idirafter somedir', and
	/usr/libexec/cpp tries to read from standard input.

	(This construction is used by the /usr/share/mk/* files when
	DESTDIR is set.)

>How-To-Repeat:
	$ mkdir /tmp/include
	$ touch /tmp/a.c
	$ /usr/bin/cpp -idirafter /tmp/include /tmp/a.c
	^D

>Fix:

This doesn't do away with the /usr/bin/cpp script, but just
makes it a little less braindead.

*** /usr/local/bin/cpp	Sat Dec 10 14:03:46 1994
--- /usr/bin/cpp	Wed Nov 23 19:09:00 1994
***************
*** 49,59 ****
  INCS="-nostdinc"
  FOUNDFILES=no

! while [ $# -gt 0 ]
  do
- 	A="$1"
- 	shift
- 
  	case $A in
  	-nostdinc)
  		NSI=yes
--- 49,56 ----
  INCS="-nostdinc"
  FOUNDFILES=no

! for A
  do
  	case $A in
  	-nostdinc)
  		NSI=yes
***************
*** 65,74 ****
  		;;
  	-U__GNUC__)
  		ALST=`echo $ALST | sed -e 's/-D__GNUC__//'`
- 		;;
- 	-imacros|-include|-idirafter|-iprefix|-iwithprefix)
- 		OPTS="$OPTS '$A' '$1'"
- 		shift
  		;;
  	-*)
  		OPTS="$OPTS '$A'"
--- 62,67 ----
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Mon Dec 19 01:32:30 PST 1994 
State-Changed-Why:  
Patch applied. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.