cvs commit: apache-2.0/src/lib/apr/test htdigest.c
rbb 99/12/20 11:44:48 Modified:src/lib/apr/test htdigest.c Log: Remove the apr_config.h include line and the ifdefs that require it. This file will need to be updated when it is moved back into the Apache tree to check for system headers again, but right now, it can't check because we don't have a header file for it to use. Revision ChangesPath 1.11 +0 -9 apache-2.0/src/lib/apr/test/htdigest.c Index: htdigest.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- htdigest.c1999/12/15 12:20:40 1.10 +++ htdigest.c1999/12/20 19:44:42 1.11 @@ -66,21 +66,12 @@ * by Alexei Kosut, based on htpasswd.c, by Rob McCool */ -#include apr_config.h #include apr_lib.h #include apr_md5.h -#ifdef HAVE_SYS_TYPES_H #include sys/types.h -#endif -#ifdef HAVE_SYS_SIGNAL_H #include sys/signal.h -#endif -#ifdef HAVE_SIGNAL_H #include signal.h -#endif -#ifdef HAVE_STDLIB_H #include stdlib.h -#endif #ifdef WIN32 #include conio.h
cvs commit: apache-2.0/src/lib/apr/test htdigest.c testmmap.c
dreid 99/12/15 04:20:41 Modified:src/lib/apr/test htdigest.c testmmap.c Log: Get the mmap test working again and tidy up in htdigest. Revision ChangesPath 1.10 +9 -0 apache-2.0/src/lib/apr/test/htdigest.c Index: htdigest.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- htdigest.c1999/12/03 16:12:27 1.9 +++ htdigest.c1999/12/15 12:20:40 1.10 @@ -66,12 +66,21 @@ * by Alexei Kosut, based on htpasswd.c, by Rob McCool */ +#include apr_config.h #include apr_lib.h #include apr_md5.h +#ifdef HAVE_SYS_TYPES_H #include sys/types.h +#endif +#ifdef HAVE_SYS_SIGNAL_H #include sys/signal.h +#endif +#ifdef HAVE_SIGNAL_H #include signal.h +#endif +#ifdef HAVE_STDLIB_H #include stdlib.h +#endif #ifdef WIN32 #include conio.h 1.4 +11 -8 apache-2.0/src/lib/apr/test/testmmap.c Index: testmmap.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testmmap.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- testmmap.c1999/12/03 15:18:36 1.3 +++ testmmap.c1999/12/15 12:20:40 1.4 @@ -73,6 +73,7 @@ ap_file_t *thefile; ap_int32_t flag = APR_READ; char *file1; +ap_ssize_t filesize; fprintf (stdout,APR MMAP Test\n*\n\n); @@ -87,13 +88,6 @@ getcwd(file1, PATH_LEN); strncat(file1,/testmmap.c,11); -fprintf(stdout,Trying to delete the mmap file..); -if (ap_mmap_delete(themmap) != APR_SUCCESS) { -fprintf(stderr,Failed!\n); -exit (-1); -} -fprintf(stdout,OK\n\n); - fprintf(stdout, Opening file); if (ap_open(thefile, file1, flag, APR_UREAD | APR_GREAD, context) != APR_SUCCESS) { perror(Didn't open file); @@ -102,9 +96,18 @@ else { fprintf(stdout, OK\n); } + +fprintf(stderr, Getting file size...); +if (ap_get_filesize(filesize, thefile) != APR_SUCCESS) { +perror(Didn't open file); +exit(-1); +} +else { +fprintf(stdout, %d bytes\n, filesize); +} fprintf(stdout,Trying to mmap the open file); -if (ap_mmap_create(themmap, thefile, 0, 0, context) != APR_SUCCESS) { +if (ap_mmap_create(themmap, thefile, 0, filesize, context) != APR_SUCCESS) { fprintf(stderr,Failed!\n); exit(-1); }
Re: cvs commit: apache-2.0/src/lib/apr/test htdigest.c testmmap.c
Index: htdigest.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- htdigest.c 1999/12/03 16:12:27 1.9 +++ htdigest.c 1999/12/15 12:20:40 1.10 @@ -66,12 +66,21 @@ * by Alexei Kosut, based on htpasswd.c, by Rob McCool */ +#include apr_config.h #include apr_lib.h #include apr_md5.h +#ifdef HAVE_SYS_TYPES_H #include sys/types.h +#endif +#ifdef HAVE_SYS_SIGNAL_H #include sys/signal.h +#endif +#ifdef HAVE_SIGNAL_H #include signal.h +#endif +#ifdef HAVE_STDLIB_H #include stdlib.h +#endif None of the test programs can include apr_config.h or use HAVE_FOO_H tests anymore. This is because apr_config.h is a private header file, and is not available to programs using apr. Test programs should only include apr.h. The HAVE_FOO_H macros are by definition internal only, because they do not protect namespace. This part of the patch needs to be backed out, because it does not really test APR's ability to abstract information. Ryan ___ Ryan Bloom [EMAIL PROTECTED] 4205 S Miami Blvd RTP, NC 27709 It's a beautiful sight to see good dancers doing simple steps. It's a painful sight to see beginners doing complicated patterns.