summaryrefslogtreecommitdiff
path: root/native/jni/java-nio/java_nio_VMDirectByteBuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix Java_java_nio_VMDirectByteBuffer_allocate() for negative capacityPekka Enberg2011-03-171-0/+7
| | | | | | | | | | | JavaDocs clearly state that ByteBuffer.allocateDirect() must throw IllegalArgumentException if capacity is negative. 2011-03-17 Pekka Enberg <penberg@kernel.org> * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: (Java_java_nio_VMDirectByteBuffer_allocate): Check for negative capacity.
* 2006-08-06 C. Scott Marshall <csm@gnu.org>Casey Marshall2006-08-061-0/+2
| | | | | | | | | Fixes PR 28608. * java/nio/DirectByteBufferImpl.java (duplicate): only reset if the mark has been set. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (Java_java_nio_VMDirectByteBuffer_allocate): zero out the allocated data.
* 2006-01-25 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-251-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac * native/Makefile.am * native/jni/classpath/Makefile.am * native/jni/classpath/jcl.c * native/jni/classpath/jcl.h * native/jni/classpath/native_state.c * native/jni/gtk-peer/Makefile.am * native/jni/java-io/Makefile.am * native/jni/java-io/java_io_VMFile.c * native/jni/java-io/java_io_VMObjectStreamClass.c * native/jni/java-lang/Makefile.am * native/jni/java-net/Makefile.am * native/jni/java-net/java_net_VMInetAddress.c * native/jni/java-net/javanet.c * native/jni/java-net/javanet.h * native/jni/java-nio/Makefile.am * native/jni/java-nio/gnu_java_nio_VMPipe.c * native/jni/java-nio/gnu_java_nio_VMSelector.c * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c * native/jni/java-nio/java_nio_MappedByteBufferImpl.c * native/jni/java-nio/java_nio_VMDirectByteBuffer.c * native/jni/java-util/Makefile.am * native/jni/java-util/java_util_VMTimeZone.c * native/jni/midi-dssi/Makefile.am * native/jni/xmlj/Makefile.am * native/target/Makefile.am * native/target/Linux/target_native_math.h * native/target/Linux/target_native_memory.h * native/target/Linux/Makefile.am * native/target/Linux/target_native_io.h * native/target/Linux/target_native_math_float.h * native/target/Linux/target_native_math_int.h * native/target/generic/target_generic.c * native/target/generic/target_generic_io.c * native/target/generic/target_generic_math.h * native/target/generic/target_generic_memory.h * native/target/generic/target_generic_misc.c * native/target/generic/target_generic_network.c * native/target/generic/Makefile.am * native/target/generic/target_generic.h * native/target/generic/target_generic_file.h * native/target/generic/target_generic_io.h * native/target/generic/target_generic_math_float.h * native/target/generic/target_generic_math_int.h * native/target/generic/target_generic_misc.h * native/target/generic/target_generic_network.h: Reverted target native related changes back to the state of the 0.20 release. * native/target/MinGW/.cvsignore * native/target/MinGW/Makefile.am * native/target/MinGW/target_native.h * native/target/MinGW/target_native_file.h * native/target/MinGW/target_native_io.h * native/target/MinGW/target_native_math.h * native/target/MinGW/target_native_memory.h * native/target/MinGW/target_native_misc.h * native/target/MinGW/target_native_network.h * native/target/RTEMS/.cvsignore * native/target/RTEMS/Makefile.am * native/target/RTEMS/target_native.h * native/target/RTEMS/target_native_file.h * native/target/RTEMS/target_native_io.h * native/target/RTEMS/target_native_math.h * native/target/RTEMS/target_native_memory.h * native/target/RTEMS/target_native_misc.h * native/target/RTEMS/target_native_network.h * native/target/SunOS/.cvsignore * native/target/SunOS/Makefile.am * native/target/SunOS/target_native.h * native/target/SunOS/target_native_file.h * native/target/SunOS/target_native_io.h * native/target/SunOS/target_native_math.h * native/target/SunOS/target_native_memory.h * native/target/SunOS/target_native_misc.h * native/target/SunOS/target_native_network.h * native/target/embOS/.cvsignore * native/target/embOS/Makefile.am * native/target/embOS/target_native.h * native/target/embOS/target_native_file.h * native/target/embOS/target_native_io.c * native/target/embOS/target_native_io.h * native/target/embOS/target_native_math.h * native/target/embOS/target_native_memory.h * native/target/embOS/target_native_misc.h * native/target/embOS/target_native_network.h * native/target/posix/.cvsignore * native/target/posix/Makefile.am * native/target/posix/target_posix.c * native/target/posix/target_posix.h * native/target/posix/target_posix_file.c * native/target/posix/target_posix_file.h * native/target/posix/target_posix_io.c * native/target/posix/target_posix_io.h * native/target/posix/target_posix_math.c * native/target/posix/target_posix_math.h * native/target/posix/target_posix_memory.c * native/target/posix/target_posix_memory.h * native/target/posix/target_posix_misc.c * native/target/posix/target_posix_misc.h * native/target/posix/target_posix_network.c * native/target/posix/target_posix_network.h: Removed.
* 2006-01-18 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-181-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/java-nio/gnu_java_nio_VMPipe.c: Removed unnecessary include. * native/jni/java-nio/gnu_java_nio_VMSelector.c: Reorganized includes to only include sys/* headers when available. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: (get_pagesize): Return 0 when nothing else works. (Java_java_nio_MappedByteBufferImpl_unmapImpl): Replaced munmap() and strerror() with corresponding target macros. (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): Replaced strerror() with corresponding target macro. (Java_java_nio_MappedByteBufferImpl_forceImpl): Replaced strerror() with corresponding target macro. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: (Java_java_nio_VMDirectByteBuffer_allocate): Replaced malloc() with the corresponding target macro. (Java_java_nio_VMDirectByteBuffer_free): Replaced free() with the corresponding target macro. (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2IB): Add index to pointer when assigning the value. (Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_Pointer_2I_3BII): Replaced memcpy with corresponding target macro. Add index when doing the memcpy, not when fetching the pointer. (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2I_3BII): Replaced memcpy with corresponding target macro. (Java_java_nio_VMDirectByteBuffer_shiftDown): Replaced memmove with the corresponding target macro.
* 2006-01-10 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-101-5/+5
| | | | | | | * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (get): Release the array with the correct pointer. (put): Release the array with the correct pointer. Copy the array around _before_ releasing it.
* * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: IncludeMark Wielaard2005-08-051-6/+0
| | | | | | | | | | | | | | | | jcl.h. (createRawData): Removed unused variable method. (getData): Removed unused variable field. * native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c (createRawData): Removed unused variable method. (getData): Removed unused variable field. * native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c (createRawData): Removed unused variable method. (getData): Removed unused variable field. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (Java_java_nio_VMDirectByteBuffer_init): Removed. * vm/reference/java/nio/VMDirectByteBuffer.java (init): Removed. * include/java_nio_VMDirectByteBuffer.h: Regenerated.
* 2005-08-03 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2005-08-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * gnu/classpath/Pointer.java, gnu/classpath/Pointer32.java, gnu/classpath/Pointer64.java, gnu/classpath/RawData.java, gnu/classpath/RawData32.java, gnu/classpath/RawData64.java, gnu/java/awt/peer/gtk/GtkImage.java, gnu/java/nio/charset/iconv/IconvDecoder.java, gnu/java/nio/charset/iconv/IconvEncoder.java, java/nio/Buffer.java, java/nio/DirectByteBufferImpl.java, java/nio/MappedByteBufferImpl.java, native/jni/classpath/jcl.c, native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c, native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c, native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c, native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c, native/jni/java-nio/java_nio_MappedByteBufferImpl.c, native/jni/java-nio/java_nio_VMDirectByteBuffer.c, vm/reference/java/nio/VMDirectByteBuffer.java: Renamed references to gnu/classpath/RawData to gnu/classpath/Pointer.
* 2005-08-02 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2005-08-031-103/+9
| | | | | | | | | | | | | | | | | * classpath/jcl.c (JCl_NewRawDataObject): Added error handling. * classpath/jcl.h (jpointer): New integer type to represent a pointer. * gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c, java-nio/gnu_java_nio_channels_FileChannelImpl.c, java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c, java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c, java-nio/java_nio_MappedByteBufferImpl.c, java-nio/java_nio_VMDirectByteBuffer.c, xmlj/xmlj_util.c: Use JCL functions instead of directly accessing gnu/classpath/RawData.
* 2005-07-30 Casey Marshall <csm@gnu.org>Casey Marshall2005-07-301-1/+1
| | | | | | | | | | | | | | * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl): eliminate various compiler warnings; mark 'buffer' as 'volatile;' throw an exception if we can't get a constructor method ID. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: include 'stdlib.h.' (get_raw_values): eliminate compiler warnings. (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): likewise. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII): eliminate compiler warning.
* 2003-07-23 Casey Marshall <csm@gnu.org>Casey Marshall2005-07-241-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): add 'sys/mman.h'. (AC_CHECK_FUNCS): add mmap and related functions. * include/java_nio_VMDirectByteBuffer.h: regenerated. * java/nio/DirectByteBufferImpl.java (put): new method. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c (ALIGN_DOWN): new macro. (ALIGN_UP): new macro. (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl): implemented. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: updated copyright years. (ALIGN_DOWN): new macro. (ALIGN_UP): new macro. (get_pagesize): new function. (get_raw_values): new function. (Java_java_nio_MappedByteBufferImpl_unmapImpl): implemented. (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): implemented. (Java_java_nio_MappedByteBufferImpl_loadImpl): implemented. (Java_java_nio_MappedByteBufferImpl_forceImpl): implemented. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (Java_java_nio_VMDirectByteBuffer_put): renamed to 'Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2IB.' (Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I_3BII): call 'ReleaseByteArrayElements' on the source byte array elements. (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII): new method. * vm/reference/java/nio/VMDirectByteBuffer.java (put): new method.
* * all files: Update for new FSF address.Mark Wielaard2005-07-021-2/+2
|
* 2005-04-09 Mark Wielaard <mark@klomp.org>Michael Koch2005-04-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | * native/jni/java-lang/java_lang_Double.c: Reindent. * native/jni/java-lang/java_lang_Math.c: Likewise. * native/jni/java-lang/java_lang_Object.c: Likewise. * native/jni/java-lang/java_lang_VMDouble.c: Likewise. * native/jni/java-lang/java_lang_VMFloat.c: Likewise. * native/jni/java-lang/java_lang_VMSystem.c: Likewise. * native/jni/java-lang/java_lang_reflect_Array.c: Likewise. * native/jni/java-nio/java_nio.c (Java_gnu_java_nio_FileChannelImpl_nio_1mmap_1file): Removed. (Java_gnu_java_nio_FileChannelImpl_nio_1unmmap_1file): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketCreate): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketConnect): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketBind): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketListen): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketAvailable): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketClose): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketRead): Likewise. (Java_gnu_java_nio_SocketChannelImpl_SocketWrite): Likewise. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: Reindent.
* 2005-04-08 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2005-04-081-38/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/classpath/jcl.h, native/jni/java-io/java_io_ObjectInputStream.c, native/jni/java-io/java_io_VMFile.c, native/jni/java-io/java_io_VMObjectStreamClass.c, native/jni/java-io/javaio.c, native/jni/java-lang/java_lang_Double.c, native/jni/java-lang/java_lang_Math.c, native/jni/java-lang/java_lang_Object.c, native/jni/java-lang/java_lang_VMDouble.c, native/jni/java-lang/java_lang_VMFloat.c, native/jni/java-lang/java_lang_VMProcess.c, native/jni/java-lang/java_lang_VMSystem.c, native/jni/java-lang/java_lang_reflect_Array.c, native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c, native/jni/java-net/gnu_java_net_PlainSocketImpl.c, native/jni/java-net/java_net_InetAddress.c, native/jni/java-net/java_net_NetworkInterface.c, native/jni/java-net/javanet.c, native/jni/java-nio/gnu_java_nio_VMPipe.c, native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c, native/jni/java-nio/java_nio.c, native/jni/java-nio/java_nio_MappedByteBufferImpl.c, native/jni/java-nio/java_nio_VMDirectByteBuffer.c, native/jni/java-util/java_util_VMTimeZone.c: Reindented using GNU indent (GNU style).
* * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: useArchie Cobbs2005-03-161-0/+8
| | | | global native reference to wrap persistent jclass variable.
* 2005-02-08 Michael Koch <konqueror@gmx.de>Michael Koch2005-02-081-5/+20
| | | | | | | | * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (NIOGetPointer): Handle case of pointer size != 32 bit. (NIOGetRawData): Likewise. (Java_java_nio_VMDirectByteBuffer_init): Likewise. Fixed asking for primitive type 'long'.
* 2004-11-21 Michael Koch <konqueror@gmx.de>Michael Koch2004-11-211-0/+192
* gnu/classpath/RawData.java: Made abstract. * gnu/classpath/RawData32.java, gnu/classpath/RawData64.java: New files. * include/Makefile.am: Don't generate java_nio_DirectByteBufferImpl.h anymore and generate java_nio_VMDirectByteBuffer.h now. * java/nio/DirectByteBufferImpl.java: Moved native methods to VMDirectByteBuffer. * java/nio/MappedByteBufferImpl.java: Use methods from VMDirectBteBuffer. * native/jni/java-nio/Makefile.am: Removed java_nio_DirectByteBufferImpl.c and added java_nio_VMDirectByteBuffer.c * include/java_nio_DirectByteBufferImpl.h, native/jni/java-nio/java_nio_DirectByteBufferImpl.c: Removed. * include/java_nio_VMDirectByteBuffer.h, * native/jni/java-nio/java_nio_VMDirectByteBuffer.c, * vm/reference/java/nio/VMDirectByteBuffer.java: New files.