diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-07-07 19:14:54 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-07-07 19:14:54 +0000 |
commit | 676f55b18d7ade429d3a4413af0f4e57ee5544dd (patch) | |
tree | 41e237c79d87c6cc8c42660baf0d76f31a9f2722 /mmap | |
parent | 3753ec977a49aff11ac19da996c99f90a2d76aae (diff) | |
download | libapr-676f55b18d7ade429d3a4413af0f4e57ee5544dd.tar.gz |
Stop using an incomplete type for MMAP files. The only sane way to really
store an MMAP file as far as I can see is as a void * and a length. BeOS
requires another variable, but it doesn't do any harm to expose that too.
This cleans up some code for Apache, and it makes sense IMHO.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap')
-rw-r--r-- | mmap/unix/Makefile.in | 28 | ||||
-rw-r--r-- | mmap/unix/common.c | 5 | ||||
-rw-r--r-- | mmap/unix/mmap.c | 24 | ||||
-rw-r--r-- | mmap/unix/mmap_h.h | 94 |
4 files changed, 40 insertions, 111 deletions
diff --git a/mmap/unix/Makefile.in b/mmap/unix/Makefile.in index f98c1ecf3..2677f3e77 100644 --- a/mmap/unix/Makefile.in +++ b/mmap/unix/Makefile.in @@ -49,19 +49,17 @@ depend: && rm Makefile.new # DO NOT REMOVE -common.o: common.c mmap_h.h $(INCDIR)/apr_private.h \ - $(INCDIR)/apr_general.h $(INCDIR)/apr.h \ - $(INCDIR)/apr_errno.h $(INCDIR)/apr_mmap.h \ - $(INCDIR)/apr_network_io.h $(INCDIR)/apr_file_io.h \ - $(INCDIR)/apr_time.h $(INCDIR)/apr_portable.h \ - $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_lock.h \ +common.o: common.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \ + $(INCDIR)/apr_mmap.h $(INCDIR)/apr_general.h \ + $(INCDIR)/apr_errno.h $(INCDIR)/apr_network_io.h \ + $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \ + $(INCDIR)/apr_portable.h $(INCDIR)/apr_thread_proc.h \ + $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h +mmap.o: mmap.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \ + $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \ + $(INCDIR)/apr_mmap.h $(INCDIR)/apr_network_io.h \ + $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \ + $(INCDIR)/apr_portable.h $(INCDIR)/apr_thread_proc.h \ + $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h \ ../../file_io/unix/fileio.h $(INCDIR)/apr_lib.h \ - $(INCDIR)/apr_tables.h -mmap.o: mmap.c mmap_h.h $(INCDIR)/apr_private.h \ - $(INCDIR)/apr_general.h $(INCDIR)/apr.h \ - $(INCDIR)/apr_errno.h $(INCDIR)/apr_mmap.h \ - $(INCDIR)/apr_network_io.h $(INCDIR)/apr_file_io.h \ - $(INCDIR)/apr_time.h $(INCDIR)/apr_portable.h \ - $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_lock.h \ - ../../file_io/unix/fileio.h $(INCDIR)/apr_lib.h \ - $(INCDIR)/apr_tables.h + $(INCDIR)/apr_pools.h $(INCDIR)/apr_tables.h diff --git a/mmap/unix/common.c b/mmap/unix/common.c index 1d2db7a8c..25597c56a 100644 --- a/mmap/unix/common.c +++ b/mmap/unix/common.c @@ -61,7 +61,10 @@ * */ -#include "mmap_h.h" +#include "apr.h" +#include "apr_private.h" +#include "apr_mmap.h" +#include "apr_errno.h" #if APR_HAS_MMAP || defined(BEOS) diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c index 67116e2a3..d708b977e 100644 --- a/mmap/unix/mmap.c +++ b/mmap/unix/mmap.c @@ -52,9 +52,31 @@ * <http://www.apache.org/>. */ -#include "mmap_h.h" +#include "apr.h" +#include "apr_private.h" +#include "apr_general.h" +#include "apr_mmap.h" +#include "apr_errno.h" +#include "../../file_io/unix/fileio.h" #include "apr_portable.h" +/* System headers required for the mmap library */ +#ifdef BEOS +#include <kernel/OS.h> +#endif +#if HAVE_STRING_H +#include <string.h> +#endif +#if APR_HAVE_STDIO_H +#include <stdio.h> +#endif +#if HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#if HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + #if APR_HAS_MMAP || defined(BEOS) static ap_status_t mmap_cleanup(void *themmap) diff --git a/mmap/unix/mmap_h.h b/mmap/unix/mmap_h.h deleted file mode 100644 index 394ff1bfb..000000000 --- a/mmap/unix/mmap_h.h +++ /dev/null @@ -1,94 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - */ - -#ifndef MMAP_H_H -#define MMAP_H_H - -#include "apr.h" -#include "apr_private.h" -#include "apr_general.h" -#include "apr_mmap.h" -#include "apr_errno.h" -#include "../../file_io/unix/fileio.h" -#include "mmap_h.h" - -/* System headers required for the mmap library */ -#ifdef BEOS -#include <kernel/OS.h> -#endif -#if HAVE_STRING_H -#include <string.h> -#endif -#if APR_HAVE_STDIO_H -#include <stdio.h> -#endif -#if HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -#if HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif -/* End System Headers */ - -struct ap_mmap_t { - ap_pool_t *cntxt; -#ifdef BEOS - area_id area; -#endif - void *mm; - size_t size; -}; - -#endif /* ! MMAP_H_H */ - |