pike.git / src / configure.in

version» Context lines:

pike.git/src/configure.in:4037:    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:4268:    ], [    # 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__ + # define __STDC_EXT__ + #endif /* !__STDC_EXT__ */ +  + #include <sys/types.h> + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif + #ifdef HAVE_DIRECT_H + #include <direct.h> + #endif + ],[ +  mkdir("conftestdir",0666); + ],pike_cv_func_mkdir_args=2,pike_cv_func_mkdir_args=1) + ]) +  + AC_MSG_RESULT($pike_cv_func_mkdir_args) + AC_DEFINE_UNQUOTED(MKDIR_ARGS,$pike_cv_func_mkdir_args) +    if test x"$pike_cv_sys_os" = xWindows_NT ; then    AC_DEFINE(HAVE_LOADLIBRARY)    AC_DEFINE(HAVE_FREELIBRARY)    AC_DEFINE(HAVE_GETPROCADDRESS)    AC_DEFINE(DL_EXPORT, _dlspec(export))   else    AC_DEFINE(DL_EXPORT, [])   fi      if test $ac_cv_func_crypt$ac_cv_func__crypt = nono ; then