trawick 01/01/23 11:56:58
Modified: test client.c sendfile.c server.c testargs.c
testcontext.c testdso.c testfile.c testflock.c
testmmap.c testpipe.c testproc.c testsock.c
Log:
Get testfile.c to compile when APR_FILES_AS_SOCKETS is defined.
Clean up gcc warnings on the closeapr() atexit function.
Revision Changes Path
1.24 +1 -1 apr/test/client.c
Index: client.c
===================================================================
RCS file: /home/cvs/apr/test/client.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- client.c 2001/01/23 06:00:40 1.23
+++ client.c 2001/01/23 19:56:14 1.24
@@ -60,7 +60,7 @@
#define STRLEN 15
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.8 +1 -1 apr/test/sendfile.c
Index: sendfile.c
===================================================================
RCS file: /home/cvs/apr/test/sendfile.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sendfile.c 2001/01/23 06:00:41 1.7
+++ sendfile.c 2001/01/23 19:56:17 1.8
@@ -90,7 +90,7 @@
typedef enum {BLK, NONBLK, TIMEOUT} client_socket_mode_t;
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.25 +1 -1 apr/test/server.c
Index: server.c
===================================================================
RCS file: /home/cvs/apr/test/server.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- server.c 2001/01/23 06:00:41 1.24
+++ server.c 2001/01/23 19:56:18 1.25
@@ -60,7 +60,7 @@
#define STRLEN 15
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.19 +1 -1 apr/test/testargs.c
Index: testargs.c
===================================================================
RCS file: /home/cvs/apr/test/testargs.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- testargs.c 2001/01/23 06:00:41 1.18
+++ testargs.c 2001/01/23 19:56:20 1.19
@@ -73,7 +73,7 @@
}
}
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.13 +1 -1 apr/test/testcontext.c
Index: testcontext.c
===================================================================
RCS file: /home/cvs/apr/test/testcontext.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- testcontext.c 2001/01/23 06:00:42 1.12
+++ testcontext.c 2001/01/23 19:56:23 1.13
@@ -68,7 +68,7 @@
return APR_SUCCESS;
}
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.13 +1 -1 apr/test/testdso.c
Index: testdso.c
===================================================================
RCS file: /home/cvs/apr/test/testdso.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- testdso.c 2001/01/23 06:00:42 1.12
+++ testdso.c 2001/01/23 19:56:25 1.13
@@ -11,7 +11,7 @@
#define LIB_NAME "mod_test.so"
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.27 +9 -7 apr/test/testfile.c
Index: testfile.c
===================================================================
RCS file: /home/cvs/apr/test/testfile.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- testfile.c 2001/01/23 06:00:42 1.26
+++ testfile.c 2001/01/23 19:56:26 1.27
@@ -69,7 +69,7 @@
int testdirs(apr_pool_t *);
static void test_read(apr_pool_t *);
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
@@ -90,6 +90,9 @@
const char *str;
char *filename = "test.fil";
char *teststr;
+#if APR_FILES_AS_SOCKETS
+ apr_int32_t num;
+#endif
if (apr_initialize() != APR_SUCCESS) {
fprintf(stderr, "Couldn't initialize.");
@@ -175,19 +178,18 @@
fprintf(stdout, "\t\tChecking for incoming data.......");
apr_setup_poll(&sdset, 1, context);
apr_add_poll_socket(sdset, testsock, APR_POLLIN);
- rv = 1;
- if (apr_poll(sdset, &rv, -1) != APR_SUCCESS) {
+ num = 1;
+ if (apr_poll(sdset, &num, -1) != APR_SUCCESS) {
fprintf(stderr, "Select caused an error\n");
exit(-1);
}
- else if (rv == 0) {
- fprintf(stderr, "I should not return until rv == 1\n");
+ else if (num == 0) {
+ fprintf(stderr, "I should not return until num == 1\n");
exit(-1);
}
fprintf(stdout, "OK\n");
#endif
-
fprintf(stdout, "\tReading from the file.......");
nbytes = strlen("this is a test");
buf = (char *)apr_palloc(context, nbytes + 1);
@@ -361,7 +363,7 @@
fprintf(stdout, "\t\tFile size.......");
if (dirent.size != bytes) {
- fprintf(stderr, "Got wrong file size %" APR_SIZE_T_FMT "\n",
dirent.size);
+ fprintf(stderr, "Got wrong file size %" APR_OFF_T_FMT "\n",
dirent.size);
return -1;
}
fprintf(stdout, "OK\n");
1.3 +1 -1 apr/test/testflock.c
Index: testflock.c
===================================================================
RCS file: /home/cvs/apr/test/testflock.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- testflock.c 2001/01/23 06:00:43 1.2
+++ testflock.c 2001/01/23 19:56:28 1.3
@@ -141,7 +141,7 @@
printf(" done.\nExiting.\n");
}
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.24 +1 -1 apr/test/testmmap.c
Index: testmmap.c
===================================================================
RCS file: /home/cvs/apr/test/testmmap.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- testmmap.c 2001/01/23 06:00:43 1.23
+++ testmmap.c 2001/01/23 19:56:29 1.24
@@ -69,7 +69,7 @@
*/
#define PATH_LEN 255
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.13 +1 -1 apr/test/testpipe.c
Index: testpipe.c
===================================================================
RCS file: /home/cvs/apr/test/testpipe.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- testpipe.c 2001/01/23 06:00:43 1.12
+++ testpipe.c 2001/01/23 19:56:31 1.13
@@ -62,7 +62,7 @@
#include <unistd.h>
#endif
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.24 +1 -1 apr/test/testproc.c
Index: testproc.c
===================================================================
RCS file: /home/cvs/apr/test/testproc.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- testproc.c 2001/01/23 06:00:43 1.23
+++ testproc.c 2001/01/23 19:56:33 1.24
@@ -69,7 +69,7 @@
int test_filedel(void);
int testdirs(void);
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}
1.18 +1 -1 apr/test/testsock.c
Index: testsock.c
===================================================================
RCS file: /home/cvs/apr/test/testsock.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- testsock.c 2001/01/23 06:00:44 1.17
+++ testsock.c 2001/01/23 19:56:35 1.18
@@ -180,7 +180,7 @@
return 1;
}
-void closeapr(void)
+static void closeapr(void)
{
apr_terminate();
}