X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Ed Collins" Newsgroups: comp.os.msdos.djgpp Subject: Preprocessor directives Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Mon, 01 Apr 2002 21:12:55 GMT NNTP-Posting-Host: 24.129.40.71 X-Complaints-To: abuse AT attbi DOT net X-Trace: typhoon1.se.ipsvc.net 1017695575 24.129.40.71 (Mon, 01 Apr 2002 16:12:55 EST) NNTP-Posting-Date: Mon, 01 Apr 2002 16:12:55 EST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello, there, I'm programming school projects at home, and later I upload and compile the source code on the school's computer. At home I use DJGPP in a Windows98 environment, and at school it's a Linux 2.4.14 OS. Does anyone know of simple preprocessor directives that can determine which OS the program is compiled on? For instance, #if MSDOS #DEFINE CLEAR system("clrscr") #elif LINUX #DEFINE CLEAR system("clear") #endif I would certainly appreciate anyone's reply. ed.