From 44f52a54d2f3c4384b7eebadd9cfb98c82e9378a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 23 Dec 2009 10:59:14 +0100 Subject: [PATCH] unistd: Ensure getcwd gets declared before being overridden. --- ChangeLog | 5 +++++ lib/unistd.in.h | 6 ++++++ 2 files changed, 11 insertions(+) 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@)) -- 2.30.2