classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: FileChannelImpl.c fixes


From: Mark Wielaard
Subject: Re: [cp-patches] FYI: FileChannelImpl.c fixes
Date: Mon, 23 Jan 2006 15:13:05 +0100

Hi Roman,

On Tue, 2006-01-17 at 16:36 +0000, Roman Kennke wrote:
> Here come some fixes for FileChannelImpl.c. Mainly this provides
> alternative implementations of the methods for systems that don't have
> a filesystems and replace some ssize_t variables with jint for a little
> more correctness. Also this reimplements lock and unlock to use the
> corresponding target native macros.
> 
> 2006-01-17  Roman Kennke  <address@hidden>
> 
>       * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c:
>       (Java_gnu_java_nio_channels_FileChannelImpl_init): Improved
>       exception messages a little.
>       (Java_gnu_java_nio_channels_FileChannelImpl_open): Provided
>       alternative implementation for systems without filesystems.
>       Replaced snprintf with the corresponding target native macro.
>       (Java_gnu_java_nio_channels_FileChannelImpl_implCloseChannel):
>       Only do something when we have a filesystem.
>       (Java_gnu_java_nio_channels_FileChannelImpl_available): Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_size): Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_implPosition): Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_seek):
>       Only do something when we have a filesystem.
>       (Java_gnu_java_nio_channels_FileChannelImpl_implTruncate):
>       Only do something when we have a filesystem.
>       (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl): Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_read__):
>       Replaced ssize_t variables with jint. Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII):
>       Replaced ssize_t variables with jint. Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_write__I):
>       Replaced ssize_t variables with jint. Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_force):
>       Only do something when we have a filesystem.
>       (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII):
>       Replaced ssize_t variables with jint. Provided
>       alternative implementation for systems without filesystems.
>       (Java_gnu_java_nio_channels_FileChannelImpl_lock): Reimplemented
>       to use the corresponding target native macro.
>       (Java_gnu_java_nio_channels_FileChannelImpl_unlock): Reimplemented
>       to use the corresponding target native macro.

This broke File locking. In particular the mauve test
gnu.testlet.java.nio.channels.FileChannel.lock and the eclipse osgi
locking. How did you test this patch and on what platforms?

I have a hard time seeing how this patch is supposed to work. You
replace the calls with new target layer functionality, but that
functionality seems to depend on having things like
TARGET_NATIVE_FILE_LOCKMODE_READ, which depend on things like
HAVE_F_RDLCK being defined, but I cannot find where you exactly do this.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]