Hi Roland,
Are you suggesting new flags for getconf to specify the appropriate
runtime environment (e.g. -xpg4 or -xpg6)? I don't think that's meets
the requirements of the specification. Or are you suggesting a single
getconf with wrappers in the xpg specific directories that essentially
call the single getconf with the appropriate flag to determine default,
xpg4, or xpg6 environments? 

Regards,
Lee

these were initially set up this way.

Roland Mainz wrote:
> Hi!
> 
> ----
> 
> Taking a look at 
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/common/common/values-xpg6.c
> - is it "legal" in Solaris to set the standard "selector" variables at
> runtime, e.g.
> -- snip --
> extern unsigned int __xpg6;
> extern int __xpg4;
> unsigned int saved_xpg6;
> int saved__xpg4;
> 
> /* some code */
> 
> /* save standard flags ... */
> saved_xpg6 = __xpg6;
> saved__xpg4 = __xpg4;
> 
> /* set standard flags to null (to emulate /usr/bin/getconf) */
> __xpg6 = 0U;
> __xpg4 = 0;
> 
> /* run query */
> run_query_standard_function();
> 
> /* restore standard flags */
> __xpg6 = saved_xpg6;
> __xpg4 = saved__xpg4;
> -- snip --
> 
> Is this "valid" usage, e.g. could this be used to create one unified
> version of the native "getconf" command in Solaris instead of shipping
> three different binaries (e.g. /usr/bin/getconf, /usr/xpg4/bin/getconf
> and /usr/xpg6/bin/getconf) ?
> 
> ----
> 
> Bye,
> Roland
> 


Reply via email to