Date: Fri, 25 Jun 93 08:59:44 EDT From: DJ Delorie 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.