… | |
… | |
23 | # elif __freebsd |
23 | # elif __freebsd |
24 | # include <sys/socket.h> |
24 | # include <sys/socket.h> |
25 | # include <sys/uio.h> |
25 | # include <sys/uio.h> |
26 | # elif __hpux |
26 | # elif __hpux |
27 | # include <sys/socket.h> |
27 | # include <sys/socket.h> |
|
|
28 | # else |
|
|
29 | # error sendfile support requested but not available |
28 | # endif |
30 | # endif |
29 | #endif |
31 | #endif |
30 | |
32 | |
31 | #if __ia64 |
33 | #if __ia64 |
32 | # define STACKSIZE 65536 |
34 | # define STACKSIZE 65536 |
… | |
… | |
450 | { |
452 | { |
451 | off_t sbytes; |
453 | off_t sbytes; |
452 | res = sendfile (ifd, ofd, offset, count, 0, &sbytes, 0); |
454 | res = sendfile (ifd, ofd, offset, count, 0, &sbytes, 0); |
453 | |
455 | |
454 | if (!res && errno == EAGAIN) |
456 | if (!res && errno == EAGAIN) |
|
|
457 | /* maybe on others, too, as usual, the manpage leaves you guessing */ |
455 | res = sbytes; |
458 | res = sbytes; |
456 | } |
459 | } |
457 | |
460 | |
458 | #elif __hpux |
461 | #elif __hpux |
459 | res = sendfile (ofd, ifd, offset, count, 0, 0); |
462 | res = sendfile (ofd, ifd, offset, count, 0, 0); |