Glenn Skinner wrote: > > James Carlson writes: > > > I'm sponsoring this fast-track request on behalf of April Chin and the > > > ksh93 project team. Please note that this is an *open* case. > > > > One possible point of concern here is the `getconf' duplication. > > This project delivers a separate implementation of that feature, so > > that we end up having two (the ksh93 one is a strict superset), and > > they are to be kept in sync by means of additional testing. > > And this observation prompts the obvious question of whether it would > be feasible to unify the two getconf implementations. Presumably such > a unification would have to be based on the ksh93/AST version, with > provisions made to hide the extra functionality when invoked in an > outside-of-ksh (or perhaps traditional Solaris) context.
AFAIK this is not possible. The problem is that /usr/bin/getconf is compiled as normal application while ksh93 in Solaris is explicitly compiled as XPG6/C99 application (to enable various features and avoid that the ksh93 code enables workaronds for older standards functions (which result in both loss of features and performance)). The problem is that compiling a Solaris application with the XPG6 flags changes some "secret" libc master switches (|_xpg4| and |_xpg6|) which change the behaviour of many libc functions to match the XPG6 standards, including |sysconf()|, |pathconf()| etc. - which would make the "getconf" builtin command work like /usr/xpg6/bin/getconf instead of /usr/bin/getconf (and there is no workaround, neither running the "getconf" builtin in a seperate child process with |_xpg4|+|_xpg6| set to "0" (this doesn't work because it doesn't alter the different header contents (and I doubt that code review would allow such a horrible abuse of C64-style "poke"'ing)) or poking these values only at runtime of the "getconf" builtin (end reset it in an exit trap) will work (this would not be threadsafe)). The current (and likely only working) approach is to let the ksh93 "getconf" builtin forward all keys which are not owned by AST to the native /usr/bin/getconf command (that's what we're currently doing). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)
