Mail Archives: djgpp/1997/04/25/07:28:00
Eli Zaretskii wrote:
> There is no general way to do that. One solution which I find to work
> reasonably well is to test for COMSPEC, like so:
>
> ifdef COMSPEC
> ... DOS stuff ...
> else
> ... Unix stuff ...
> endif
I use an even simpler method, which is guaranteed to work. I simply
define a macro for whichever platform is appropriate (MSDOS, LINUX,
WINDOWS, MACINTOSH, SUNOS, etc.) and give it to the makefile/project.
Much easier that way, and it can (obviously) be generalized to any
platform/compiler/runtime combination, because you're doing the work of
making the #defines.
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"The future / is right there."
/ Bill Moyers
- Raw text -