Subject: Re: bin/3138: [dM] mkdep(1) always uses /usr/bin/gcc
To: None <>
From: Mike Long <>
List: netbsd-bugs
Date: 02/03/1997 17:28:36
>From: "Arne H. Juul" <>
>Date: Mon, 3 Feb 1997 23:07:54 +0100 (MET)
> > This would work without the -f; note that which(1) is required to use
> > the user's .cshrc.
>Why?  Not only is this dead wrong for non-csh users, I would argue that
>it is wrong for csh users as well.  It appears that the csh maintainer(s)
>agree with me; note that the csh which builtin does NOT source .cshrc,
>so it's even inconsistent with that one now.  I would argue that
>/usr/bin/which could actually be removed entirely, since there's no
>point in having the current implementation there when csh users will
>always use the built-in variant.

Of course csh's builtin doesn't source .cshrc; csh has already *done*
that.  Most people don't pass -f to an interactive csh.

which(1) needs to be run in an environment in which .cshrc has been
sourced because it needs to pick up the user's csh aliases, which are
(usually) defined in .cshrc.  That's the way it works.  That's the way
it has always worked.  As a result, /usr/bin/which is not an
appropriate tool for finding a binary via $PATH.  If you wish to
implement such a tool, you should not call it 'which'.
Mike Long <>     <URL:>
VLSI Design Engineer         finger for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil