>Date: Thu, 16 Nov 2006 14:30:20 -0500 >From: James Carlson <james.d.carlson at Sun.COM> > >Glenn Fowler writes: >> I was thinking "user shell script application" and should have typed it >> once a script strays from PATH=$(getconf PATH) it may come across utilities >> on PATH that have parameters different from what getconf tells the script > >Yes. You're in essentially undefined (or at least not standards >compliant) territory if you have a PATH that doesn't have those >special directories listed first on your path.
Yes. And this is why I've been concerned about built-ins in ksh93 that replace /usr/xpg*/bin variants of standard utilities without adjusting for the differences in the way the standards require them to work. > >> and that clears it up for me >> from a portability+extensions standpoint I almost never stray from plain [g]cc >> this has been a good exercise >> it also shows that its not worth losing your sanity programming to standard limits >> code for no limits when possible and be blissfully clueless of standard conundrums > >I think that's a good policy. The default environment for most OSes >should be whatever is sanest on that platform, regardless of what >standards may be supported and what they may say. Yes. Some of the standards specify ways to find the utilities and the compilers and options needed to conform to the standard; other standards don't. On Solaris systems, the key to creating conforming applications is the standards(5) man page. The utilities we have in /usr/bin should give you a default environment that conforms to SVID3/XPG3 requirements with LOTS of extensions. - Don > >-- >James Carlson, KISS Network <james.d.carlson at sun.com> >Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 >MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
