pike.git
/
src
/
modules
/
_Stdio
/
configure.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/_Stdio/configure.in:277:
#endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif /* HAVE_SYS_SOCKET_H */ #ifdef HAVE_SYS_UIO_H #include <sys/uio.h> #endif /* HAVE_SYS_UIO_H */ ], [ /* Try HPUX */ return (int)sendfile(0,0,0,0,(void *)0,0);
-
], [ pike_cv_sendfile_args=6 ], [ pike_cv_sendfile_args=4 ])
+
], [ pike_cv_sendfile_args=6 ], [
+
AC_TRY_COMPILE([
+
#include <sys/types.h>
+
#ifdef HAVE_SYS_SOCKET_H
+
#include <sys/socket.h>
+
#endif /* HAVE_SYS_SOCKET_H */
+
#ifdef HAVE_SYS_UIO_H
+
#include <sys/uio.h>
+
#endif /* HAVE_SYS_UIO_H */
+
], [
+
/* Try Linux */
+
return sendfile(0,0,(void *)0,0);
+
], [
pike_cv_sendfile_args=4 ]
, [ pike_cv_sendfile_args=bad ]
)
]) ])
-
+
])
if test "$pike_cv_sendfile_args" = "7"; then AC_MSG_RESULT([7 - FreeBSD style]) AC_DEFINE(HAVE_FREEBSD_SENDFILE) AC_MSG_CHECKING([if sendfile looks thread-safe]) AC_CACHE_VAL(pike_cv_freebsd_sendfile_threadsafe, [ # We're optimistic -- default to assuming it works. pike_cv_freebsd_sendfile_threadsafe="yes" if test -f /usr/lib/libc_r.so; then if /usr/bin/nm -D /usr/lib/libc_r.so 2>&1 | grep _thread_sys >/dev/null 2>&1; then
pike.git/src/modules/_Stdio/configure.in:369:
AC_DEFINE(HAVE_MACOSX_SENDFILE) # MacOS X sendfile() has the bug from FreeBSD 4.x and earlier. # FIXME: Ought to do a proper test of whether # headers affect the file length or not. AC_DEFINE(HAVE_SENDFILE_HEADER_LEN_PROBLEM) else AC_MSG_RESULT(no - HPUX) AC_DEFINE(HAVE_HPUX_SENDFILE) fi else
+
if test "$pike_cv_sendfile_args" = "4"; then
AC_MSG_RESULT([4 - Linux style])
-
+
else
+
AC_MSG_RESULT(failed - disabling use of sendfile)
+
AC_DEFINE(HAVE_BROKEN_SENDFILE)
fi fi
-
+
fi
else : fi if test x$ac_cv_func_getxattr = xyes ; then AC_MSG_CHECKING(if getxattr takes 4(Linux) or 6(Darwin) arguments) AC_CACHE_VAL(pike_cv_func_darwin_getxattr, [ AC_TRY_COMPILE([ #ifndef _LARGEFILE_SOURCE # define _FILE_OFFSET_BITS 64
pike.git/src/modules/_Stdio/configure.in:393:
# 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
+
#include <stdlib.h>
#include <sys/types.h> #ifdef HAVE_SYS_XATTR_H #include <sys/xattr.h> #endif ], [ exit(0); /* NOT REACHED */ getxattr(0, 0, 0, 0, 0, 0); ], [
pike.git/src/modules/_Stdio/configure.in:417:
# 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
+
#include <stdlib.h>
#include <sys/types.h> #ifdef HAVE_SYS_XATTR_H #include <sys/xattr.h> #endif ], [ exit(0); /* NOT REACHED */ getxattr(0, 0, 0, 0); ], [
pike.git/src/modules/_Stdio/configure.in:467:
/* HPUX needs these too... */ #ifndef __STDC_EXT__ # define __STDC_EXT__ #endif /* !__STDC_EXT__ */ /* For _REENTRANT */ #include "../../machine.h" #ifndef POSIX_SOURCE #define POSIX_SOURCE #endif
+
#include <stdlib.h>
#include <sys/types.h> #ifdef HAVE_DIRENT_H #include <dirent.h> #else #ifdef HAVE_SYS_NDIR_H #include <sys/ndir.h> #endif #ifdef HAVE_SYS_DIR_H #include <sys/dir.h> #endif
pike.git/src/modules/_Stdio/configure.in:518:
/* HPUX needs these too... */ #ifndef __STDC_EXT__ # define __STDC_EXT__ #endif /* !__STDC_EXT__ */ /* For _REENTRANT */ #include "../../machine.h" #ifndef POSIX_SOURCE #define POSIX_SOURCE #endif
+
#include <stdlib.h>
#include <sys/errno.h> #ifdef HAVE_DIRENT_H #include <dirent.h> #else #ifdef HAVE_SYS_NDIR_H #include <sys/ndir.h> #endif #ifdef HAVE_SYS_DIR_H #include <sys/dir.h> #endif
pike.git/src/modules/_Stdio/configure.in:602:
/* HPUX needs these too... */ #ifndef __STDC_EXT__ # define __STDC_EXT__ #endif /* !__STDC_EXT__ */ /* For _REENTRANT */ #include "../../machine.h" #ifndef POSIX_SOURCE #define POSIX_SOURCE #endif
+
#include <stdlib.h>
#include <sys/errno.h> #ifdef HAVE_DIRENT_H #include <dirent.h> #else #ifdef HAVE_SYS_NDIR_H #include <sys/ndir.h> #endif #ifdef HAVE_SYS_DIR_H #include <sys/dir.h> #endif
pike.git/src/modules/_Stdio/configure.in:836:
# 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
+
#include <stdlib.h>
#ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif #ifdef HAVE_SYS_SYSPROTO_H #include <sys/sysproto.h> #endif #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif #include <sys/stat.h>
pike.git/src/modules/_Stdio/configure.in:1073:
else :; fi fi else :; fi AC_MSG_CHECKING(for working (and failsafe) strerror) AC_CACHE_VAL(pike_cv_func_failsafe_strerror, [ AC_TRY_RUN([ #include <stdio.h> #include <string.h>
+
#include <stdlib.h>
int main() { int e; char *s; for(e=0;e<256;e++) if(strerror(e)) if(strerror(e)[0]=='\b') exit(1); exit(0); } ],pike_cv_func_failsafe_strerror=yes,pike_cv_func_failsafe_strerror=no, pike_cv_func_failsafe_strerror=no) ])
pike.git/src/modules/_Stdio/configure.in:1109:
#endif /* HPUX needs these too... */ #ifndef __STDC_EXT__ # define __STDC_EXT__ #endif /* !__STDC_EXT__ */ #ifndef POSIX_SOURCE #define POSIX_SOURCE #endif #include <stdio.h>
+
#include <stdlib.h>
#include <sys/types.h> #include <sys/wait.h> #include <netinet/in.h> #include <errno.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #include <sys/time.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h>