From 0f0ff2aa3db7745c14b0477deafa6681f33a1f2f Mon Sep 17 00:00:00 2001 From: wrowe Date: Sun, 13 Oct 2002 22:28:29 +0000 Subject: 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 --- buckets/apr_buckets_file.c | 6 ++++-- include/apr_buckets.h | 2 -- 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 -- cgit v1.2.1