summaryrefslogtreecommitdiffstats
path: root/libjava/java/io/natFileDescriptorPosix.cc
Commit message (Collapse)AuthorAgeFilesLines
* * java/io/FileDescriptor.java: Implement on top of FileChannel.bothner2004-02-291-467/+0
| | | | | | | | | | | | | | | | | | | | Remove native methods. * java/io/natFileDescriptorEcos.cc: Remove file. * java/io/natFileDescriptorPosix.cc: Remove file. * java/io/natFileDescriptorWin32.cc: Remove file. * java/io/FileInputStream.java (ch): Change type to FileChannelImpl. (<init>(File)): Allocate a FileChannelImpl, not a FileDescriptor. (<init>(FileChannelImpl)): New package-private constructor. (<init>(FileDescriptor)): Extract FileChannelImpl from arg. (available, close, read, skip): Implement using FileChannelImpl. (getFD): Allocate FileDescriptor if needed. (getChannel): Is now trivial. * java/io/FileOutputStream.java: Corresponding changes. * java/io/RandomAccessFile.java: Corresponding changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78661 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-23 Michael Koch <konqueror@gmx.de>mkoch2004-01-231-0/+45
| | | | | | | | | | | | | | | | | | | | | | * java/io/FileDescriptor.java (lock): New method. (tryLock): New method. (unlock): New method. * java/io/natFileDescriptorEcos.cc (lock): New method. (tryLock): New method. (unlock): New method. * java/io/natFileDescriptorPosix.cc (lock): New method. (tryLock): New method. (unlock): New method. * java/io/natFileDescriptorWin32.cc (lock): New method. (tryLock): New method. (unlock): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76421 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (write): Try again on EINTR.tromey2003-07-261-23/+37
| | | | | | | | | (write): Likewise. (read): Likewise. (read): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69807 138bc75d-0d04-0410-961f-82ee72b054a4
* * libjava/include/posix.h (O_SYNC): Define if not availableljrittle2003-06-051-2/+0
| | | | | | | | | and a reasonable, perhaps more conservative, replacement exists. (O_DSYNC): Likewise. * java/io/natFileDescriptorPosix.cc (open): Revert last patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67517 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-05-16 Michael Koch <konqueror@gmx.de>mkoch2003-05-161-0/+2
| | | | | | | | | * java/io/natFileDescriptorPosix.cc (open): Commented out the O_SYNC and O_DSYNC usage until its better tested. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66859 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-05-13 Michael Koch <konqueror@gmx.de>mkoch2003-05-131-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/FileDescriptor.java (SYNC): New constant. (DSYNC): Likewise. (getLength): Renamed from lenght() to match classpath's FileDescriptor.java. * java/io/RandomAccessFile.java (RandomAccessFile): Removed unneeded mode check, implemented mode "rws" and "rwd", merged documentation from classpath. (setLength): Reformatted. (length): Use new getLength() of FileDescriptor. * java/io/natFileDescriptorEcos.cc (getLength): Renamed from length(). * java/io/natFileDescriptorPosix.cc (open): Implemented support for SYNC and DSYNC. (seek): Use getLength() instead of length(). (getLength): Renamed from length(). * java/io/natFileDescriptorWin32.cc (getLength): Renamed from length(). (seek): Use getLength() instead of length(). (available): Likewise. * gnu/java/nio/natFileChannelImpl.cc (size): Use getLength() instead of length(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66755 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/9934:tromey2003-03-091-2/+2
| | | | | | | | * java/io/natFileDescriptorPosix.cc (available): Fixed arguments to lseek. Return 0 if we can't compute the value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64053 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/FileDescriptor.java (position): New private field.mark2003-01-041-20/+30
| | | | | | | | | | | * java/io/natFileDescriptorPosix.cc (write): Up position. (setLength): Use and set position. (seek): Set position. (getFilePointer): Return position. (read): Up position. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60869 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorWin32.cc (read): Handle case wheretromey2002-11-101-0/+5
| | | | | | | | | count is 0. * java/io/natFileDescriptorPosix.cc (read): Handle case where count is 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58997 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (setLength): Handle case wheretromey2002-08-291-0/+4
| | | | | | | | | | ftruncate is missing. * configure, include/config.h.in: Rebuilt. * acconfig.h (HAVE_FTRUNCATE): Mention. * configure.in: Check for ftruncate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56658 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc: Don't include sys/socket.h ortromey2002-07-261-2/+0
| | | | | | | fcntl.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55780 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-24 Tom Tromey <tromey@redhat.com>tromey2002-07-241-0/+34
| | | | | | | | | | | | | Tony Kimball <alk@pobox.com> * java/io/natFileDescriptorWin32.cc (setLength): New method. * java/io/natFileDescriptorPosix.cc (setLength): New method. * java/io/RandomAccessFile.java (setLength): New method. * java/io/natFileDescriptorEcos.cc (setLength): New method. * java/io/FileDescriptor.java (setLength): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55715 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/Win32Process.java: Added comment.tromey2002-03-101-1/+3
| | | | | | | | | | | | | | | | * include/posix.h (_Jv_platform_close_on_exec): New function. Include fcntl.h. * include/win32.h (_Jv_platform_close_on_exec): New function. * java/net/natPlainSocketImpl.cc (create): Set close-on-exec flag. (accept): Likewise. * java/net/natPlainDatagramSocketImpl.cc (create): Set close-on-exec flag. * java/io/natFileDescriptorPosix.cc (open): Set close-on-exec flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50536 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorEcos.cc (init): Don't usetromey2002-03-061-6/+6
| | | | | | | | | | GetStdHandle. * java/io/natFileDescriptorPosix.cc (valid): Don't call stat if FD is negative. (init): Don't use GetStdHandle. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50383 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-03-06 Adam Megacz <adam@xwt.org>megacz2002-03-061-0/+8
| | | | | | | | | | * java/io/FileDescriptor.java: Initialize in/out/err in init(). * java/io/natFileDescriptorWin32.cc (init()): Added function. * java/io/natFileDescriptorPosix.cc (init()): Added function. * java/io/natFileDescriptorEcos.cc (init()): Added function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50378 138bc75d-0d04-0410-961f-82ee72b054a4
* * posix-threads.cc (_Jv_ThreadInterrupt): Re-enable interrupt ofbryce2001-09-211-33/+40
| | | | | | | | | | | | blocking IO via pthread_kill(). * java/io/natFileDescriptorPosix.cc (write (jint)): Check for thread interrupted status flag only if ::write returned an error. (write (jbyteArray, jint, jint): Likewise. (read (jint)): Likewise. (read (jbyteArray, jint, jint): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45719 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/RandomAccessFile.java (seek): Let seek go past end oftromey2001-08-021-3/+7
| | | | | | | | | | | | | | | | | file. (skipBytes): Don't fail if seeking past end of file. * java/io/FileInputStream.java (skip): Don't fail if seeking past end of file. * java/io/natFileDescriptorWin32.cc (seek): Handle `eof_trunc' argument. * java/io/natFileDescriptorEcos.cc (seek): Handle `eof_trunc' argument. * java/io/natFileDescriptorPosix.cc (seek): Handle `eof_trunc' argument. * java/io/FileDescriptor.java (seek): Added `eof_trunc' argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44586 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (open): Change error messagetromey2001-06-261-1/+3
| | | | | | | formatting. From David Brownell. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43564 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (open): Allocate buffer totromey2001-05-311-21/+31
| | | | | | | | correct size. (write): Loop until write completes. From Corey Minyard. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42749 138bc75d-0d04-0410-961f-82ee72b054a4
* * exception.cc (java_eh_info): Make value type jthrowable.rth2001-03-261-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40838 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (open): Add O_CREAT intromey2001-03-211-2/+2
| | | | | | | read/write case. Fixes PR libgcj/2338. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40692 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2000-08-021-8/+3
| | | | | | | | | | | | | | | | | * Makefile.am (libgcj_la_SOURCES): Added posix.cc. * java/net/natPlainSocketImpl.cc: Include posix.h. (accept): Use _Jv_select. * java/net/natPlainDatagramSocketImpl.cc: Include posix.h. (receive): Use _Jv_select. * java/io/natFileDescriptorPosix.cc: Include posix.h. (available): Use _Jv_select. * java/lang/natSystem.cc: Include posix.h. (currentTimeMillis): Use _Jv_gettimeofday. * include/posix.h: New file. * posix.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35435 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-06-27 Andrew Haley <aph@cygnus.com>aph2000-06-281-0/+8
| | | | | | | | | | * java/io/File.java (createTempFile): Close the FileDescriptor used to create a temp file. Fixes some of PR 203. * java/io/natFileDescriptorPosix.cc (open): Call garbage collection if we run out of file handles. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34755 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-04-16 Bryce McKinlay <bryce@albatross.co.nz>bryce2000-04-161-2/+2
| | | | | | | | | * java/io/natFileDescriptorPosix.cc (open): Use mode 0666. Fix for PR libgcj/202. (available): Initialize `Where' to prevent bogus compiler warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33181 138bc75d-0d04-0410-961f-82ee72b054a4
* * All files: Updated copyright information.tromey2000-03-071-1/+1
| | | | | | | | | * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32387 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.tromey2000-02-111-2/+10
| | | | | | | | | | | | * java/io/FileDescriptor.java (EXCL): New static field. * java/io/File.java (tmpdir): New static field. (createTempFile): New method. (nextValue): New method. * java/lang/natSystem.cc (init_properties): Set java.io.tmpdir property. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31922 138bc75d-0d04-0410-961f-82ee72b054a4
* * All files: Updated copyright to reflect Cygnus purchase.tromey2000-01-191-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31504 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure: Rebuilt.tromey1999-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29278 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure: Rebuilt.tromey1999-09-031-11/+55
| | | | | | | | | | * configure.in: Check for fstat function. * java/io/natFileDescriptorPosix.cc (available): Use fstat() if FIONREAD fails. This fixes PR 3 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29078 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/natFile.cc (performMkdir): Remove FIXME.bryce1999-08-031-2/+1
| | | | | | | * java/io/natFileDescriptorPosix.cc (open): Use 0644 file mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28430 138bc75d-0d04-0410-961f-82ee72b054a4
* Initial revisiontromey1999-04-071-0/+264
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26263 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud