summaryrefslogtreecommitdiff
path: root/native/jni/java-io/java_io_VMFile.c
Commit message (Collapse)AuthorAgeFilesLines
* 2008-04-09 Mario Torre <neugens@aicas.com>Mario Torre2008-04-091-51/+55
| | | | | | | | | | | * java/io/File.java (canWrite): use canWriteDirectory(String). * vm/reference/java/io/VMFile.java (canWriteDirectory): new native method. * native/jni/java-io/java_io_VMFile.c: correct indentation, sync function names with header file definition. (Java_java_io_VMFile_canRead): use cpio_checkAccess to get access permission. Removed unused variable. (Java_java_io_VMFile_canWrite): likewise. (Java_java_io_VMFile_canWriteDirectory): new function.
* 2007-11-06 Mario Torre <neugens@limasoftware.net>Mario Torre2007-11-061-0/+88
| | | | | | | | | | | | | | | | | | | * vm/reference/java/io/VMFile.java: (getTotalSpace): new method. (getUsableSpace): likewise. (getFreeSpace): likewise. * java/io/File.java: (getTotalSpace): new method. (getUsableSpace): likewise. (getFreeSpace): likewise. * native/jni/java-io/java_io_VMFile.c: (Java_java_io_VMFile_getTotalSpace): new function. (Java_java_io_VMFile_getFreeSpace): likewise. (Java_java_io_VMFile_getUsableSpace): likewise. * native/jni/native-lib/cpio.h: (cpio_df): new function. (CPFILE_DF_TYPE): enum type for cpio_df. * native/jni/native-lib/cpio.c: (cpio_df): new function. * include/java_io_VMFile.h: regenerated. * configure.ac: added check for statvfs.
* 2007-02-09 Mario Torre <neugens@limasoftware.net>Mario Torre2007-02-091-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm/reference/java/io/VMFile.java: (canExecute): new 1.6 native method. (setReadable): likewise. (setWritable): likewise. (setExecutable): likewise. * java/io/File.java: added import for gnu.classpath.NotImplementedException. (setReadOnly): new 1.6 method. (canExecute): likewise. (setReadable): likewise. (setWritable): likewise. (setExecutable): likewise. (getUsableSpace): added stub for new 1.6 method. (getFreeSpace): likewise. (getTotalSpace): likewise. (checkExec): new private method to support new 1.6 additions. * native/jni/java-io/java_io_VMFile.c: set_file_permissions: new helper function. Java_java_io_VMFile_setReadable: new native method to bakcup 1.6 methods in VMFile.java. Java_java_io_VMFile_setWritable: likewise. Java_java_io_VMFile_setExecutable: likewise. Java_java_io_VMFile_canExecute: likewise. * native/jni/native-lib/cpio.h: added new flags: CPFILE_FLAG_EXEC, CPFILE_FLAG_USR and CPFILE_FLAG_OFF. cpio_chmod: new function declaration. cpio_checkAccess: likewise. * native/jni/native-lib/cpio.c: cpio_chmod: new function definition. cpio_checkAccess: likewise.
* 2006-09-22 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-231-1/+1
| | | | | | | | * native/jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_list): remove `const' from `filename.' * native/jni/native-lib/cpio.c (cpio_readDir): remove `const' from `filename.' * native/jni/native-lib/cpio.h (cpio_readDir): likewise.
* 2006-09-22 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-231-3/+8
| | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): check for `readdir_r.' * native/jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_list): allocate `filename,' and handle changes to `cpio_readDir.' * native/jni/native-lib/cpio.c (cpio_readDir): use `readdir_r' if available; copy the filename into the destination buffer; return an error code if readdir returns NULL, but errno is 0. * native/jni/native-lib/cpio.h (cpio_readDir): change second parameter to `const char *.'
* Merge NATIVE_LAYER branch.Mark Wielaard2006-08-211-104/+102
|
* 2006-06-07 Gary Benson <gbenson@redhat.com>Gary Benson2006-06-071-1/+235
| | | | | | | | | | | | PR 24895 * native/jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_toCanonicalForm): New method. * configure.ac: Added checks for lstat and readlink. * include/java_io_VMFile.h: Added new method. * vm/reference/java/io/VMFile.java: Use new method. * gnu/java/io/PlatformHelper.java (toCanonicalForm): Removed. * NEWS: Documented the above. * java/io/File.java: Javadoc fix.
* 2006-01-25 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-251-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-17 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-171-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/classpath/jcl.c: Added missing imports. (JCL_realloc): Fixed signature to include oldsize. This is needed for some targets. Make this function use the MEMORY_REALLOC macro for portability. * native/jni/classpath/jcl.h (JCL_realloc): Adjusted signature. * native/jni/java-io/java_io_VMFile.c: (Java_java_io_VMFile_create): Use target layer macro for handling errno, for portability. (Java_java_io_VMFile_length): Release filename string in error cases before returning. (Java_java_io_VMFile_list): Initialize filename variable. Use new version of JCL_realloc. * native/jni/java-net/java_net_VMInetAddress.c: (Java_java_net_VMInetAddress_getHostByName): Use renamed macro TARGET_NATIVE_NETWORK_GET_HOSTADDRESS_BY_NAME. * native/jni/java-net/javanet.c: (_javanet_bind): Make errorstr variable const to avoid compiler warning. (_javanet_set_option): Fixed typo. (_javanet_get_option): Fixed typo. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: (Java_gnu_java_nio_channels_FileChannelImpl_open): Made error_string variable const to avoid compiler warning. * native/target/generic/target_generic_file.h: Replaced // comments with /* */ comments to avoid compiler warnings. Added some spaces to make code better readable. * native/target/generic/target_generic_memory.h: Replaced // comments with /* */ comments to avoid compiler warnings. * native/target/generic/target_generic_misc.c: Removed unused TARGET_NATIVE_MISC_FORMAT_STRING macro. This caused compiler warnings due to use of varargs. * native/target/generic/target_generic_misc.h: Removed unused TARGET_NATIVE_MISC_FORMAT_STRING macro. This caused compiler warnings due to use of varargs. * native/target/generic/target_generic_network.h: Replaced // comments with /* */ comments to avoid compiler warnings. (targetGenericNetwork_receive): Fixed signature to use signed chars for buffer parameter to avoid warning when passing a jbyte to the function.
* 2006-01-16 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_list): Use new 4 argument version of TARGET_NATIVE_FILE_READ_DIR macro. * target/Linux/target_native_io.h: Fixed comment at #endif. * target/Linux/target_native_memory.h: New file. Contains portability macros for memory operations. * target/generic/target_generic.c: New file. Contains some functions for portability. * target/generic/target_generic.h: Use posix target and shorter macro names if CP_NEW is set. * target/generic/target_generic_file.h: Use posix target and shorter macro names if CP_NEW is set. (TARGET_NATIVE_FILE_READ_DIR): New parameter for maxNameLength. * target/generic/target_generic_io.c: New file. Contains some functions for IO portability. * target/generic/target_generic_io.h: Use posix target and shorter macro names if CP_NEW is set. * target/generic/target_generic_misc.c: New file. Contains some functions for miscallaneaous portability issues. * target/generic/target_generic_misc.h: Use posix target and shorter macro names if CP_NEW is set. * target/generic/target_generic_network.c: New file. Contains some functions for networking portability. * target/generic/target_generic_network.h: Use posix target and shorter macro names if CP_NEW is set. * target/posix/Makefile.am, * target/posix/target_posix.c, * target/posix/target_posix.h, * target/posix/target_posix_file.c, * target/posix/target_posix_file.h, * target/posix/target_posix_io.c, * target/posix/target_posix_io.h, * target/posix/target_posix_math.c, * target/posix/target_posix_math.h, * target/posix/target_posix_memory.c, * target/posix/target_posix_memory.h, * target/posix/target_posix_misc.c, * target/posix/target_posix_misc.h, * target/posix/target_posix_network.c, * target/posix/target_posix_network.h: New files. This implements the target native layer macros for Posix-like systems.
* 2006-01-16 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | * native/target/generic/target_generic_math_float.h: Removed. This file has been replaced by target_generic_math.h. * native/target/generic/target_generic_math_int.h: Removed. This file has been replaced by target_generic_math.h. * native/target/generic/target_generic_math.h: New file. Replaces the old _int and _float versions. * native/target/Linux/target_native_math_float.h: Removed. This file has been replaced by target_native_math.h. * native/target/Linux/target_native_math_int.h: Removed. This file has been replaced by target_native_math.h. * native/target/Linux/target_native_math.h: New file. Replaces the old _int and _float versions. * native/target/Linux/Makefile.am: Adjusted for the changed filenames. * native/jni/java-io/java_io_VMFile.c: Include target_native_math.h instead of target_native_math_int.h. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: Likewise. * native/target/generic/target_generic_file.h: Likewise.
* 2005-11-25 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2005-11-261-2/+0
| | | | | | | | | | | * native/jni/java-io/javaio.c, native/jni/java-io/javaio.h: Removed. * native/jni/java-io/java_io_VMFile.c: Removed dependency on javaio.h * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: Likewise.
* * all files: Update for new FSF address.Mark Wielaard2005-07-021-2/+2
|
* 2005-04-08 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2005-04-081-266/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-io/java_io_VMFile.cMark Wielaard2005-01-091-0/+2
| | | | | | | | | | | | (Java_java_io_VMFile_create): Call JCL_free_cstring() when done with string. * native/jni/java-io/javaio.c (_javaio_open_read): Likewise. (_javaio_open_readwrite): Likewise. * native/jni/java-lang/java_lang_VMSystem.c (Java_java_lang_VMSystem_getenv): Likewise. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c (Java_gnu_java_nio_channels_FileChannelImpl_open): Likewise.
* * configure.ac (CLASSPATH_MODULE): Add -no-undefined.Mark Wielaard2004-10-261-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Werror): New configure flag. (gtk-peer): Remove comma from help string. (AM_CFLAGS): Replace by... (WARNING_CFLAGS, STRICT_WARNING_CFLAGS, ERROR_CFLAGS): New gcc flags. (AM_CPPFLAGS): Replace by... (CLASSPATH_INCLUDES): New -I gcc flags. * native/fdlibm/Makefile.am: Use new AM_LDFLAGS, AM_CPPFLAGS and AM_CFLAGS when not library specific flags are used. * native/jni/gtk-peer/Makefile.am: Likewise. * native/jni/java-io/Makefile.am: Likewise. * native/jni/java-lang/Makefile.am: Likewise. * native/jni/java-net/Makefile.am: Likewise. * native/jni/java-nio/Makefile.am: Likewise. * native/jni/java-util/Makefile.am: Likewise. * native/jni/java-io/java_io_ObjectInputStream.c: Mark function arguments unused where necessary. * native/jni/java-io/java_io_VMFile.c: Likewise. * native/jni/java-io/java_io_VMObjectStreamClass.c: Likewise. (getFieldReference): Make sure we allocate the_type ourselves if we free it later. Removed unused argument object. * native/jni/java-io/javaio.c (javaio_read): Removed unused argument obj. (javaio_write): Likewise. * native/jni/java-io/javaio.h: Mark function arguments unused where necessary. * native/jni/java-lang/java_lang_Double.c: Likewise. (Java_java_lang_Double_parseDouble): Declare buf as const char*. * native/jni/java-lang/java_lang_Math.c: Mark function arguments unused where necessary. * 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-net/gnu_java_net_PlainDatagramSocketImpl.c (Java_gnu_java_net_PlainDatagramSocketImpl_receive0): Mark only maxlen and offset as unsigned. * native/jni/java-net/java_net_InetAddress.c: Mark function arguments unused where necessary. (Java_java_net_InetAddress_getHostByName): New local int variable max_addresses. * native/jni/java-net/java_net_NetworkInterface.c: Mark function arguments unused where necessary. * native/jni/java-net/javanet.c (_javanet_set_int_field): Removed unused argument class. (_javanet_accept): Check result variable after it has been assigned. * native/jni/java-nio/gnu_java_nio_NIOServerSocket.c: Mark function arguments unused where necessary. * native/jni/java-nio/gnu_java_nio_VMPipe.c: Likewise. * native/jni/java-nio/gnu_java_nio_VMSelector.c: Likewise. * native/jni/java-nio/gnu_java_nio_VMSelector.c: Likewise. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: Likewise. * native/jni/java-nio/java_nio_DirectByteBufferImpl.c: Likewise. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: Likewise. * native/jni/java-nio/java_nio_channels_Channels.c: Likewise. * native/jni/java-util/java_util_VMTimeZone.c (jint_to_charbuf): Mark as static function. (Java_java_util_VMTimeZone_getSystemTimeZoneId): Mark clazz argument as unused. Cast _timezone to long before use. * native/target/generic/target_generic_network.h: Remove asserts.
* 2004-04-26 Michael Koch <konqueror@gmx.de>Michael Koch2004-04-261-0/+702
* java/io/File.java: Moved all native methods to the new class VMFile and removed the "Internal" suffix. * vm/reference/java/io/VMFile.java: New file. * vm/reference/java/io/Makefile.am (EXTRA_DIST): Added VMFile.java. * include/java_io_File.h: Removed. * include/java_io_VMFile.h: New file. * include/Makefile.am: Generate java_io_VMFile.h. * native/jni/java-io/java_io_File.c: Moved all methods to java_io_VMFile.c and renamed them accordingly. * native/jni/java-io/java_io_VMFile.c: New file. * native/jni/java-io/Makefile.am: Removed java_io_File.c and added java_io_VMFile.c to build.