4 dnl test for broken getcwd in (SunOS braindamage)
7 AC_DEFUN([AC_KRB_FUNC_GETCWD_BROKEN], [
8 if test "$ac_cv_func_getcwd" = yes; then
9 AC_MSG_CHECKING(if getcwd is broken)
10 AC_CACHE_VAL(ac_cv_func_getcwd_broken, [
11 ac_cv_func_getcwd_broken=no
13 AC_RUN_IFELSE([AC_LANG_SOURCE([[
15 char *getcwd(char*, int);
17 void *popen(char *cmd, char *mode)
23 int main(int argc, char **argv)
26 ret = getcwd(0, 1024);
27 if(ret == 0 && errno == ENOTTY)
31 ]])], [ac_cv_func_getcwd_broken=yes],[:],[:])
33 if test "$ac_cv_func_getcwd_broken" = yes; then
34 AC_DEFINE(BROKEN_GETCWD, 1, [Define if getcwd is broken (like in SunOS 4).])dnl
36 AC_MSG_RESULT($ac_cv_func_getcwd_broken)
38 AC_MSG_RESULT([seems ok])