*** ../bash-2.05b-patched/aclocal.m4 Tue Jun 25 09:45:43 2002 --- aclocal.m4 Sat Oct 9 15:03:28 2004 *************** *** 686,691 **** AC_DEFUN(BASH_FUNC_GETCWD, ! [AC_MSG_CHECKING([if getcwd() calls popen()]) ! AC_CACHE_VAL(bash_cv_getcwd_calls_popen, [AC_TRY_RUN([ #include --- 686,691 ---- AC_DEFUN(BASH_FUNC_GETCWD, ! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory]) ! AC_CACHE_VAL(bash_cv_getcwd_malloc, [AC_TRY_RUN([ #include *************** *** 694,748 **** #endif - #ifndef __STDC__ - #ifndef const - #define const - #endif - #endif - - int popen_called; - - FILE * - popen(command, type) - const char *command; - const char *type; - { - popen_called = 1; - return (FILE *)NULL; - } - - FILE *_popen(command, type) - const char *command; - const char *type; - { - return (popen (command, type)); - } - - int - pclose(stream) - FILE *stream; - { - return 0; - } - - int - _pclose(stream) - FILE *stream; - { - return 0; - } - main() { ! char lbuf[32]; ! popen_called = 0; ! getcwd(lbuf, 32); ! exit (popen_called); } ! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes, ! [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no) ! bash_cv_getcwd_calls_popen=no] )]) ! AC_MSG_RESULT($bash_cv_getcwd_calls_popen) ! if test $bash_cv_getcwd_calls_popen = yes; then AC_DEFINE(GETCWD_BROKEN) AC_LIBOBJ(getcwd) --- 694,709 ---- #endif main() { ! char *xpwd; ! xpwd = getcwd(0, 0); ! exit (xpwd == 0); } ! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no, ! [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no) ! bash_cv_getcwd_malloc=no] )]) ! AC_MSG_RESULT($bash_cv_getcwd_malloc) ! if test $bash_cv_getcwd_malloc = no; then AC_DEFINE(GETCWD_BROKEN) AC_LIBOBJ(getcwd)