summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-10-13 22:28:29 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-10-13 22:28:29 +0000
commit0f0ff2aa3db7745c14b0477deafa6681f33a1f2f (patch)
tree1aac03668c9e6ae9083732cc98be6b22fe3b3881
parent12f849e41bddb56875e405003b531b1e13759502 (diff)
downloadlibapr-util-0f0ff2aa3db7745c14b0477deafa6681f33a1f2f.tar.gz
Avoid declaring exports that exist within only a certain configuration
for later portability. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@58781 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--buckets/apr_buckets_file.c6
-rw-r--r--include/apr_buckets.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/buckets/apr_buckets_file.c b/buckets/apr_buckets_file.c
index 302359d8..8eb71842 100644
--- a/buckets/apr_buckets_file.c
+++ b/buckets/apr_buckets_file.c
@@ -223,15 +223,17 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd,
return apr_bucket_file_make(b, fd, offset, len, p);
}
-#if APR_HAS_MMAP
APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *e,
int enabled)
{
+#if APR_HAS_MMAP
apr_bucket_file *a = e->data;
a->can_mmap = enabled;
return APR_SUCCESS;
-}
+#else
+ return APR_ENOTIMPL;
#endif /* APR_HAS_MMAP */
+}
static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool)
diff --git a/include/apr_buckets.h b/include/apr_buckets.h
index c9ff3d06..300063ea 100644
--- a/include/apr_buckets.h
+++ b/include/apr_buckets.h
@@ -1438,7 +1438,6 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,
apr_off_t offset,
apr_size_t len, apr_pool_t *p);
-#if APR_HAS_MMAP
/**
* Enable or disable memory-mapping for a FILE bucket (default is enabled)
* @param b The bucket
@@ -1447,7 +1446,6 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,
*/
APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *b,
int enabled);
-#endif /* APR_HAS_MMAP */
/** @} */
#ifdef __cplusplus