From: stolz Date: Fri, 17 Jan 2003 17:01:14 +0000 (+0000) Subject: [project @ 2003-01-17 17:01:13 by stolz] X-Git-Tag: Approx_11550_changesets_converted~1254 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=56bcfea3a498c945ef223ecab8f415ee18580724 [project @ 2003-01-17 17:01:13 by stolz] - Add sendfile-API for pumping out data via sendfile(2) Currently supported are Linux (tested) & FreeBSD (not tested yet), others will throw a runtime error until I get around to implement a fallback. --- diff --git a/acconfig.h b/acconfig.h index 33a2256..91f5df6 100644 --- a/acconfig.h +++ b/acconfig.h @@ -393,6 +393,12 @@ /* Define if usleep returns void */ #undef USLEEP_RETURNS_VOID +/* Define if it looks like a Linux sendfile(2) implementation */ +#undef HAVE_LINUX_SENDFILE + +/* Define if it looks like a BSDish sendfile(2) implementation */ +#undef HAVE_BSD_SENDFILE + /* Define if C compiler supports long long types */ #undef HAVE_LONG_LONG diff --git a/configure.in b/configure.in index d2426e2..86e3a98 100644 --- a/configure.in +++ b/configure.in @@ -1180,6 +1180,22 @@ AC_EGREP_HEADER(in_addr_t, netinet/in.h, AC_MSG_RESULT(no)) dnl -------------------------------------------------- +dnl * test for Linux sendfile(2) +dnl -------------------------------------------------- +AC_MSG_CHECKING(for sendfile in sys/sendfile.h) +AC_EGREP_HEADER(sendfile, sys/sendfile.h, + [ AC_DEFINE(HAVE_LINUX_SENDFILE) AC_MSG_RESULT(yes) ], + AC_MSG_RESULT(no)) + +dnl -------------------------------------------------- +dnl * test for BSD sendfile(2) +dnl -------------------------------------------------- +AC_MSG_CHECKING(for sendfile in sys/socket.h) +AC_EGREP_HEADER(sendfile, sys/socket.h, + [ AC_DEFINE(HAVE_BSD_SENDFILE) AC_MSG_RESULT(yes) ], + AC_MSG_RESULT(no)) + +dnl -------------------------------------------------- dnl * test for GTK+ dnl -------------------------------------------------- diff --git a/mk/config.h.in b/mk/config.h.in index 9334929..e484858 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -1,4 +1,4 @@ -/* mk/config.h.in. Generated from configure.in by autoheader. */ +/* mk/config.h.in. Generated automatically from configure.in by autoheader. */ /* acconfig.h Descriptive text for the C preprocessor macros that @@ -15,6 +15,7 @@ + /* Define to alignment constraint on chars */ #undef ALIGNMENT_CHAR @@ -393,6 +394,12 @@ /* Define if usleep returns void */ #undef USLEEP_RETURNS_VOID +/* Define if it looks like a Linux sendfile(2) implementation */ +#undef HAVE_LINUX_SENDFILE + +/* Define if it looks like a BSDish sendfile(2) implementation */ +#undef HAVE_BSD_SENDFILE + /* Define if C compiler supports long long types */ #undef HAVE_LONG_LONG @@ -597,424 +604,408 @@ */ #undef CRAY_STACKSEG_END -/* Define to 1 if using `alloca.c'. */ +/* Define if using `alloca.c'. */ #undef C_ALLOCA -/* Define to 1 if you have the `access' function. */ +/* Define if you have the `access' function. */ #undef HAVE_ACCESS -/* Define to 1 if you have `alloca', as a function or macro. */ +/* Define if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define to 1 if you have and it should be used (not on Ultrix). - */ +/* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_ARPA_INET_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_ASSERT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_BFD_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_CONIO_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_CONSOLE_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_CTYPE_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_DIRENT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the `dlopen' function. */ +/* Define if you have the `dlopen' function. */ #undef HAVE_DLOPEN -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_DL_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_DOS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_ERRNO_H -/* Define to 1 if you have the `farcalloc' function. */ +/* Define if you have the `farcalloc' function. */ #undef HAVE_FARCALLOC -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fgetpos' function. */ +/* Define if you have the `fgetpos' function. */ #undef HAVE_FGETPOS -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_FILES_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_FLOAT_H -/* Define to 1 if you have the `fseek' function. */ +/* Define if you have the `fseek' function. */ #undef HAVE_FSEEK -/* Define to 1 if you have the `fsetpos' function. */ +/* Define if you have the `fsetpos' function. */ #undef HAVE_FSETPOS -/* Define to 1 if you have the `ftell' function. */ +/* Define if you have the `ftell' function. */ #undef HAVE_FTELL -/* Define to 1 if you have the `ftime' function. */ +/* Define if you have the `ftime' function. */ #undef HAVE_FTIME -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_FTW_H -/* Define to 1 if you have the `getclock' function. */ +/* Define if you have the `getclock' function. */ #undef HAVE_GETCLOCK -/* Define to 1 if you have the `getgrgid_r' function. */ +/* Define if you have the `getgrgid_r' function. */ #undef HAVE_GETGRGID_R -/* Define to 1 if you have the `getgrnam_r' function. */ +/* Define if you have the `getgrnam_r' function. */ #undef HAVE_GETGRNAM_R -/* Define to 1 if you have the `getpagesize' function. */ +/* Define if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE -/* Define to 1 if you have the `getpwnam_r' function. */ +/* Define if you have the `getpwnam_r' function. */ #undef HAVE_GETPWNAM_R -/* Define to 1 if you have the `getpwuid_r' function. */ +/* Define if you have the `getpwuid_r' function. */ #undef HAVE_GETPWUID_R -/* Define to 1 if you have the `getrusage' function. */ +/* Define if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_GL_GL_H -/* Define to 1 if you have the `gmtime_r' function. */ +/* Define if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_GRP_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_IEEE754_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_IO_H -/* Define to 1 if you have the `lchown' function. */ +/* Define if you have the `lchown' function. */ #undef HAVE_LCHOWN -/* Define to 1 if you have the `bfd' library (-lbfd). */ +/* Define if you have the `bfd' library (-lbfd). */ #undef HAVE_LIBBFD -/* Define to 1 if you have the `iberty' library (-liberty). */ +/* Define if you have the `iberty' library (-liberty). */ #undef HAVE_LIBIBERTY -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_LIMITS_H -/* Define to 1 if you have the `localtime_r' function. */ +/* Define if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R -/* Define to 1 if you have the `lstat' function. */ +/* Define if you have the `lstat' function. */ #undef HAVE_LSTAT -/* Define to 1 if you have the `macsystem' function. */ +/* Define if you have the `macsystem' function. */ #undef HAVE_MACSYSTEM -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_MALLOC_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the `mktime' function. */ +/* Define if you have the `mktime' function. */ #undef HAVE_MKTIME -/* Define to 1 if you have the `mprotect' function. */ +/* Define if you have the `mprotect' function. */ #undef HAVE_MPROTECT -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_NETDB_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_NETINET_IN_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_NETINET_TCP_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_NLIST_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_PASCAL_H -/* Define to 1 if you have the `PBHSetVolSync' function. */ +/* Define if you have the `PBHSetVolSync' function. */ #undef HAVE_PBHSETVOLSYNC -/* Define to 1 if you have the `pclose' function. */ +/* Define if you have the `pclose' function. */ #undef HAVE_PCLOSE -/* Define to 1 if you have the `popen' function. */ +/* Define if you have the `popen' function. */ #undef HAVE_POPEN -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_PTHREAD_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_PWD_H -/* Define to 1 if you have the `readdir_r' function. */ +/* Define if you have the `readdir_r' function. */ #undef HAVE_READDIR_R -/* Define to 1 if you have the `readlink' function. */ +/* Define if you have the `readlink' function. */ #undef HAVE_READLINK -/* Define to 1 if you have the `realpath' function. */ +/* Define if you have the `realpath' function. */ #undef HAVE_REALPATH -/* Define to 1 if you have the `setitimer' function. */ +/* Define if you have the `setitimer' function. */ #undef HAVE_SETITIMER -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SGTTY_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SIGINFO_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SIGNAL_H -/* Define to 1 if you have the `snprintf' function. */ +/* Define if you have the `snprintf' function. */ #undef HAVE_SNPRINTF -/* Define to 1 if you have the `stat' function. */ +/* Define if you have the `stat' function. */ #undef HAVE_STAT -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STAT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STDARG_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STDDEF_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STD_H -/* Define to 1 if you have the `strcasecmp' function. */ +/* Define if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define to 1 if you have the `strcmp' function. */ +/* Define if you have the `strcmp' function. */ #undef HAVE_STRCMP -/* Define to 1 if you have the `strcmpi' function. */ +/* Define if you have the `strcmpi' function. */ #undef HAVE_STRCMPI -/* Define to 1 if you have the `stricmp' function. */ +/* Define if you have the `stricmp' function. */ #undef HAVE_STRICMP -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STRINGS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if `st_blksize' is member of `struct stat'. */ +/* Define if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* Define if `tm_zone' is member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE -/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use +/* Define if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE -/* Define to 1 if you have the `symlink' function. */ +/* Define if you have the `symlink' function. */ #undef HAVE_SYMLINK -/* Define to 1 if you have the `sysconf' function. */ +/* Define if you have the `sysconf' function. */ #undef HAVE_SYSCONF -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_FAULT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_FILE_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_LIMITS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_MMAN_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_PROCFS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_RESOURCE_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SIGNAL_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SYSCALL_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TIMEB_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TIMERS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TIMES_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TIME_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_UIO_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_UN_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_UTSNAME_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_VADVISE_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_TERMIOS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_TERMIO_H -/* Define to 1 if you have the `timelocal' function. */ +/* Define if you have the `timelocal' function. */ #undef HAVE_TIMELOCAL -/* Define to 1 if you have the `times' function. */ +/* Define if you have the `times' function. */ #undef HAVE_TIMES -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_TIME_H -/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use +/* Define if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_TYPES_H -/* Define to 1 if you don't have `tm_zone' but do have the external array - `tzname'. */ +/* Define if you don't have `tm_zone' but do have the external array `tzname'. + */ #undef HAVE_TZNAME -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UTIME_H -/* Define to 1 if you have the `vadvise' function. */ +/* Define if you have the `vadvise' function. */ #undef HAVE_VADVISE -/* Define to 1 if you have the `valloc' function. */ +/* Define if you have the `valloc' function. */ #undef HAVE_VALLOC -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_VALUES_H -/* Define to 1 if you have the `vfork' function. */ +/* Define if you have the `vfork' function. */ #undef HAVE_VFORK -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_VFORK_H -/* Define to 1 if you have the `vsnprintf' function. */ +/* Define if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_WINDOWS_H -/* Define to 1 if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_WINSOCK_H -/* Define to 1 if you have the `_fullpath' function. */ +/* Define if you have the `_fullpath' function. */ #undef HAVE__FULLPATH -/* Define to 1 if you have the `_pclose' function. */ +/* Define if you have the `_pclose' function. */ #undef HAVE__PCLOSE -/* Define to 1 if you have the `_popen' function. */ +/* Define if you have the `_popen' function. */ #undef HAVE__POPEN -/* Define to 1 if you have the `_snprintf' function. */ +/* Define if you have the `_snprintf' function. */ #undef HAVE__SNPRINTF -/* Define to 1 if you have the `_stricmp' function. */ +/* Define if you have the `_stricmp' function. */ #undef HAVE__STRICMP -/* Define to 1 if you have the `_vsnprintf' function. */ +/* Define if you have the `_vsnprintf' function. */ #undef HAVE__VSNPRINTF -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE @@ -1065,23 +1056,23 @@ STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION -/* Define to 1 if you have the ANSI C header files. */ +/* Define if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both and . */ +/* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME -/* Define to 1 if your declares `struct tm'. */ +/* Define if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Define if the system headers declare usleep to return void. */ #undef USLEEP_RETURNS_VOID -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ +/* Define if your processor stores words with the most significant byte first + (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN -/* Define to 1 if the X Window System is missing or not being used. */ +/* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to empty if `const' does not conform to ANSI C. */