[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MINTOS] compiler switch (was: Re: MiNT goes UNiX, ...)



[ It's not just __MINT__ being a misnomer, the same is true for the
  subject: headerline, which should have been 'preprocessor switch'.
  Mea culpa.
]

In <9401140407.AA11824@irz403.inf.tu-dresden.de>, Michael Hohmuth writes:

> > If you want to make it possible for people to compile your code in
> > such a way that it works on plain TOSFS, I'd reccommend the following:
> >
> > #ifdef __atarist__
> > #ifndef __MINT__
> > #define TOSFS
> > #endif
> > #endif
>
> This means, "use another library than the MiNT library to compile in Tosfs
> compatibility", which isn't what you meant, is it?  :-)
>
> Instead, I'd recomment defining -DTOSFS at the compiler's command line.

Which could be joined by a TOSENV switch to indicate that we'd rather
expect a TOS-style FOOPATH="U:\usr\lib\foo,U:\usr\local\lib\bar"
than a Unix-style FOOPATH="/usr/lib/foo:/usr/local/lib/bar" in the
environment. Other switches might be required too (suggestions?).

There might be a general switch, TOSSTYLE, to imply all other TOS*
switches. Actual code would look like:

#if defined(TOSSTYLE) || defined(TOSFS)
...     /* use profile.sh instead of .profile */
#endif
...
#if defined(TOSSTYLE) || defined(TOSENV)
...
#endif


Regards,
           Waldi  (walra%moacs11@nl.net)