ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/01/16:31:07

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Ed Collins" <emacduffie AT mediaone DOT net>
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: <r34q8.4238$Ba.3153129@typhoon1.se.ipsvc.net>
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.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019