ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.c
(Generate patch)

Comparing libeio/eio.c (file contents):
Revision 1.81 by root, Tue Jul 5 20:34:42 2011 UTC vs.
Revision 1.82 by root, Thu Jul 7 15:44:44 2011 UTC

985 if (!count) 985 if (!count)
986 return 0; 986 return 0;
987 987
988 for (;;) 988 for (;;)
989 { 989 {
990#ifdef __APPLE__
991# undef HAVE_SENDFILE /* broken, as everything on os x */
992#endif
990#if HAVE_SENDFILE 993#if HAVE_SENDFILE
991# if __linux 994# if __linux
992 off_t soffset = offset; 995 off_t soffset = offset;
993 res = sendfile (ofd, ifd, &soffset, count); 996 res = sendfile (ofd, ifd, &soffset, count);
994 997
1010 1013
1011 /* according to source inspection, this is correct, and useful behaviour */ 1014 /* according to source inspection, this is correct, and useful behaviour */
1012 if (sbytes) 1015 if (sbytes)
1013 res = sbytes; 1016 res = sbytes;
1014 1017
1015# elif defined (__APPLE__) && 0 /* broken, as everything on os x */ 1018# elif defined (__APPLE__)
1016 off_t sbytes = count; 1019 off_t sbytes = count;
1017 res = sendfile (ifd, ofd, offset, &sbytes, 0, 0); 1020 res = sendfile (ifd, ofd, offset, &sbytes, 0, 0);
1018 1021
1019 /* according to the manpage, sbytes is always valid */ 1022 /* according to the manpage, sbytes is always valid */
1020 if (sbytes) 1023 if (sbytes)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines