X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=m4%2Fgetcwd.m4;h=f828cf340b660dcde0177a5197db417a5bf46f9a;hb=2394a603e7586e671226478e5b15d924c3841f42;hp=d3bbe597b365eba88bf1e9dd73694499e4b17e69;hpb=1a6fbdd7d28dff1868c5eb0baf0029b27e42526a;p=gnulib.git diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 index d3bbe597b..f828cf340 100644 --- a/m4/getcwd.m4 +++ b/m4/getcwd.m4 @@ -6,15 +6,20 @@ # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. -# serial 8 +# serial 9 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], [gl_cv_func_getcwd_null], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -# include +# if HAVE_UNISTD_H +# include +# else /* on Windows with MSVC */ +# include +# endif # ifndef getcwd char *getcwd (); # endif