delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/25/10:13:57

Date: Fri, 25 Jun 93 08:59:44 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: peprbv AT cfa0 DOT harvard DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: several questiond from new user

> #if defined(DOS_GETCWD)
> 	#define getcwd(a,b) dos_like_getcwd(a,b)
> #elif defined(UNIX_GETCWD)
> 	#define getcwd(a,b) unix_like_getcwd(a,b)
> #else
> 	#error must define DOS_GETCWD or UNIX_GETCWD to select getcwd implementation
> #endif

Or better, instead of the #error, have the real getcwd() print an
error message and exit.  That way, you don't get the #error for
programs that don't use getcwd at all.

- Raw text -


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