diff options
author | David Reid <dreid@apache.org> | 2000-03-07 23:29:22 +0000 |
---|---|---|
committer | David Reid <dreid@apache.org> | 2000-03-07 23:29:22 +0000 |
commit | dc609eea4e31df88c68b66b13948e9f15741e916 (patch) | |
tree | 39696f127492cb57e678ff42070b219d05958dfc /test/testmmap.c | |
parent | 4dba01c4dc08df487619cf953b02be7fc6868ab1 (diff) | |
download | apr-dc609eea4e31df88c68b66b13948e9f15741e916.tar.gz |
A few minor changes to tidy things up a bit. Also rewrote ap_wait_proc
to work correctly on BeOS. testmmap now works again.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@59686 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testmmap.c')
-rw-r--r-- | test/testmmap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/testmmap.c b/test/testmmap.c index 8f16e6224..dd305e3cb 100644 --- a/test/testmmap.c +++ b/test/testmmap.c @@ -74,7 +74,6 @@ int main() ap_finfo_t finfo; ap_int32_t flag = APR_READ; char *file1; - ap_ssize_t filesize; fprintf (stdout,"APR MMAP Test\n*************\n\n"); @@ -100,15 +99,15 @@ int main() fprintf(stderr, "Getting file size..................."); if (ap_getfileinfo(&finfo, thefile) != APR_SUCCESS) { - perror("Didn't open file"); + perror("Didn't get file information!"); exit(-1); } else { fprintf(stdout, "%d bytes\n", finfo.size); } - - fprintf(stdout,"Trying to mmap the open file........"); - if (ap_mmap_create(&themmap, thefile, 0, filesize, context) != APR_SUCCESS) { + + fprintf(stdout,"Trying to mmap the file.............."); + if (ap_mmap_create(&themmap, thefile, 0, finfo.size, context) != APR_SUCCESS) { fprintf(stderr,"Failed!\n"); exit(-1); } |