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

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



In <9401120935.AA13713@issan.informatik.uni-dortmund.de>, Andreas Schwab writes:

> Btw., why not just using __MINT__ as a compiler switch, it is
> predefined by the MiNTlibs and independent of the compiler.

The only information the __MINT__ switch provides, is that the target
operating system is MiNT rather than pure Gemdos. What we need is a switch
that tells a bit more about the target system in general: for example that
reasonable filesystems (like minixfs) will be used (no need to mess around
with filenames like bison.simple or .profile), and that the environment
variables should follow the Unix conventions (PATH, MANPATH, etc.).

Allthough I'm not even sure which switches are currently popular ;-), let
alone which ones have been used in the past, I'll try to summarize the
general idea I had in mind:

atari or atarist : for code necessary to run the program under Gemdos, in
                   a Gemdos-style system environment.

__MINT__ or MINT : for code necessary to run the program under MiNT, in a
                   Gemdos-style system environment.

MINTOS :           running under MiNT, in a Unix-style system environment

Come to think of it, the MINTOS switch is only needed to undefine all the
others :-).

> For compiler dependent code we can use atarist for GCC, ??? for PureC,
> and so on.

There shouldn't be any compiler dependent code in an application, that's
what the P1003.1 types (size_t, ssize_t, clock_t, ...) are all about. Any
difference between compilers is already handled in compiler.h that comes
with the MiNTlib.


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