You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@locus.apache.org on 2000/12/04 23:59:59 UTC

cvs commit: apr/test testmmap.c

wrowe       00/12/04 14:59:58

  Modified:    test     testmmap.c
  Log:
    Build even if the platform doesn't support mmap.
  
  Revision  Changes    Path
  1.16      +6 -0      apr/test/testmmap.c
  
  Index: testmmap.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testmmap.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- testmmap.c	2000/12/04 22:26:53	1.15
  +++ testmmap.c	2000/12/04 22:59:58	1.16
  @@ -68,6 +68,7 @@
   
   int main(void)
   {
  +#if APR_HAS_MMAP    
       apr_pool_t *context;
       apr_mmap_t *themmap = NULL;
       apr_file_t *thefile = NULL;
  @@ -131,4 +132,9 @@
       fprintf (stdout,"\nTest Complete\n");
   
       return 1;
  +#else    
  +    fprintf(stdout,"APR MMAP Test\n*************\n\n");
  +    fprintf(stdout,"Failed!  APR was not built with MMAP.\n");
  +    return -1;
  +#endif
   }
  
  
  

Re: cvs commit: apr/test testmmap.c

Posted by rb...@covalent.net.
>        return 1;
>   +#else    
>   +    fprintf(stdout,"APR MMAP Test\n*************\n\n");
>   +    fprintf(stdout,"Failed!  APR was not built with MMAP.\n");
>   +    return -1;
>   +#endif
>    }

Please do not fail with a -1 here.  make test checks to determine if we
have failed with a -1 and stops at that point.  Building without MMAP
support should not be a fatal error, it should return 0 or 1.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apr/test testmmap.c

Posted by rb...@covalent.net.
>        return 1;
>   +#else    
>   +    fprintf(stdout,"APR MMAP Test\n*************\n\n");
>   +    fprintf(stdout,"Failed!  APR was not built with MMAP.\n");
>   +    return -1;
>   +#endif
>    }

Please do not fail with a -1 here.  make test checks to determine if we
have failed with a -1 and stops at that point.  Building without MMAP
support should not be a fatal error, it should return 0 or 1.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------