Commit 4dfeccf9 by Richard Henderson Committed by Richard Henderson

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

From-SVN: r29013
parent 8fd8d061
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> 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add calloc.c and getpwd.c. * Makefile.in (CFILES): Add calloc.c and getpwd.c.
......
...@@ -34,17 +34,15 @@ extern char *getwd (); ...@@ -34,17 +34,15 @@ extern char *getwd ();
BSD systems) now provides getcwd as called for by POSIX. Allow for BSD systems) now provides getcwd as called for by POSIX. Allow for
the few exceptions to the general rule here. */ 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) #define getcwd(buf,len) getwd(buf)
#endif
#ifdef MAXPATHLEN #ifdef MAXPATHLEN
#define GUESSPATHLEN (MAXPATHLEN + 1) #define GUESSPATHLEN (MAXPATHLEN + 1)
#else #else
#define GUESSPATHLEN 100 #define GUESSPATHLEN 100
#endif #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__))) #if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment