This is the mail archive of the
mailing list for the Java project.
Re: PATCH for java.nio FileChannel and MappedByteBuffer
- From: Per Bothner <per at bothner dot com>
- To: andreas tobler <toa at pop dot agri dot ch>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 08 Mar 2004 12:33:26 -0800
- Subject: Re: PATCH for java.nio FileChannel and MappedByteBuffer
- References: <4035662B.email@example.com> <404B440C.firstname.lastname@example.org>
andreas tobler wrote:
(Note that the version I checked in does have this code in
gnu/java/nio/natFileChannelPosix.cc, and uses teh symlink model.)
Here means on solaris 2.6. Both are defined under solaris 2.6 even with
two versions, but, only the one for POSIX_C_SOURCE > 2 works.
Here the two functions are defined as:
extern int munmap(void *, size_t);
extern int msync(void *, size_t, int);
For the else case where POSIX_C_SOURCE is < 2:
extern int munmap(caddr_t, size_t);
extern int msync(caddr_t, size_t, int);
Where caddr_t is defined as char*.
The first question is: does it matter? I believe for C it wouldn't,
but C++ has I believe more restrictive rules for (void*).
What shall we do, define POSIX_C_SOURCE being bigger than 2 in this file?
or do an ifdef for this case?
My inclination is the former.