Boost logo

Boost-Build :

From: Craig Rodrigues (rodrigc_at_[hidden])
Date: 2005-06-22 01:21:22

On Tue, Jun 21, 2005 at 10:16:37PM -0500, Rene Rivera wrote:
> "whence" *is* a builtin for bourne shell. You must mean that it's not a
> builtin for bash.

No it is not. whence is a built-in for the Korn shell (ksh)
which is not /bin/sh on all platforms.

> > This will get rid of error messages that prints out
> > when I build bjam on Linux and FreeBSD.
> OK, I never got warnings on RedHat, so I guess it has a real bourne
> shell (or something closer to a real one) instead of a symlink from "sh"
> to "bash".

Well I don't know how your RedHat box is configured, but on my
SuSE Linux 8.0 box, if I run /bin/sh and type "whence ls",
I get:
whence: command not found

> Sorry but I can't apply the patch as it's going to break other Unix like
> systems, like OpenBSD and Solaris.

Well, I just checked (with the help of some friends on IRC) on the following
platforms: NetBSD, FreeBSD, OpenBSD, MacOS X, Solaris, and IRIX. "type" is a
valid shell-builtin for "/bin/sh" on all those platforms, while "whence" is
not (although whence is available on some platforms).

The current behavior of is to default to "hash" if "whence"
returns an my cases on FreeBSD and Linux, the invocations
of "whence" errors out because it does not exist as a valid command,
and is not a shell-builtin for /bin/sh.

If you are going to invoke "/bin/sh" for, then you
should strive for portability, and do what is POSIX compliant.
"type" is documented as part of the POSIX/Single Unix Specification

but "whence" is not.

Craig Rodrigues 

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at