Hi Nico, Sorry for the delay. I wanted to (hopefully) clarify a couple of your questions last week on some compatiblity items below...
April > X-Unix-From: Nicolas.Williams at Sun.COM Wed Sep 20 13:56:21 2006 > Date: Wed, 20 Sep 2006 15:56:18 -0500 > From: Nicolas Williams <Nicolas.Williams at Sun.COM> > To: James Carlson <James.D.Carlson at Sun.COM> > Cc: Don Cragun <don.cragun at Sun.COM>, PSARC-EXT at sac.sfbay.sun.com, April.Chin at eng.sun.com, ksh93-integration-discuss at opensolaris.org, roland.mainz at nrubsig.org > Subject: Re: Korn Shell 93 Integration [PSARC-EXT/2006/550 Timeout: 09/27/2006] > Mime-Version: 1.0 > Content-Disposition: inline > User-Agent: Mutt/1.5.7i > > On Wed, Sep 20, 2006 at 04:23:57PM -0400, James Carlson wrote: > > Don Cragun writes: > > > standard-compliant /usr/xpg4/bin/sh with ksh93. Thus this project > > > needs to be aware of potential compatibility problems. See COMPAT file > > > for a list of known incompatibilities between ksh93 and Solaris ksh. > > > > What's the plan here? Some of those incompatibilities seem rather > > stark to me. Will incompatible changes be made to the open source > > version in order to keep compatibility with the old ksh? Or will the > > Solaris-integrated ksh93 be made incompatible with the open source > > version? Or do we intend to break compatibility in our own > > /usr/bin/ksh in the future? > > > > I realize that the complete set of answers might not yet be known, but > > is there a plan of some sort? > > Incompatibility (1) seems likely to break a lot of scripts (I am fond of > function() function-declaration syntax, so my scripts would break). > > Incompatibility (9)... Does this mean pattern matching in the same > statement/command? Or subsequently for the rest of the script? Sounds > like a bug. >From the COMPAT file: 9) In ksh93, pattern matching following a redirection symbol works only in interactive shell, not in scripts. The above refers to pattern matching in the same statement. For example, in a ksh93 script, "echo hi >> foo*" will write to the file literally named "foo*" rather than to a file whose name matches the pattern (starts with the string "foo") In Solaris ksh, the same script will write to a file matching the pattern. I'll add the example. > > I don't understand (6). >From the COMPAT file: 6) Some built-ins don't allow options to be passed in any order as they did previously. One known case is "typeset -8i <variable>", which no longer works the same as "typeset -i8 <variable>" to set an integer variable that is base 8. In Solaris ksh, both "typeset -i8 foo" and "typeset -8i foo" declare foo to be a base 8 integer. In ksh93, "typeset -i8 foo" declares foo as a base 8 integer, but "typeset -8i foo" ignores the 8 and declares foo to be an integer with the default base 10. I'll change this item to a more explicit description. > > (10) will almost certainly break scripts. > > (12) could be finnessed (one signal per-line if stdout is a pipe, say). > > I'm guessing most of these could be finessed so that when invoked as > "ksh" they go away. > > Nico > --