apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/test MakeWin32Make.pl client.c sendfile.c server.c testargs.c testcontext.c testdso.c testfile.c testflock.c testmmap.c testpipe.c testproc.c testsock.c
Date Tue, 23 Jan 2001 06:00:47 GMT
wrowe       01/01/22 22:00:47

  Modified:    test     MakeWin32Make.pl 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:
    Commit a bunch of cleanups to get win32 going again.  Note the apr.dsp
    built in debug mode is required to actually make these build.  There
    are still todo's for win32 (need cl debug flags, for one).
  
  Revision  Changes    Path
  1.4       +8 -2      apr/test/MakeWin32Make.pl
  
  Index: MakeWin32Make.pl
  ===================================================================
  RCS file: /home/cvs/apr/test/MakeWin32Make.pl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MakeWin32Make.pl	2000/12/07 06:53:46	1.3
  +++ MakeWin32Make.pl	2001/01/23 06:00:40	1.4
  @@ -7,6 +7,12 @@
   
   while ($t = <$srcfl>) {
   
  +    if ($t =~ m|\@INCLUDE_RULES\@|) {
  +        $t = "ALL: \$(TARGETS)\n";
  +    }
  +    if ($t =~ m|^ALL_LIBS=|) {
  +        $t = "ALL_LIBS=../LibD/apr.lib kernel32\.lib user32\.lib advapi32\.lib ws2_32\.lib
wsock32\.lib ole32\.lib";
  +    }
       if ($t =~ s|\@CFLAGS\@|\/nologo \/MDd \/W3 \/Gm \/GX \/Zi \/Od \/D "_DEBUG" \/D "WIN32"
\/D APR_DECLARE_STATIC \/FD|) {
           $t =~ s|-g ||;
       }
  @@ -20,7 +26,6 @@
       $t =~ s|\@CC\@|cl|;
       $t =~ s|\@RANLIB\@||;
       $t =~ s|\@OPTIM\@||;
  -    $t =~ s|\@LIBS\@|kernel32\.lib user32\.lib advapi32\.lib ws2_32\.lib wsock32\.lib ole32\.lib|;
       $t =~ s|-I\$\(INCDIR\)|\/I "\$\(INCDIR\)"|;
       $t =~ s|\.\.\/libapr\.a|\.\./LibD/apr\.lib|;
       if ($t =~ s|\@EXEEXT\@|\.exe|) {
  @@ -30,11 +35,12 @@
           $t =~ s|--export-dynamic ||; 
           $t =~ s|-fPIC ||;
       }
  -    if ($t =~ s|\$\(CC\) -shared|\$\(LINK\) \/subsystem:windows \/dll|) {
  +    if ($t =~ s|--module|\/subsystem:windows \/dll|) {
           $t =~ s|-o (\S+)|\/out:\"$1\"|;
       }
       while ($t =~ s|\.a\b|\.lib|) {}
       while ($t =~ s|\.o\b|\.obj|) {}
  +    while ($t =~ s|\.lo\b|\.obj|) {}
       while ($t =~ s|\.so\b|\.dll|) {}
   
       print $dstfl $t;
  
  
  
  1.23      +6 -1      apr/test/client.c
  
  Index: client.c
  ===================================================================
  RCS file: /home/cvs/apr/test/client.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- client.c	2000/12/03 17:47:40	1.22
  +++ client.c	2001/01/23 06:00:40	1.23
  @@ -60,6 +60,11 @@
   
   #define STRLEN 15
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, char *argv[])
   {
       apr_pool_t *context;
  @@ -90,7 +95,7 @@
           exit(-1);
       }
       fprintf(stdout, "OK\n");
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       fprintf(stdout, "Creating context.......");
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
  
  
  
  1.7       +6 -1      apr/test/sendfile.c
  
  Index: sendfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/sendfile.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sendfile.c	2001/01/22 02:55:03	1.6
  +++ sendfile.c	2001/01/23 06:00:41	1.7
  @@ -90,6 +90,11 @@
   
   typedef enum {BLK, NONBLK, TIMEOUT} client_socket_mode_t;
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   static void apr_setup(apr_pool_t **p, apr_socket_t **sock, int *family)
   {
       char buf[120];
  @@ -103,7 +108,7 @@
           exit(1);
       }
   
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       rv = apr_create_pool(p, NULL);
       if (rv != APR_SUCCESS) {
  
  
  
  1.24      +6 -1      apr/test/server.c
  
  Index: server.c
  ===================================================================
  RCS file: /home/cvs/apr/test/server.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- server.c	2000/12/03 17:47:40	1.23
  +++ server.c	2001/01/23 06:00:41	1.24
  @@ -60,6 +60,11 @@
   
   #define STRLEN 15
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, const char * const argv[])
   {
       apr_pool_t *context;
  @@ -87,7 +92,7 @@
           exit(-1);
       }
       fprintf(stdout, "OK\n");
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       fprintf(stdout, "Creating context.......");
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
  
  
  
  1.18      +6 -1      apr/test/testargs.c
  
  Index: testargs.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testargs.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- testargs.c	2000/11/29 07:41:27	1.17
  +++ testargs.c	2001/01/23 06:00:41	1.18
  @@ -73,6 +73,11 @@
       }
   }
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, const char * const argv[])
   {
       apr_pool_t *context;
  @@ -81,7 +86,7 @@
       const char *optarg;
   
       apr_initialize();
  -    atexit(apr_terminate);
  +    atexit(closeapr);
       apr_create_pool(&context, NULL);
   
       if (apr_initopt(&opt, context, argc, argv))
  
  
  
  1.12      +6 -1      apr/test/testcontext.c
  
  Index: testcontext.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testcontext.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- testcontext.c	2000/11/15 21:46:38	1.11
  +++ testcontext.c	2001/01/23 06:00:42	1.12
  @@ -68,6 +68,11 @@
       return APR_SUCCESS;
   }
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(void)
   {
       apr_pool_t *context;
  @@ -78,7 +83,7 @@
           fprintf(stderr, "Couldn't initialize.");
           exit(-1);
       }
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
  
  
  
  1.12      +6 -1      apr/test/testdso.c
  
  Index: testdso.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testdso.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- testdso.c	2000/12/05 00:14:11	1.11
  +++ testdso.c	2001/01/23 06:00:42	1.12
  @@ -11,6 +11,11 @@
   
   #define LIB_NAME "mod_test.so"
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main (int argc, char ** argv)
   {
       apr_dso_handle_t *h = NULL;
  @@ -28,7 +33,7 @@
       strcat(filename, LIB_NAME);
   
       apr_initialize();
  -    atexit(apr_terminate);
  +    atexit(closeapr);
           
       if (apr_create_pool(&cont, NULL) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
  
  
  
  1.26      +7 -3      apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- testfile.c	2001/01/23 04:10:48	1.25
  +++ testfile.c	2001/01/23 06:00:42	1.26
  @@ -69,6 +69,11 @@
   int testdirs(apr_pool_t *);
   static void test_read(apr_pool_t *);
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(void)
   {
       apr_pool_t *context;
  @@ -79,7 +84,6 @@
       apr_status_t status;
       apr_int32_t flag = APR_READ | APR_WRITE | APR_CREATE;
       apr_size_t nbytes = 0;
  -    apr_int32_t rv;
       apr_off_t zer = 0;
       char errmsg[120];
       char *buf;
  @@ -91,7 +95,7 @@
           fprintf(stderr, "Couldn't initialize.");
           exit(-1);
       }
  -    atexit(apr_terminate);
  +    atexit(closeapr);
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
           exit(-1);
  @@ -356,7 +360,7 @@
       fprintf(stdout, "OK\n");
   
       fprintf(stdout, "\t\tFile size.......");
  -    if (dirent.size != bytes)) {
  +    if (dirent.size != bytes) {
           fprintf(stderr, "Got wrong file size %" APR_SIZE_T_FMT "\n", dirent.size);
           return -1;
       }
  
  
  
  1.2       +6 -1      apr/test/testflock.c
  
  Index: testflock.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testflock.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testflock.c	2000/11/29 07:37:41	1.1
  +++ testflock.c	2001/01/23 06:00:43	1.2
  @@ -141,6 +141,11 @@
       printf(" done.\nExiting.\n");
   }
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, const char * const *argv)
   {
       int reader = 0;
  @@ -151,7 +156,7 @@
   
       if (apr_initialize() != APR_SUCCESS)
           errmsg("Could not initialize APR.\n");
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       if (apr_create_pool(&pool, NULL) != APR_SUCCESS)
           errmsg("Could not create global pool.\n");
  
  
  
  1.23      +6 -1      apr/test/testmmap.c
  
  Index: testmmap.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testmmap.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- testmmap.c	2001/01/20 21:39:05	1.22
  +++ testmmap.c	2001/01/23 06:00:43	1.23
  @@ -69,6 +69,11 @@
    */
   #define PATH_LEN 255
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(void)
   {
   #if APR_HAS_MMAP    
  @@ -89,7 +94,7 @@
           exit(-1);
       }
       fprintf(stdout,"OK\n");
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       fprintf(stdout,"Creating context....................");    
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
  
  
  
  1.12      +6 -1      apr/test/testpipe.c
  
  Index: testpipe.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpipe.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- testpipe.c	2000/12/03 17:47:40	1.11
  +++ testpipe.c	2001/01/23 06:00:43	1.12
  @@ -62,6 +62,11 @@
   #include <unistd.h>
   #endif
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(void)
   {
       apr_pool_t *context;
  @@ -76,7 +81,7 @@
           fprintf(stderr, "Couldn't initialize.");
           exit(-1);
       }
  -    atexit(apr_terminate);
  +    atexit(closeapr);
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
           exit(-1);
  
  
  
  1.23      +6 -1      apr/test/testproc.c
  
  Index: testproc.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testproc.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- testproc.c	2000/12/03 17:47:40	1.22
  +++ testproc.c	2001/01/23 06:00:43	1.23
  @@ -69,6 +69,11 @@
   int test_filedel(void);
   int testdirs(void);
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, char *argv[])
   {
       apr_pool_t *context;
  @@ -84,7 +89,7 @@
           fprintf(stderr, "Couldn't initialize.");
           exit(-1);
       }
  -    atexit(apr_terminate);
  +    atexit(closeapr);
       apr_create_pool(&context, NULL);
   
   
  
  
  
  1.17      +6 -1      apr/test/testsock.c
  
  Index: testsock.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testsock.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- testsock.c	2000/12/21 16:44:12	1.16
  +++ testsock.c	2001/01/23 06:00:44	1.17
  @@ -180,6 +180,11 @@
       return 1;
   }
   
  +void closeapr(void)
  +{
  +    apr_terminate();
  +}
  +
   int main(int argc, char *argv[])
   {
       apr_pool_t *context = NULL;
  @@ -190,7 +195,7 @@
           exit(-1);
       }
       fprintf(stdout, "OK\n");
  -    atexit(apr_terminate);
  +    atexit(closeapr);
   
       fprintf(stdout, "Creating context.......");
       if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
  
  
  

Mime
View raw message