From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: sizeof() in #if Date: Mon, 28 Jul 1997 09:43:48 +0200 Organization: TU Chemnitz-Zwickau Lines: 28 Message-ID: <33DC4DB4.244D901F@Mathematik.TU-Chemnitz.DE> References: <199707251705 DOT KAA26965 AT adit DOT ap DOT net> <5relc5$3ls AT freenet-news DOT carleton DOT ca> NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de 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 Precedence: bulk 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 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__. Robert -- ***************************************************************** * Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau * * Post: Am Berg 3, D-09573 Dittmannsdorf * * e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE * * WWW: http://www.tu-chemnitz.de/~rho * *****************************************************************