You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by su...@apache.org on 2002/01/25 21:50:32 UTC

cvs commit: apr/mmap/win32 mmap.c

sussman     02/01/25 12:50:32

  Modified:    include  apr_mmap.h
               mmap/unix mmap.c
               mmap/win32 mmap.c
  Log:
  I've been getting compile warnings on FreeBSD 4.4/4.5 for months:
  
    "warning: declaration of `mmap' shadows global declaration"
  
  This should fix the problem.
  
  * apr_mmap.h (apr_mmap_delete, apr_mmap_offset): rename argument to 'mm'.
  
  * mmap/unix/mmap/mmap.c (apr_mmap_delete): same.
  * mmap/unix/mmap/common.c (apr_mmap_offset):  same.
  * mmap/win32/mmap/mmap.c (apr_mmap_delete): same.
  
  Revision  Changes    Path
  1.30      +2 -2      apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_mmap.h,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- apr_mmap.h	28 Nov 2001 00:36:53 -0000	1.29
  +++ apr_mmap.h	25 Jan 2002 20:50:32 -0000	1.30
  @@ -177,7 +177,7 @@
    * Remove a mmap'ed.
    * @param mmap The mmap'ed file.
    */
  -APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mmap);
  +APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mm);
   
   /** 
    * Move the pointer into the mmap'ed file to the specified offset.
  @@ -185,7 +185,7 @@
    * @param mmap The mmap'ed file.
    * @param offset The offset to move to.
    */
  -APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mmap, 
  +APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mm, 
                                             apr_off_t offset);
   
   #endif /* APR_HAS_MMAP */
  
  
  
  1.39      +4 -4      apr/mmap/unix/mmap.c
  
  Index: mmap.c
  ===================================================================
  RCS file: /home/cvs/apr/mmap/unix/mmap.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mmap.c	22 Nov 2001 17:51:27 -0000	1.38
  +++ mmap.c	25 Jan 2002 20:50:32 -0000	1.39
  @@ -199,15 +199,15 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mmap)
  +APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mm)
   {
       apr_status_t rv;
   
  -    if (mmap->mm == (void *)-1)
  +    if (mm->mm == (void *)-1)
           return APR_ENOENT;
         
  -    if ((rv = mmap_cleanup(mmap)) == APR_SUCCESS) {
  -        apr_pool_cleanup_kill(mmap->cntxt, mmap, mmap_cleanup);
  +    if ((rv = mmap_cleanup(mm)) == APR_SUCCESS) {
  +        apr_pool_cleanup_kill(mm->cntxt, mm, mmap_cleanup);
           return APR_SUCCESS;
       }
       return rv;
  
  
  
  1.9       +3 -3      apr/mmap/win32/mmap.c
  
  Index: mmap.c
  ===================================================================
  RCS file: /home/cvs/apr/mmap/win32/mmap.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mmap.c	21 Nov 2001 18:03:59 -0000	1.8
  +++ mmap.c	25 Jan 2002 20:50:32 -0000	1.9
  @@ -195,12 +195,12 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mmap)
  +APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mm)
   {
       apr_status_t rv;
   
  -    if ((rv = mmap_cleanup(mmap)) == APR_SUCCESS) {
  -        apr_pool_cleanup_kill(mmap->cntxt, mmap, mmap_cleanup);
  +    if ((rv = mmap_cleanup(mm)) == APR_SUCCESS) {
  +        apr_pool_cleanup_kill(mm->cntxt, mm, mmap_cleanup);
           return APR_SUCCESS;
       }
       return rv;