Mail Archives: djgpp/1997/01/21/00:13:38
Mario Eusebio wrote:
>
> I would like to make my program compatible with DJGPP verions 2.0 and
> 2.01. Is it possible to do something like this
>
> if DJGPP 2.0
> use the function _use_lfn()
> if DJGPP 2.01
> use the macro _USE_LFN
The DJGPP docs recommend that you always use the _USE_LFN macro, and I
don't recall that this has changed from v2.00 to v2.01. The only
substantive changes in v2.01 are that LFNs work a lot better than they
used to; this shouldn't directly affect portability of your code.
There is no reason why the same source wouldn't work in both v2.00 and
v2.01, with some very arcane exceptions (gas is much less tolerant of
mismatched opcode-operand sizes in assembly, for example). What you
should try to avoid mixing is programs that are compiled with v2.00 and
v2.01, because the format for passing long command lines has changed and
is not backwards compatible.
That said, if you really need to test it here's how:
#if defined(DJGPP)
/* DJGPP-specific code*/
#if DJGPP == 1
/* DJGPP 1.x-specific code... */
#if DJGPP == 2 && DJGPP_MINOR < 1
/* DJGPP 2.00-specific code...*/
#else
/* DJGPP 2.01(or higher)-specific code... */
#endif
#else
/* non-DJGPP code */
#endif
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| "Starting flamewars since 1993" | http://www.cs.com/fighteer |
| *** NOTICE *** This .signature is generated randomly. |
| If you don't like it, sue my computer. |
---------------------------------------------------------------------
- Raw text -