OS_GetEnv result

Peter Naulls peter at chocky.org
Sat Aug 3 01:01:37 PDT 2002


In message <4268ea5f4b.Jo at hobbes.riscos.be>
          John Tytgat <John.Tytgat at aaug.net> wrote:

> > Something like the setting for a program's DA heap.  If the symbol is
> > created your the program, then unixlib uses a RO pathname, if not (the
> > symbol's address is 0), then we unix behaviour on argv[0].
> 
> Don't we already have something for this ? __RISCOSIFY_NO_PROCESS in the
> __riscosify_control global var.  When set, I would assume to see a
> RISC OS filespec in argv[0].  When not set, I would assume to see an
> unixified version of the RISC OS filespec, i.e. a Unix filespec.

But __riscosify_control is set at runtime - after main() is entered.
The processing on argv[0] takes place right after the program is run -
before main().  Hence you need a compile time switch, not a runtime one.

Similarly, the DA heap must be setup before main is entered.

Peter

-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
------------------------------------------------------------------------



More information about the gcc mailing list