This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for java.nio FileChannel and MappedByteBuffer
- From: Tom Tromey <tromey at redhat dot com>
- To: andreas tobler <toa at pop dot agri dot ch>
- Cc: Per Bothner <per at bothner dot com>, java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 09 Mar 2004 09:01:03 -0700
- Subject: Re: PATCH for java.nio FileChannel and MappedByteBuffer
- References: <4035662B.9070301@bothner.com> <404B440C.6050205@pop.agri.ch>
- Reply-to: tromey at redhat dot com
>>>>> "Andreas" == andreas tobler <toa@pop.agri.ch> writes:
>> +#if defined(__JV_POSIX_H__) && defined(HAVE_MMAP)
I don't like the header guard #define being used as a test macro.
Andreas> extern int munmap(void *, size_t);
Andreas> extern int msync(void *, size_t, int);
Andreas> extern int munmap(caddr_t, size_t);
Andreas> extern int msync(caddr_t, size_t, int);
Usually our fix in situations like this is to introduce a new
template function to work around the platform differences. See,
e.g., getpwuid_adaptor in java/lang/natRuntime.cc.
Tom