]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
#undef getcwd before including system headers.
authorJim Meyering <jim@meyering.net>
Thu, 6 Mar 2003 22:23:26 +0000 (22:23 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 6 Mar 2003 22:23:26 +0000 (22:23 +0000)
This avoid a build failure on IRIX 6.5.  Reported by Nelson Beebe.

lib/getcwd.c

index 26fea6ff6dd8debd63578ef7c80aae7e85ccf919..e3a73f0ce3eaf273fb49a0fa40579f0c77ba3a26 100644 (file)
 
 #include <config.h>
 
+/* Undefine getcwd here so any prototype is not redefined to be a
+   prototype for rpl_getcwd.  */
+#undef getcwd
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -32,14 +36,6 @@ extern int errno;
 #include "pathmax.h"
 #include "same.h"
 
-/* Undefine getcwd here so any prototype is not redefined to be a
-   prototype for rpl_getcwd.  */
-#undef getcwd
-
-#if !HAVE_DECL_GETCWD
-extern char *getcwd (char *, size_t);
-#endif
-
 /* Guess high, because that makes the test below more conservative.
    But this is a kludge, because we should really use
    pathconf (".", _PC_NAME_MAX).  But it's probably not worth the cost.  */