summaryrefslogtreecommitdiffstats
path: root/libiberty
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-31 20:33:13 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-31 20:33:13 +0000
commitbe342bf0a6c4d5aae61aa50960e164e7a49e206a (patch)
tree53dc9f4ec215c66e8a42eb62a0f5661cda975858 /libiberty
parent5a6e1db3d91e27b9088f7fd6732bf4f6b8b1b034 (diff)
downloadppe42-gcc-be342bf0a6c4d5aae61aa50960e164e7a49e206a.tar.gz
ppe42-gcc-be342bf0a6c4d5aae61aa50960e164e7a49e206a.zip
* getpwd.c: Check HAVE_GETCWD before defining it away.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/getpwd.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 2f02a0f608e..dd1afbd79ff 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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.
diff --git a/libiberty/getpwd.c b/libiberty/getpwd.c
index 2fa341681e3..de6e0397648 100644
--- a/libiberty/getpwd.c
+++ b/libiberty/getpwd.c
@@ -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__)))
OpenPOWER on IntegriCloud