You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2001/01/23 00:11:33 UTC

cvs commit: apr-util/include apr_buckets.h

rbb         01/01/22 15:11:33

  Modified:    buckets  apr_buckets_mmap.c
               include  apr_buckets.h
  Log:
  Protect the MMAP buckets with #if APR_HAS_MMAP.  Without this, we don't
  compile unless MMAP's are enabled.
  
  Revision  Changes    Path
  1.26      +5 -0      apr-util/buckets/apr_buckets_mmap.c
  
  Index: apr_buckets_mmap.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_mmap.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -d -b -w -u -r1.25 -r1.26
  --- apr_buckets_mmap.c	2001/01/19 07:02:00	1.25
  +++ apr_buckets_mmap.c	2001/01/22 23:11:30	1.26
  @@ -53,8 +53,11 @@
    */
   
   #include "apr_buckets.h"
  +#include "apr.h"
   #include <stdlib.h>
   
  +#if APR_HAS_MMAP
  +
   static apr_status_t mmap_read(apr_bucket *b, const char **str, 
   			      apr_size_t *length, apr_read_type_e block)
   {
  @@ -123,3 +126,5 @@
       apr_bucket_split_shared,
       apr_bucket_copy_shared
   };
  +
  +#endif
  
  
  
  1.65      +8 -0      apr-util/include/apr_buckets.h
  
  Index: apr_buckets.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -d -b -w -u -r1.64 -r1.65
  --- apr_buckets.h	2001/01/19 07:01:26	1.64
  +++ apr_buckets.h	2001/01/22 23:11:32	1.65
  @@ -424,6 +424,7 @@
    * @deffunc int APR_BUCKET_IS_IMMORTAL(apr_bucket *e)
    */
   #define APR_BUCKET_IS_IMMORTAL(e)    (e->type == &apr_bucket_type_immortal)
  +#if APR_HAS_MMAP
   /**
    * Determine if a bucket is a MMAP bucket
    * @param e The bucket to inspect
  @@ -431,6 +432,7 @@
    * @deffunc int APR_BUCKET_IS_MMAP(apr_bucket *e)
    */
   #define APR_BUCKET_IS_MMAP(e)        (e->type == &apr_bucket_type_mmap)
  +#endif
   /**
    * Determine if a bucket is a POOL bucket
    * @param e The bucket to inspect
  @@ -535,6 +537,7 @@
       size_t  alloc_len;
   };
   
  +#if APR_HAS_MMAP
   typedef struct apr_bucket_mmap apr_bucket_mmap;
   /**
    * A bucket referring to an mmap()ed file
  @@ -545,6 +548,7 @@
       /** The mmap this sub_bucket refers to */
       apr_mmap_t *mmap;
   };
  +#endif
   
   typedef struct apr_bucket_file apr_bucket_file;
   /**
  @@ -797,10 +801,12 @@
    * heap.
    */
   APU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_heap;
  +#if APR_HAS_MMAP
   /**
    * The MMAP bucket type.  This bucket represents an MMAP'ed file
    */
   APU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_mmap;
  +#endif
   /**
    * The POOL bucket type.  This bucket represents a data that was allocated
    * out of a pool.  IF this bucket is still available when the pool is cleared,
  @@ -1061,6 +1067,7 @@
                   apr_bucket_make_pool(apr_bucket *b, const char *buf, 
                                       apr_size_t length, apr_pool_t *p);
   
  +#if APR_HAS_MMAP
   /**
    * Create a bucket referring to mmap()ed memory.
    * @param mmap The mmap to insert into the bucket
  @@ -1087,6 +1094,7 @@
   APU_DECLARE(apr_bucket *) 
                   apr_bucket_make_mmap(apr_bucket *b, apr_mmap_t *mm, 
                                       apr_off_t start, apr_size_t length);
  +#endif
   
   /**
    * Create a bucket referring to a socket.