Alan Burlison wrote: > Roland Mainz wrote: [snip] > I know I'm coming (very) late to the game, but why are we making the > code XPG6 and C99 conformant? I certainly don't do that for perl, and i > general we don't make such changes to external code.
The problem is that many Solaris functions show non-standard behaviour if XPG6 or XPG4 are not used (e.g. follow |__xpg4| and |__xpg6| in libc - it'll likely break your heart once you realise how subsystems are affected... ;-( ). In those cases the usage of such functions is simply disabled at build time which impacts both functionality and performance. Another issue is that we may want to use ksh93 as replacement for the current /usr/xpg4/bin/sh which means we MUST use the XPG4 functions (or higher) in this case (and IMO using two binaries (one normal and one for the POSIX shell) is an overkill for a new shell which did not "exist" in OS/Net previously (at least in the view of Sun/Solaris)). Finally I'd like to get rid of 20 years of Unix backwards compatibilty and start with a clean table, using the up-to-date standards. It's much better than having zillions of if()/#ifdef-hackery in the code just because we don't use the standards. BTW: As a nice side-effect we get more math functions[1] (e.g. currently ksh93 supports almost all math functions supported by C99 (and we cannot use them without compiling the code as C99 - and using C99 automagically forces the use of XPG6)) > And have we any plans to get the changes you've made integrated into the > upstream source, so that we don't have to do this horrid dance indefinitely? The changes are already in the upstream code (e.g. the code tests whether the compiler is a C99 one and then adopts itself to this standard). The only difficulty is to run the compiler in C99 mode (the upstream defaults is to use "cc" and then use it's defaults (and the "defaults" of /opt/SUNWspro/bin/cc are... uhm... ancient)). [1]=Remember that ksh93 supports floating-point math... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)