From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: compatibility between versions 2.0 and 2.01 Date: Mon, 20 Jan 1997 21:04:47 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 44 Message-ID: <32E44E6F.4DD0@cs.com> References: <5c0d81$9gr AT host DOT di DOT fct DOT unl DOT pt> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp211.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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. | ---------------------------------------------------------------------