This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH for java.nio FileChannel and MappedByteBuffer


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]