Mail Archives: djgpp/1997/08/06/01:36:10
Robert Hoehne (Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE) writes:
> Paul Derbyshire wrote:
>>
>> Nate Eldredge (eldredge AT ap DOT net) writes:
>> > At 05:34 7/24/1997 +0100, you wrote:
>> >>Now, how do I in a portable way test for which C compiler might be available?
>> >>I can do it easily in 4DOS, but COMMAND.COM compatibility is a lot harder...
>> > Well, there's always the method of <gasp> asking the user! My approach would
>> > be to define $(CC) = gcc at the top of the makefile, and let the user change
>> > it if they want.
>> > The better question is, what compiler besides GCC would be available that
>> > would work?
>>
>> #if defined __GNU_C__
>
> Use __DJGPP__ for conditional preprocessing when
> writing code for DJGPP, since __GNUC__ is defined
> also for other platforms.
>
> BTW: __GNU_C__ is not defined but __GNUC__.
>
I know that. You'd use __GNUC__ for stuff that is available in GCC in
general, like __attribute__ and so forth. You might use __DJGPP__ instead
when dealing with something that sure won't work in Linux or off a
non-Intel box, such as a DOS call or some sort of DOS-specific file
access.
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -