NetBSD Problem Report #363

From gnats  Sat Jul 23 18:16:42 1994
Received: from MIT.EDU (ATHENA-AS-WELL.MIT.EDU [18.72.1.1]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id SAA01086 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 23 Jul 1994 18:16:41 -0700
Message-Id: <199407240019.UAA07085@lola-granola.MIT.EDU.MIT.EDU>
Date: Sat, 23 Jul 1994 20:19:37 -0400
From: jtkohl@MIT.EDU
Reply-To: jtkohl@MIT.EDU
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: /usr/bin/cpp uses unbound variable LIBS
X-Send-Pr-Version: 3.2

>Number:         363
>Category:       bin
>Synopsis:       /usr/bin/cpp uses unbound variable LIBS, wreaking havoc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 23 18:20:03 +0000 1994
>Closed-Date:    Sat Aug 13 10:28:05 +0000 1994
>Last-Modified:  
>Originator:     John T Kohl
>Release:        1.0-ALPHA
>Organization:
MIT SIPB
>Environment:

System: NetBSD lola-granola 1.0-ALPHA NetBSD 1.0-ALPHA (LOLA) #36: Thu Jul 21 23:41:51 EDT 1994 jtkohl@lola-granola:/usr/src/sys/arch/i386/compile/LOLA i386

>Description:

/usr/bin/cpp uses unbound variable LIBS.  If your environment includes a
LIBS variable, it gets passed along in the invocation of
/usr/libexec/cpp.  This is Bad(tm).

It looks like $CSU has the same problem.

>How-To-Repeat:
  (setenv LIBS "xxx yyy zzz" && /usr/bin/cpp -C -DXXX /etc/motd)

>Fix:

*** 1.1	1994/07/24 00:18:06
--- usr.bin.cpp.sh	1994/07/24 00:18:37
***************
*** 73,79 ****
  			INCS="$INCS -I/usr/include"
  			NSI=skip
  		fi
! 		eval $CPP $ALST $INCS $LIBS $CSU $OPTS $A || exit $?
  		;;
  	esac
  done
--- 73,79 ----
  			INCS="$INCS -I/usr/include"
  			NSI=skip
  		fi
! 		eval $CPP $ALST $INCS $OPTS $A || exit $?
  		;;
  	esac
  done
***************
*** 85,91 ****
  	then
  		INCS="$INCS -I/usr/include"
  	fi
! 	eval exec $CPP $ALST $INCS $LIBS $CSU $OPTS
  fi

  exit 0
--- 85,91 ----
  	then
  		INCS="$INCS -I/usr/include"
  	fi
! 	eval exec $CPP $ALST $INCS $OPTS
  fi

  exit 0
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sat Aug 13 03:28:05 PDT 1994 
State-Changed-Why:  
Fixed. 
>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.