pike.git / src / configure.in

version» Context lines:

pike.git/src/configure.in:4466:    poll \    accept4 \    closefrom \    crypt \    fdwalk \    gethrtime \    gethrvtime \    getrlimit \    getrusage \    gettimeofday \ +  getwd \ +  get_current_dir_name \    inet_ntop \    gmtime_r \    gmtime_s \    strptime \    mallinfo \    mallopt \    ptrace \    setrlimit \    setresuid \    sigaction \
pike.git/src/configure.in:4692:    ], [    # FIXME: Should probably have a warning here.    # FIXME: Should we check if socklen_t exists, and use that?    pike_cv_accept_size_t=int    ])    fi   ])   AC_MSG_RESULT($pike_cv_accept_size_t *)   AC_DEFINE_UNQUOTED(ACCEPT_SIZE_T, $pike_cv_accept_size_t)    + AC_MSG_CHECKING(for working getcwd) + AC_CACHE_VAL(pike_cv_func_working_getcwd, + [ + AC_TRY_RUN([ + #ifndef _LARGEFILE_SOURCE + # define _FILE_OFFSET_BITS 64 + # define _LARGEFILE_SOURCE + # define _LARGEFILE64_SOURCE 1 + #endif + /* HPUX needs these too... */ + #ifndef __STDC_EXT__ + # define __STDC_EXT__ + #endif /* !__STDC_EXT__ */ +  + #ifndef POSIX_SOURCE + #define POSIX_SOURCE + #endif + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif + #ifdef HAVE_DIRECT_H + #include <direct.h> + #endif /* HAVE_DIRECT_H */ + #ifdef HAVE_SYS_WAIT_H + #include <sys/wait.h> + #endif + #include <signal.h> +  + #include <stdlib.h> + #include <string.h> +  + #ifndef __NT__ + int sig_child(int arg) + { + #ifdef HAVE_WAITPID +  waitpid(-1,0,WNOHANG); + #else + #ifdef HAVE_WAIT3 +  wait3(0,WNOHANG,0); + #else + #ifdef HAVE_WAIT4 +  wait3(-1,0,WNOHANG,0); + #else +  +  /* Leave them hanging */ +  + #endif /* HAVE_WAIT4 */ + #endif /* HAVE_WAIT3 */ + #endif /* HAVE_WAITPID */ +  + #ifdef SIGNAL_ONESHOT +  signal(SIGCHLD, sig_child); + #endif + } +  + int sig_alarm() { exit(1); } + #endif /* !__NT__ */ +  + int main() + { +  char *tmp; + #ifndef __NT__ +  signal(SIGCHLD,sig_child); +  signal(SIGALRM,sig_alarm); +  alarm(4); + #endif /* !__NT__ */ +  tmp=getcwd(0,10000); +  if(tmp && tmp[0] && (strlen(tmp) < 10000)) { +  free(tmp); +  exit(0); +  } +  exit(1); + } + ],pike_cv_func_working_getcwd=yes,pike_cv_func_working_getcwd=no, +  pike_cv_func_working_getcwd=yes)]) +  + if test "$pike_cv_func_working_getcwd" = yes; then +  AC_MSG_RESULT(yes) +  AC_DEFINE(HAVE_WORKING_GETCWD) + else +  AC_MSG_RESULT(no) + fi +    AC_MSG_CHECKING(if mkdir takes 1 or 2 arguments)   AC_CACHE_VAL(pike_cv_func_mkdir_args,[   AC_TRY_COMPILE([   #ifndef _LARGEFILE_SOURCE   # define _FILE_OFFSET_BITS 64   # define _LARGEFILE_SOURCE   # define _LARGEFILE64_SOURCE 1   #endif   /* HPUX needs these too... */   #ifndef __STDC_EXT__