This avoid a build failure on IRIX 6.5. Reported by Nelson Beebe.
#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>
#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. */