ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/autoconf/configure.ac
(Generate patch)

Comparing IO-AIO/autoconf/configure.ac (file contents):
Revision 1.2 by root, Sun Jul 31 18:20:07 2005 UTC vs.
Revision 1.3 by root, Mon Aug 22 23:20:37 2005 UTC

43 return 0; 43 return 0;
44} 44}
45],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)]) 45],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)])
46test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available) 46test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available)
47 47
48AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([
49# include <sys/types.h>
50#if __linux
51# include <sys/sendfile.h>
52#elif __freebsd
53# include <sys/socket.h>
54# include <sys/uio.h>
55#elif __hpux
56# include <sys/socket.h>
57#endif
58int main(void)
59{
60 int fd = 0;
61 off_t offset = 1;
62 size_t count = 2;
63 ssize_t res;
64#if __linux
65 res = sendfile (fd, fd, offset, count);
66#elif __freebsd
67 res = sendfile (fd, fd, offset, count, 0, &offset, 0);
68#elif __hpux
69 res = sendfile (fd, fd, offset, count, 0, 0);
70#endif
71 return 0;
72}
73],ac_cv_sendfile=yes,ac_cv_sendfile=no)])
74test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported)
75
48AC_OUTPUT 76AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines