On the issue of Solaris: I checked with Don Cragun
(one of Sun's standards guys).  I can provide chapter
and verse, but in short he says that all Solaris 2.0
and later releases have both /usr/bin/sh and /usr/bin/ksh,
with ksh being the posix shell.  Here's an excerpt:

>       I believe all Solaris 2.0 and later releases have provided both
>/usr/bin/sh and /usr/bin/ksh.  (/bin is a symbolic link pointing to
>/usr/bin.)  The issue with making /usr/bin/sh be a POSIX conforming
>shell is that doing so would break ancient customer shell scripts that
>depend on features that POSIX changed 8 years ago.  Our development
>rules don't allow us to make incompatible changes like that, except in
>a major release.  (Our last major release was Solaris 2.0 when we moved
>from a default BSD source base environment to a default SVR4 source
>base environment.  It isn't obvious to me when, or if, we will have
>another major release.) (DT: then some very cogent reasoning about
the business decisions concerning customer expectation of 
compatability with old scripts.)

I think we can infer two things: 1) that waiting for (at
the very least) Solaris to have /bin/sh be POSIX conformant may
be a long wait, and 2) that we needn't wait, we just need to be 
able to point at a shell other than /bin/sh.  (This also addresses
the issue that started all this, functions.)

I can't say in detail about all systems, but most have a similar
problem to some degree or other.  (I actually can find some more
details if anyone cares... ask and I'll do the digging).
I think we can infer that if we say it must be the LCD of all
/bin/sh implementations (and recognizing that there's no requirement
that /bin/sh even exist in the POSIX standards) we'll continue
fighting problems that how have modern, easy, solutions.
(Don and I are both involved in the POSIX revision, and the
same topic just came up (not accidentally :-) ) and yes, /bin/sh
is NOT required to exist; just something called sh.)

The other alternative is to deal with multiple shell locations
to get a more modern shell; the issue here is are there enough
systems we care about that don't have a modern shell (I suspect
not).  It's a matter of finding it.  I'm working that issue thru
the revision; we'll see what happens.

Donn
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 10, 2000 10:16 AM
> To: Donn Terry
> Cc: 'Felix Lee'; 'Robert Lipe'; 'Russ Allbery '; '[EMAIL PROTECTED] ';
> '[EMAIL PROTECTED] '
> Subject: Re: rfc: new libgcc build mechanism
> 
> 
> %% Donn Terry <[EMAIL PROTECTED]> writes:
> 
>   dt> Please take a look at the Makefile in that area; the
>   dt> current code is using nested `` to create further command
>   dt> lines (not data files).  I'll admit I haven't tried, but
>   dt> I'm not at all sure it can be done because the *creation*
>   dt> of the string occurs in a different directory than the
>   dt> *use* of it, and the purpose of the substitution is to
>   dt> deal with that problem!  Here's what I currently use
>   dt> locally (with $()).  If you can figure out a decent
>   dt> (and generally acceptable) solution to the problem that
>   dt> works with ``, I'll be more than happy to see it.
> 
>   dt> PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \
>   dt>         -e 's|^ *[^ /][^ /]*/|%&|' \
>   dt>         -e 's| -B| -B%|g' \
>   dt>         -e 's|% *[^- /]|%&|g' \
>   dt>         -e 's|%% *|../|g' \
>   dt>         -e 's|%||g'
> 
> I'm a little concerned that the & token isn't supported by 
> all versions
> of sed, either, but I couldn't find any examples... anyone 
> have thoughts
> on the portability of that?
> 
>   dt>         "CC=$$(echo $$(case '$(CC)' in (stage*) echo 
> '$(CC)' | sed -e \
>   dt> 's|stage|../stage|g';; (*) echo '$(CC)';; esac) | \
>   dt> $(PREPEND_DOTDOT_TO_RELATIVE_PATHS) )"
> 
> Hmm.  Why can't you do this with just one ``?  There's no need for the
> outer one and the outer echo at all as far as I can see, just pipe the
> results of the case statement directly into the sed script, like this:
> 
>   "CC=`case '$(CC)' in stage*) echo '$(CC)' | sed -e 
> 's|stage|../stage|g';; \
>                        *)      echo '$(CC)';; \
>        esac | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
> 
> ?
> 
> -- 
> --------------------------------------------------------------
> -----------------
>  Paul D. Smith <[EMAIL PROTECTED]>         Network 
> Management Development
>  "Please remain calm...I may be mad, but I am a 
> professional." --Mad Scientist
> --------------------------------------------------------------
> -----------------
>    These are my opinions---Nortel Networks takes no 
> responsibility for them.
> 

Reply via email to