Mail Archives: djgpp/1993/10/13/05:31:55
Matthias Burian writes:
> I didn't find anything about this in the FAQ, so I'll post my question
> here:
> Is there any DJGPP specific symbol predefined for DJGCC ?
> I mean, if you use EMX/GCC you can include '#ifdef __EMX__' into your
> source, without giving '-D__EMX__' onto your command line, __EMX__ is
> predefined.
> Is there anything similar under DJGPP ?
If you use the '-v' switch (verbose), gcc displays all predefined symbols:
e.g. gcc -v -c test.c
================================================================================
Reading specs from c:/gcc/lib/specs
gcc version 2.4.1
c:/gcc/bin/cpp.exe -lang-c -v -undef -D__GNUC__=2 -Dunix -Di386 -D__unix__ -D__
i386__ -D__unix -D__i386 -D__GO32__ -D__MSDOS__ -DGO32 -DMSDOS -noprecomp test.c
C:\TMP/cc010299
GNU CPP version 2.4.1 (80386, BSD syntax)
c:/gcc/bin/cc1.exe C:\TMP/cc010299 -quiet -dumpbase test.c -version -o C:\TMP/
cca10299
GNU C version 2.4.1 (80386, BSD syntax) compiled by GNU C version 2.4.1.
c:/gcc/bin/as.exe -o test.o C:\TMP/cca10299
================================================================================
From the first line you can see that you can use
#ifdef GO32 or #ifdef __GO32__ for DJGPP-specific compiles.
.^^^^^^^^ _____________________________________
| | / Pieter Kunst (P.J.) \
| _ _| / Philips Research Laboratories, \
.--(o)(o) / Building WY3, Prof. Holstlaan 4, \
|@ _) / 5656 AA Eindhoven, The Netherlands. |
| ,___| / e-mail: kunst AT prl DOT philips DOT nl /
| / \_______________________________________________/
/____\
- Raw text -