trawick 2003/04/12 04:23:54
Modified: test sendfile.c
Log:
iov_len can be too big for an int (e.g., ia64 Linux)
Revision Changes Path
1.25 +5 -4 apr/test/sendfile.c
Index: sendfile.c
===================================================================
RCS file: /home/cvs/apr/test/sendfile.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- sendfile.c 1 Jan 2003 00:01:56 -0000 1.24
+++ sendfile.c 12 Apr 2003 11:23:54 -0000 1.25
@@ -356,15 +356,16 @@
printf("Calling apr_socket_sendfile()...\n");
printf("Headers (%d):\n", hdtr.numheaders);
for (i = 0; i < hdtr.numheaders; i++) {
- printf("\t%d bytes (%c)\n",
- hdtr.headers[i].iov_len, *(char
*)hdtr.headers[i].iov_base);
+ printf("\t%ld bytes (%c)\n",
+ (long)hdtr.headers[i].iov_len,
+ *(char *)hdtr.headers[i].iov_base);
}
printf("File: %ld bytes from offset %ld\n",
(long)tmplen, (long)current_file_offset);
printf("Trailers (%d):\n", hdtr.numtrailers);
for (i = 0; i < hdtr.numtrailers; i++) {
- printf("\t%d bytes\n",
- hdtr.trailers[i].iov_len);
+ printf("\t%ld bytes\n",
+ (long)hdtr.trailers[i].iov_len);
}
rv = apr_socket_sendfile(sock, f, &hdtr, ¤t_file_offset,
&tmplen, 0);