X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetcwd.m4;h=35d0b53bd3f024066ca12ee9f02e33accdca24e5;hb=997f5bfa12cec90a7dab44a46eb5278a2ef519ed;hp=c2524916e349eebec62a3f8ae0e5f65cc7a6e35a;hpb=44d7c1c1f004fa9bfb8ec3948de2671a7958cf5b;p=gnulib.git diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 index c2524916e..35d0b53bd 100644 --- a/m4/getcwd.m4 +++ b/m4/getcwd.m4 @@ -1,6 +1,6 @@ # getcwd.m4 - check for working getcwd that is compatible with glibc -# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -9,15 +9,14 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], [ - AC_CHECK_HEADERS_ONCE(unistd.h) + AC_LIBSOURCES([getcwd.c, getcwd.h]) + AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], [gl_cv_func_getcwd_null], [AC_TRY_RUN( [ # include -# ifdef HAVE_UNISTD_H -# include -# endif +# include # ifndef getcwd char *getcwd (); # endif @@ -61,6 +60,5 @@ AC_DEFUN([gl_PREREQ_GETCWD], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) - AC_CHECK_HEADERS_ONCE(fcntl.h) : ])