From: Bruno Haible Date: Wed, 23 Dec 2009 09:59:14 +0000 (+0100) Subject: unistd: Ensure getcwd gets declared before being overridden. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44f52a54d2f3c4384b7eebadd9cfb98c82e9378a;p=pspp unistd: Ensure getcwd gets declared before being overridden. --- diff --git a/ChangeLog b/ChangeLog index dc63d2886f..8ec7958c54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-23 Bruno Haible + + unistd: Ensure getcwd gets declared before being overridden. + * lib/unistd.in.h: Conditionally include . + 2009-12-22 Bruno Haible wchar: Diagnose broken combination of glibc and gcc versions and flags. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index f37c7baffe..a3a49ed60e 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -39,8 +39,14 @@ /* mingw fails to declare _exit in . */ /* mingw, BeOS, Haiku declare environ in , not in . */ +/* Solaris declares getcwd not only in but also in . */ #include +/* mingw declares getcwd in , not in . */ +#if @GNULIB_GETCWD@ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + #if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@) \ || (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \ || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@))