X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C50EDE1.9C2D1639@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: preprocesser directives References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 28 Date: Fri, 25 Jan 2002 07:13:19 GMT NNTP-Posting-Host: 12.90.167.48 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc06-news.ops.worldnet.att.net 1011942799 12.90.167.48 (Fri, 25 Jan 2002 07:13:19 GMT) NNTP-Posting-Date: Fri, 25 Jan 2002 07:13:19 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ed Collins wrote: > > I'm in college writing programs for computer science classes, and the > instructors require the programs to run on the school's UNIX computer. We > write the code on a PC, upload it, compile it and run the executable. We > then send the results, source code, .exe code and a write up to the > professor. My question is, Does anyone know of any preprocessor directives > I can write in a computer program to distinquish between DOS and UNIX? > > I would certainly appreciate anyone's suggestions. You don't need to distinguish. Just write your programs in portable code. Under gcc/DJGPP use "-W -ansi -pedantic -Wall -O2" flags to compile and pay attention to what it tells you. You may very well find that the school is using gcc as its compiler under Unix anyhow. That is why we have standards. Things such as will allow you to compensate for any object differences, and are standard. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)