AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[gl_cv_func_getcwd_null],
[AC_TRY_RUN(
[
# include <stdlib.h>
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[gl_cv_func_getcwd_null],
[AC_TRY_RUN(
[
# include <stdlib.h>