Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 20:44:14 +0100 (BST)
From:      Mark Valentine <mark@thuvia.demon.co.uk>
To:        Mike Barcroft <mike@freebsd.org>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: /usr/posix: a first cut
Message-ID:  <200210261944.g9QJiErS012646@dotar.thuvia.org>
In-Reply-To: <20021026143724.D47672@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> From: Mike Barcroft <mike@freebsd.org>
> Date: Sat 26 Oct, 2002
> Subject: Re: /usr/posix: a first cut

> I would prefer to have /usr/posix/bin and /usr/posix/man.  I think
> manuals will get too cluttered if we try to document two differing
> utilities in one manual.

I was hoping this wouldn't get that much out of hand; I see the
differences being very small.

Most users will never see the POSIX-related manual pages if they
are separate.

Do you know of any other systems which take this approach?  I've
sort of been following Solaris' style, which I've found to be effective.

> I think we should suggest in posix(7) that users seeking conformant
> utilities change their PATH and MANPATH.

I explicitly didn't do that, because I think /usr/posix is there for
script writers, not users.

In fact, putting /usr/posix at the start of your path is more likely
to _break_ the scripts you run.

Portable scripts don't hardwire paths for standard executables, they
rely on a reasonable default environment for the platform which behaves
as that platform normally does (there are exceptions to this rule, of
course).

An example would be a script which knows that all its target platforms
support a POSIX.1 expr(1) command, even if it's not the default behaviour:

    #!/bin/sh

    case `uname` in
    FreeBSD)	expr=/usr/posix/expr;;
    SunOS)	expr=/usr/xpg4/bin/expr;;
    *)		expr=expr;;
    esac

    ... use $expr ...

Note that the default in absence of any better knowledge is "hope and pray".

		Cheers,

		Mark.

-- 
Mark Valentine, Thuvia Labs <mark@thuvia.co.uk>       <http://www.thuvia.co.uk>;
"Tigers will do ANYTHING for a tuna fish sandwich."       Mark Valentine uses
"We're kind of stupid that way."   *munch* *munch*        and endorses FreeBSD
  -- <http://www.calvinandhobbes.com>;                  <http://www.freebsd.org>;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210261944.g9QJiErS012646>