Skip to content

Commit

Permalink
iov_len can be too big for an int (e.g., ia64 Linux)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64478 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
trawick committed Apr 12, 2003
1 parent 6105078 commit 90c2222
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/sendfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,16 @@ static int client(client_socket_mode_t socket_mode, char *host)
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, &current_file_offset, &tmplen, 0);
Expand Down

0 comments on commit 90c2222

Please sign in to comment.