www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/13/15:07:27

Xref: news-dnh.mv.net comp.os.msdos.djgpp:2021
Path: news-dnh.mv.net!mv!news.sprintlink.net!news.bluesky.net!solaris.cc.vt.edu!news.mathworks.com!tank.news.pipex.net!pipex!dish.news.pipex.net!pipex!sunic!sunic.sunet.se!news.uni-c.dk!dkuug!usenet
From: storm AT olicom DOT dk (Kim F. Storm)
Newsgroups: comp.os.msdos.djgpp
Subject: #if (DJGPP_VERSION == 2) ?
Date: Tue, 12 Sep 95 11:02:03 PST
Organization: Olicom A/S
Lines: 26
Nntp-Posting-Host: eolicom.olicom.dk
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Is there a pre-processor symbol which I can use to write code which
can compile on both V1 and V2 utilizing the new functions in V2?

E.g. in V2 there is a ScreenVisibleBell function which (to my knowledge) 
does not exist in V1. So how do I express this the rigth way?

	#if (DJGPP_VERSION < 2)
	  void ScreenVisibleBell(void)
	  { ... provide it for V1 ... }
	#endif

Also, in V1, the O_RDONLY etc constants are not defined, while they are
defined in V2, so I need to specify

	#if (DJGPP_VERSION < 2)
	#define O_RDONLY 0
	...
	#endif

(The obvious #ifndef O_RDONLY requires that the header file is included
 first, and I would like to avoid that -- pls. don't ask me to explain
 why!)

--
Kim F. Storm <storm AT olicom DOT dk>	

- Raw text -


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