apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/misc/win32 rand.c
Date Mon, 13 Jan 2003 18:23:09 GMT
wrowe       2003/01/13 10:23:09

  Modified:    include  apr_general.h
               misc/netware rand.c
               misc/unix rand.c
               misc/win32 rand.c
  Log:
    While this is a 'proper' change, it breaks 64 bit platforms.
    Identify as "this will change" with the 1.0 (or 0.10) generation.
  
  Revision  Changes    Path
  1.78      +8 -3      apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_general.h,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- apr_general.h	1 Jan 2003 00:01:45 -0000	1.77
  +++ apr_general.h	13 Jan 2003 18:23:09 -0000	1.78
  @@ -260,14 +260,19 @@
   
   #if APR_HAS_RANDOM
   
  +#ifdef APR_ENABLE_FOR_1_0
  +APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf, 
  +                                                    apr_size_t length);
  +#else
   /* TODO: I'm not sure this is the best place to put this prototype...*/
   /**
    * Generate random bytes.
  - * @param buf Random bytes go here
  - * @param length number of bytes to read
  + * @param buf Buffer to fill with random bytes
  + * @param length Length of buffer in bytes (becomes apr_size_t in APR 1.0)
    */
   APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf, 
  -                                                    apr_size_t length);
  +                                                    int length);
  +#endif
   
   #endif
   /** @} */
  
  
  
  1.7       +5 -1      apr/misc/netware/rand.c
  
  Index: rand.c
  ===================================================================
  RCS file: /home/cvs/apr/misc/netware/rand.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- rand.c	1 Jan 2003 00:01:52 -0000	1.6
  +++ rand.c	13 Jan 2003 18:23:09 -0000	1.7
  @@ -62,7 +62,11 @@
   #include <nks/plat.h>
   
   APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf, 
  -                                                    apr_size_t length) 
  +#ifdef APR_ENABLE_FOR_1_0
  +                                                    apr_size_t length)
  +#else
  +                                                    int length)
  +#endif
   {
       return NXSeedRandom(length, buf);
   }
  
  
  
  1.21      +4 -0      apr/misc/unix/rand.c
  
  Index: rand.c
  ===================================================================
  RCS file: /home/cvs/apr/misc/unix/rand.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- rand.c	6 Jan 2003 23:44:32 -0000	1.20
  +++ rand.c	13 Jan 2003 18:23:09 -0000	1.21
  @@ -81,7 +81,11 @@
   #if APR_HAS_RANDOM
   
   APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf, 
  +#ifdef APR_ENABLE_FOR_1_0
                                                       apr_size_t length)
  +#else
  +                                                    int length)
  +#endif
   {
   #ifdef DEV_RANDOM
   
  
  
  
  1.21      +4 -0      apr/misc/win32/rand.c
  
  Index: rand.c
  ===================================================================
  RCS file: /home/cvs/apr/misc/win32/rand.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- rand.c	6 Jan 2003 23:44:33 -0000	1.20
  +++ rand.c	13 Jan 2003 18:23:09 -0000	1.21
  @@ -61,7 +61,11 @@
   
   
   APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf,
  +#ifdef APR_ENABLE_FOR_1_0
                                                       apr_size_t length)
  +#else
  +                                                    int length)
  +#endif
   {
       HCRYPTPROV hProv;
       apr_status_t res = APR_SUCCESS;
  
  
  

Mime
View raw message