apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr/mmap/win32 mmap.c
Date Thu, 07 Dec 2000 08:08:56 GMT
On Thu, Dec 07, 2000 at 06:59:00AM -0000, wrowe@locus.apache.org wrote:
> wrowe       00/12/06 22:58:59
> 
>   Modified:    .        CHANGES aprlib.dsp
>                include  apr.hw apr_mmap.h
>   Added:       mmap/win32 mmap.c
>   Log:
>     Implement Win32 MMAP support.
>...
>   --- apr_mmap.h	2000/12/07 05:00:27	1.18
>   +++ apr_mmap.h	2000/12/07 06:58:59	1.19
>   @@ -90,6 +90,16 @@
>        /** An area ID.  Only valid on BeOS */
>        area_id area;
>    #endif
>   +#ifdef WIN32
>   +    /** The handle of the file mapping */
>   +    HANDLE mhandle;
>   +    /** The start of the real memory page area (mapped view) */
>   +    void *mv;
>   +    /** The physical start, size and offset */
>   +    size_t pstart;
>   +    size_t psize;
>   +    size_t poffset;
>   +#endif

Non-win32-specific question: why is the MMAP structure visible? Shouldn't
that be an opaque structure?

>...
>   #include "apr.h"
>   #include "apr_private.h"
>   #include "apr_general.h"
>   #include "apr_mmap.h"
>   #include "apr_errno.h"
>   #include "fileio.h"
>   #include "apr_portable.h"
>   
>   #if APR_HAS_MMAP

Why put this in here? apr_private.hw defines it to 1. The above statement
seems to imply that sometimes it will be non-zero. And that just isn't the
case...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message