From: Jim Meyering Date: Thu, 6 Mar 2003 22:23:26 +0000 (+0000) Subject: #undef getcwd before including system headers. X-Git-Tag: v4.5.10~111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4e7a90ce6848d9cf0f6da4ea51912333b9cfc29;p=thirdparty%2Fcoreutils.git #undef getcwd before including system headers. This avoid a build failure on IRIX 6.5. Reported by Nelson Beebe. --- diff --git a/lib/getcwd.c b/lib/getcwd.c index 26fea6ff6d..e3a73f0ce3 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -19,6 +19,10 @@ #include +/* Undefine getcwd here so any prototype is not redefined to be a + prototype for rpl_getcwd. */ +#undef getcwd + #include #include @@ -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. */