* getpwd.c: Check HAVE_GETCWD before defining it away.

From-SVN: r29013
This commit is contained in:
Richard Henderson 1999-08-31 13:33:13 -07:00 committed by Richard Henderson
parent 8fd8d061f7
commit 4dfeccf9d0
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,7 @@
1999-08-31 Richard Henderson <rth@cygnus.com>
* getpwd.c: Check HAVE_GETCWD before defining it away.
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add calloc.c and getpwd.c.

View File

@ -34,17 +34,15 @@ extern char *getwd ();
BSD systems) now provides getcwd as called for by POSIX. Allow for
the few exceptions to the general rule here. */
#if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD)
#if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
#define getcwd(buf,len) getwd(buf)
#endif
#ifdef MAXPATHLEN
#define GUESSPATHLEN (MAXPATHLEN + 1)
#else
#define GUESSPATHLEN 100
#endif
#else /* (defined (USG) || defined (VMS)) */
/* We actually use this as a starting point, not a limit. */
#define GUESSPATHLEN 100
#endif /* (defined (USG) || defined (VMS)) */
#if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)))