PATCH for java.nio FileChannel and MappedByteBuffer

Per Bothner per@bothner.com
Fri Mar 19 08:14:00 GMT 2004


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.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Gcc-patches mailing list