* include/win32.h (_Jv_platform_close_on_exec): Changed
signature and declared extern.
* win32.cc (_Jv_platform_close_on_exec): Implemented.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc
(create): Use new signature of _Jv_platform_close_on_exec.
* gnu/java/net/natPlainSocketImplWin32.cc
(create): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
(accept): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
* java/io/natFileDescriptorWin32.cc (open): Use
_Jv_platform_close_on_exec.
From-SVN: r73325
2003-09-26 Sascha Brawer <brawer@dandelis.ch>
* java/awt/image/SinglePixelPackedSampleModel.java (createDataBuffer):
Save space for some pixels at the buffer end. Added Javadoc.
2003-09-26 Tom Tromey <tromey@redhat.com>
* java/io/ObjectOutputStream.java (writeFields): Fixed
indentation.
(putFields): Likewise.
From-SVN: r71829
2003-09-18 Mark Wielaard <mark@klomp.org>
Reported by Guilhem Lavaux and Julian Dolby
* java/io/ObjectStreamClass.java (getSerialPersistentFields): Get the
field "serialPersistentFields", not "getSerialPersistentFields".
From-SVN: r71515
* java/net/URLStreamHandler.java (parseURL): If original file
ends with "/", so must canonical result.
* java/io/natFilePosix.cc (getCanonicalPath): Clean up snafus
with nul-termination and finding previous "/".
From-SVN: r71327
* win32.cc: fixed tab, indentation and whitespace
inconsistencies
removed jvm.h include
added includes java/lang/UnsupportedOperationException.h,
java/io/IOException.h, java/net/SocketException.h
(WSAEventWrapper): class implementation
(_Jv_WinStrError): implemented both overloads
(_Jv_ThrowIOException): implemented both overloads
(_Jv_ThrowSocketException): implemented both overloads
(_Jv_select): implemented
* include/win32.h: fixed tab, indentation and whitespace
inconsistencies
wrapped <windows.h> include with #define WIN32_LEAN_AND_MEAN
added jvm.h include
(WSAEventWrapper): added class declaration
(_Jv_WinStrError): added both overload declarations
(_Jv_ThrowIOException): added both overload declarations
(_Jv_ThrowSocketException): added both overload declarations
removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines
(_Jv_select): added declaration
(_Jv_socket): removed
(_Jv_connect): removed
(_Jv_close): removed
(_Jv_bind): removed
(_Jv_accept): removed
(_Jv_listen): removed
(_Jv_write): removed
(_Jv_read): removed
* java/io/natFileDescriptorWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
(testCanUseGetHandleInfo): new function which tests whether Win32
GetHandleInformation() call can be used with console buffer handles
(only supported on >=WinNT 5.0)
(winerr): removed (superseded by _Jv_WinStrError in include/win32.h)
(valid): rewrote implementation using GetHandleInformation()
(sync): changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(open): likewise
(write): likewise
(setLength): likewise
(close): likewise
(seek): likewise
(getFilePointer): likewise
(read): likewise
* java/io/natFileWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
(_access): use JV_TEMP_UTF_STRING
(_stat): likewise
(performMkDir): use JV_TEMP_UTF_STRING
(performRenameTo): likewise
(performDelete): likewise
(performCreate): likewise
(performSetReadOnly): likewise
(performSetLastModified): likewise
* java/lang/natWin32Process.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed includes gcj/cni.h, jvm.h
(new_string): removed
(startProcess): use JV_TEMP_UTF_STRING,
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
* java/net/natInetAddressWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
(aton): use JV_TEMP_UTF_STRING
removed POSIX conditional code not relevant to Win32
(lookup): likewise
(getLocalHostName): likewise
* java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed unnecessary windows.h, winsock.h and gcj/cni.h includes
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
(winsock2GetRealNetworkInterfaces): new function to compute network
interfaces via Winsock2 API
(determineGetRealNetworkInterfacesFN): new function for returning
a function pointer to the function used to compute network interfaces.
(getRealNetworkInterfaces): implemented
* java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed gcj/cni.h include
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
changed net POSIXisms to Win32isms
replaced _Jv socket-related calls with their real Win32 equivalents
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(peekData): implemented timeout support
(receive): likewise
* java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed gcj/cni.h and gcj/javaprims.h includes
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
changed net POSIXisms to Win32isms
replaced _Jv socket-related calls with their real Win32
equivalents
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(throwConnectException): helper function for connect()
(connect): implemented timeout support
(accept): likewise
(doRead): new helper function common to both read() method overloads,
includes timeout support
(read): implemented both overloads in terms of doRead()
(available): implemented using ioctlsocket()
From-SVN: r70904
PR libgcj/11575
* java/io/natFileDescriptorWin32.cc (open): Set create
flag to OPEN_AWAYS when READ & WRITE regardless of APPEND flag.
Honor EXCL when openning with WRITE flag.
From-SVN: r70565
* java/io/PrintStream.java (print): Always flush if auto_flush is
set. Don't check for newline characters.
(write (int)): Implement without using a temporary array.
(write (byte[], int, int): Always flush if auto_flush is set. Don't
check for newline characters.
Fixes PR libgcj/11778.
From-SVN: r70284
Fix for PR libgcj/11737:
* java/io/ObjectOutputStream.java (getMethod): Make method
accessible.
(getField): Likewise.
(writeObject): Use getMethod.
Import PrivilegedAction and AccessController.
(callWriteMethod): Don't check whether m is null. Catch
NoSuchMethodException.
From-SVN: r70035
* java/io/PrintStream.java
(checkError): Call flush() instead of direct flushing of the Writer
object.
(print): Call print(String) instead of direct print method of the
Writer Object.
(println): Call println(String) instead of direct println method of the
Writer Object.
(write): Simplified.
From-SVN: r68632
* java/io/ObjectInputStream.java
(readClassDescriptor): New method.
(readObject): Moved functionality to readClassDescriptor().
* java/io/ObjectOutputStream.java
(writeClassDescriptor): New method.
(writeObject): Moved functionality to writeClassDescriptor().
From-SVN: r68465
* java/io/File.java
(static): Load javaio lib if existing (only in classpath).
(File): Revised documentation to show the correct argument name.
(createTempFile): Partly merged with classpath.
(compareTo): Simplified.
(lastModified): Throw exception if time < 0.
(deleteOnExit): Revised documentation.
From-SVN: r68310
2003-06-10 Michael Koch <konqueror@gmx.de>
* java/io/PrintStream.java:
Merged version from classpath.
(close): Removed sychronized keyword. This class is not garantied to
be thread-safe.
(write): Likewise.
From-SVN: r67717
* libjava/include/posix.h (O_SYNC): Define if not available
and a reasonable, perhaps more conservative, replacement exists.
(O_DSYNC): Likewise.
* java/io/natFileDescriptorPosix.cc (open): Revert last patch.
From-SVN: r67517
* java/io/DataInputStream.java
(convertFromUTF): Merged comment from classpath.
* java/io/PrintStream.java
(error_occured): Renamed from error, merged comment from classpath.
(PrintStream): No need to initialized error.
(checkError): Replace error with error_occurred.
(setError): Likewise.
From-SVN: r66997
2003-05-20 Michael Koch <konqueror@gmx.de>
* java/io/DataInputStream.java:
Reformatted, Replaced < and & with html entitites in documentation.
* java/io/File.java:
Reformatted.
* java/io/PrintWriter.java:
Moved class documentation.
From-SVN: r66992
* 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().
From-SVN: r66755
2003-04-19 Ranjit Mathew <rmathew@hotmail.com>
* java/io/File.java (getAbsolutePath): On Windows, take care
of paths like "C:", "G:foo\bar", etc.
(getName): Make it work correctly on Windows.
(getParent): Make it work correctly on Windows. For UNIX,
fix bug that causes "/" to be returned as the parent of "/",
instead of null as returned by Sun's JRE.
* java/io/natFileWin32.cc: Change copyright owner to FSF.
From-SVN: r65823
* java/io/ObjectStreamException
* java/io/FileFilter
* java/io/FilenameFilter
* java/io/ObjectInput
* java/io/ObjectOutput
* java/io/ObjectStreamConstants
Minor doc fixes, format fixes, spelling corrections, etc.
* java/io/DataInput
Corrected code samples in Javadocs to match reality
* java/io/DataOutput
* java/io/ObjectInputValidation
Major documentation fixes - all Javadocs re-written or updated
From-SVN: r65329
* java/io/File.java
(separator): Merged documentation from classpath.
(separatorChar): Merged documentation from classpath.
(pathSeparator): Merged documentation from classpath.
(pathSeparatorChar): Merged documentation from classpath.
(path): Merged documentation from classpath.
(canRead): Merged documentation from classpath.
(canWrite): Merged documentation from classpath.
(createNewFile): Merged documentation from classpath.
(delete): Merged documentation from classpath.
(equals): Merged documentation from classpath.
(exists): Merged documentation from classpath.
(File): Renamed p to name to match classpath, merged documentation
from classpath.
(getAbsolutePath): Merged documentation from classpath.
(getCanonicalPath): Merged documentation from classpath.
(getCanonicalFile): Merged documentation from classpath.
(getName): Merged documentation from classpath.
(getParent): Merged documentation from classpath.
(getParentFile): Merged documentation from classpath.
(getPath): Merged documentation from classpath.
(hashCode): Merged documentation from classpath.
(isAbsolute): Merged documentation from classpath.
(isDirectory): Merged documentation from classpath.
(isFile): Merged documentation from classpath.
(isHidden): Merged documentation from classpath.
(lastModified): Merged documentation from classpath.
(length): Merged documentation from classpath.
(list): Merged documentation from classpath.
(listFiles): Merged documentation from classpath.
(toString): Merged documentation from classpath.
(toURL): Merged documentation from classpath.
(mkdir): Merged documentation from classpath.
(mkdirs): Merged documentation from classpath.
(createTempFile): Merged documentation from classpath.
(setReadOnly): Merged documentation from classpath.
(listRoots): Merged documentation from classpath.
(compareTo): Merged documentation from classpath.
(renameTo): Merged documentation from classpath.
(setLastModified): Merged documentation from classpath.
* java/io/PrintStream.java
(auto_flush): Merged documentation from classpath.
(PrintStream): Merged documentation from classpath.
(checkError): Merged documentation from classpath.
(setError): Merged documentation from classpath.
(close): Merged documentation from classpath.
(flush): Merged documentation from classpath.
(print): Merged documentation from classpath.
(println): Merged documentation from classpath.
(write): Renamed count to len to match classpath,
merged documentation from classpath.
* java/io/RandomAccessFile.java
(readShort): Merged documentation from classpath.
(readUnsignedByte): Merged documentation from classpath.
(readUnsignedShort): Merged documentation from classpath.
(readUTF): Merged documentation from classpath.
(seek): Reformatted, merged documentation from classpath.
(skipBytes): Renamed some variables to match classpath, reformatted,
merged documentation from classpath.
(write): Merged documentation from classpath.
(writeBoolean): Merged documentation from classpath.
(writeByte): Merged documentation from classpath.
(writeShort): Merged documentation from classpath.
(writeChar): Merged documentation from classpath.
(writeInt): Merged documentation from classpath.
(writeLong): Merged documentation from classpath.
(writeFloat): Merged documentation from classpath.
(writeDouble): Merged documentation from classpath.
(writeBytes): Merged documentation from classpath.
(writeChars): Merged documentation from classpath.
(writeUTF): Reformatted.
(getChannel): Reformatted.
From-SVN: r65081
2003-03-28 Michael Koch <konqueror@gmx.de>
* java/io/File.java:
Import needed classes instead of whole packages, merged class
documentation with classpath, moved constants and variables to top of
class.
* java/io/PrintStream.java:
Merged class documentation with classpath, moved constants and
variables to top of class.
* java/io/RandomAccessFile.java
(RandomAccessFile): Merged with classpath.
(read): Merged with classpath).
(read*): Reformatted.
From-SVN: r64974