Jerome Marc
16034e4ba3
natPlainSocketImpl.cc: Include sys/ioctl.h and sys/filio.h, if present.
...
2002-05-02 Jerome Marc <marcjero@yahoo.com>
* java/net/natPlainSocketImpl.cc: Include sys/ioctl.h and
sys/filio.h, if present.
From-SVN: r53050
2002-05-02 17:33:59 +00:00
Mark Wielaard
8be46a7d82
natPlainDatagramSocketImpl.cc (close): Set timeout to 0.
...
* java/net/natPlainDatagramSocketImpl.cc (close): Set timeout to 0.
* java/net/natSocketImpl.cc (close): Likewise.
From-SVN: r52312
2002-04-15 03:21:00 +00:00
Tom Tromey
6676c77f01
natPlainDatagramSocketImpl.cc (close): New function.
...
* java/net/natPlainDatagramSocketImpl.cc (close): New function.
* java/net/natPlainSocketImpl.cc (close): Indentation fix.
From-SVN: r51563
2002-03-29 17:07:59 +00:00
Jeff Sturm
47d0866c79
* java/net/PlainDatagramSocketImpl.java
...
(close): Use native implementation.
(finalize): New method.
* java/net/PlainSocketImpl.java (finalize): New method.
* java/net/natPlainDatagramSocketImpl.cc
(java/io/FileDescriptor.h): Don't include.
(close): Implement method here.
(create): Don't assign fd.
* java/net/natPlainSocketImpl.cc
(java/io/FileDescriptor.h): Don't include.
(create): Don't assign fd.
(accept): Likewise.
(close): Synchronize.
From-SVN: r51492
2002-03-28 02:08:36 +00:00
Jeff Sturm
a641514dc5
* java/nat/natPlainSocketImpl.cc (write): Abort loop on error.
...
From-SVN: r51230
2002-03-23 14:57:39 +00:00
Bryce McKinlay
60678e476f
posix.h: Add multiple include header protection.
...
* include/posix.h: Add multiple include header protection.
* java/net/natPlainSocketImpl.cc: Don't #include <posix.h>.
From-SVN: r50559
2002-03-11 04:15:51 +00:00
Adam Megacz
72da3c3e58
natPlainSocketImpl.cc: Added #include <platform.h>.
...
2002-03-10 Adam Megacz <adam@xwt.org>
* java/net/natPlainSocketImpl.cc: Added #include <platform.h>.
From-SVN: r50556
2002-03-11 01:34:08 +00:00
Tom Tromey
0c1fcb02b1
Win32Process.java: Added comment.
...
* java/lang/Win32Process.java: Added comment.
* 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.
From-SVN: r50536
2002-03-10 17:59:23 +00:00
Adam Megacz
0bf93ed48a
natPlainSocketImpl.cc (read, [...]): Formatting fixed.
...
2002-03-08 Adam Megacz <adam@xwt.org>
* java/net/natPlainSocketImpl.cc (read, write, close): Formatting
fixed.
From-SVN: r50481
2002-03-09 07:56:55 +00:00
Adam Megacz
4e00202772
natPlainSocketImpl.cc: Changed USE_WINSOCK to WIN32, and added thunks for read(), write(), and close().
...
2002-03-07 Adam Megacz <adam@xwt.org>
* java/net/natPlainSocketImpl.cc: Changed USE_WINSOCK to
WIN32, and added thunks for read(), write(), and close().
* java/net/natPlainSocketImpl.cc (accept, read, read):
Disabled timeouts on WIN32 pending discussion.
From-SVN: r50418
2002-03-08 01:46:34 +00:00
Bryce McKinlay
a72f7227af
natPlainSocketImpl.cc (_Jv_recv): Removed.
...
* java/net/natPlainSocketImpl.cc (_Jv_recv): Removed.
(read): Call recv() directly, not _Jv_recv().
From-SVN: r50391
2002-03-07 01:53:21 +00:00
Adam Megacz
d627547118
natInetAddress.cc: Changed USE_WINSOCK to WIN32, added '#undef STRICT'.
...
2002-02-27 Adam Megacz <adam@xwt.org>
* java/net/natInetAddress.cc: Changed USE_WINSOCK to WIN32, added
'#undef STRICT'.
From-SVN: r50120
2002-02-28 01:03:37 +00:00
Adam Megacz
bbe7f26957
natPlainDatagramSocketImpl.cc: whops; removed 'make' typo.
...
2002-02-24 Adam Megacz <adam@xwt.org>
* java/net/natPlainDatagramSocketImpl.cc: whops; removed 'make'
typo. Sorry.
From-SVN: r50019
2002-02-25 05:21:45 +00:00
Adam Megacz
77da08b08e
natPlainDatagramSocketImpl.cc: Updated #includes for Win32...
...
2002-02-24 Adam Megacz <adam@xwt.org>
* java/net/natPlainDatagramSocketImpl.cc: Updated #includes
for Win32, changed #ifdefs to check WIN32 instead of the
(now-obsolete) USE_WINSOCK, and removed support for socket
timeouts on Win32 pending further discussion.
From-SVN: r50017
2002-02-25 04:10:53 +00:00
Per Bothner
9abe2e29b4
URL.java (getPath): New JDK 1.3 method.
...
* java/net/URL.java (getPath): New JDK 1.3 method.
* java/net/URLStreamHandler.java (parseURL):
It is wrong to prepend '/' to the file part of a relative url.
* java/net/URLStreamHandler.java (parseURL):
Minor optizations - append '/' rather than "/".
* java/net/URLStreamHandler.java (parseURL):
Don't canonicalize "xx/.." or "./" URLs - JDK doesn't.
We probably should canonicalize for a context-relative url, though.
* java/net/URL.java (sameFile): Delegate to URLStreamHandler.
* java/net/URLStreamHandler.java (canonicalizeFilename): New helper.
(sameFile): New method. Uses canonicalizeFilename.
From-SVN: r49980
2002-02-22 16:15:49 -08:00
Bryce McKinlay
95407a28f6
natPlainDatagramSocketImpl.cc (bind): Call setsockopt to enable SO_BROADCAST.
...
2002-02-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/net/natPlainDatagramSocketImpl.cc (bind): Call setsockopt to
enable SO_BROADCAST.
From-SVN: r49835
2002-02-18 07:32:34 +00:00
Mark Wielaard
894286989e
[multiple changes]
...
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/math/BigInteger.java: import gnu.java.math.MPN not the whole
package as a workaround for gcj 3.0.x
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/security/BasicPermission.java: extends with fully qualified
classname as workaround for gcj 3.0.4.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java (setOption, getOption): Work
around gcj bug of wrong emitted qualifier for inherited method.
* java/net/SocketImpl.java (setOption, getOption): Ditto.
* java/util/WeakHashMap.java (WeakEntrySet): Add non-private
constructor to reduce amount of emitted bytecode. While this
happens to work around a jikes 1.15 bug, it is still a useful
patch even for correct compilers.
* java/rmi/server/RMIClassLoader.java (MyClassLoader): Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java
(DummyObjectOutputStream, DummyObjectInputStream): Ditto.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java: Reformat (no code changes).
* java/net/SocketImpl.java: Ditto.
* java/rmi/server/RMIClassLoader.java: Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java: Ditto.
2002-02-14 Mark Wielaard <mark@klomp.org>
Thanks to Takashi Okamoto
* java/util/Arrays.java (ArrayList.indexOf()): this.equals().
* java/util/Arrays.java (ArrayList.lastIndexOf()): Likewise.
* java/util/WeakHashMap.java (WeakEntry.getEntry()): this.get().
From-SVN: r49778
2002-02-14 23:16:11 +00:00
Anthony Green
b5ee195f1e
embedded updates
...
From-SVN: r49562
2002-02-07 03:24:12 +00:00
Tom Tromey
1b8337e7e1
natPlainSocketImpl.cc (_Jv_recv): Added template parameter for `recv' return type.
...
* java/net/natPlainSocketImpl.cc (_Jv_recv): Added template
parameter for `recv' return type.
From-SVN: r49345
2002-01-30 22:22:36 +00:00
Mark Wielaard
92aaa24628
Add license clarification.
...
From-SVN: r49104
2002-01-22 22:40:42 +00:00
Andreas Schwab
464115ce93
natPlainSocketImpl.cc (_Jv_recv): Change return type of function and of parameter recv_func to ssize_t...
...
* java/net/natPlainSocketImpl.cc (_Jv_recv): Change return type of
function and of parameter recv_func to ssize_t, as specified by
POSIX.
From-SVN: r49020
2002-01-20 16:34:07 +00:00
Tom Tromey
80d1ee91f9
natPlainSocketImpl.cc: Include IllegalArgumentException.h.
...
* java/net/natPlainSocketImpl.cc: Include
IllegalArgumentException.h.
(_Jv_recv): New template function.
(BooleanClass): Removed.
(read): Use _Jv_recv.
(setOption): Use Boolean::class$. Throw exception if object is
not Boolean or Integer.
From-SVN: r48992
2002-01-18 17:23:23 +00:00
Mark Wielaard
1536ef88f1
DatagramSocket.java (getReceiveBufferSize): new 1.2 method.
...
* java/net/DatagramSocket.java (getReceiveBufferSize): new 1.2 method.
* java/net/DatagramSocket.java (getSendBufferSize): Likewise.
* java/net/DatagramSocket.java (setReceiveBufferSize): Likewise.
* java/net/DatagramSocket.java (setSendBufferSize): Likewise.
From-SVN: r48814
2002-01-13 11:59:37 +00:00
Mark Wielaard
9566a90c6b
InetAddress.java (ANY_IF): moved from ServerSocket.
...
* java/net/InetAddress.java (ANY_IF): moved from ServerSocket.
* java/net/DatagramSocket.java (DatagramSocket): use ANY_IF from
InetAddress.
* java/net/MulticastSocket.java (MulticastSocket): Likewise.
* java/net/Socket.java: Merge with Classpath.
* java/net/ServerSocket.java: Likewise.
From-SVN: r48797
2002-01-12 10:11:13 +00:00
Nic Ferrier
2b521fa72e
natPlainSocketImpl.cc: Added timeout handling for sockets.
...
2002-01-08 Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk>
* java/net/natPlainSocketImpl.cc: Added timeout handling for
sockets.
(close): New function closes the socket.
(write): New functions for output to socket.
(read): New functions for reading from socket.
* java/net/PlainSocketImpl.java: Glue for new timeout
implementation.
(write): Call the native impl.
(read): Likewise.
(getInputStream): Get a stream to read from the socket.
(getOutputStream): Get a stream to write to the socket.
From-SVN: r48662
2002-01-08 21:14:58 +00:00
Joseph Myers
18e1f2bd67
HACKING, [...]: Fix spelling errors.
...
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java,
gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java,
java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java,
java/io/CharConversionException.java,
java/io/PipedInputStream.java, java/io/PipedReader.java,
java/io/PrintWriter.java, java/io/WriteAbortedException.java,
java/io/natFileWin32.cc, java/lang/Class.h,
java/lang/natClassLoader.cc, java/lang/natObject.cc,
java/lang/Package.java, java/net/BindException.java,
java/net/ConnectException.java, java/net/ProtocolException.java,
java/net/SocketException.java,
java/net/UnknownServiceException.java,
java/security/cert/X509Certificate.java,
java/security/interfaces/DSAKey.java,
java/security/SecureRandom.java, java/security/SignedObject.java,
java/sql/DatabaseMetaData.java,
java/text/DecimalFormatSymbols.java,
java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
java/util/jar/JarInputStream.java,
java/util/jar/JarOutputStream.java, java/util/Calendar.java,
java/util/Collections.java, java/util/GregorianCalendar.java,
java/util/HashMap.java, java/util/List.java,
java/util/Properties.java, java/util/Timer.java,
java/util/Vector.java, java/util/WeakHashMap.java,
javax/naming/NamingException.java,
testsuite/libjava.lang/Thread_Wait.java,
org/xml/sax/helpers/DefaultHandler.java,
org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java,
ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix
spelling errors.
* configure: Regenerate.
From-SVN: r46665
2001-10-31 00:48:17 +00:00
Tom Tromey
e94f5bac70
SocketPermission.java (hostport, actions): Now private.
...
* java/net/SocketPermission.java (hostport, actions): Now
private.
From-SVN: r46266
2001-10-15 16:32:51 +00:00
Mark Wielaard
481aae6fc2
* java/net/SocketImpl.java: Merge with Classpath
...
From-SVN: r46129
2001-10-09 21:44:54 +00:00
Mark Wielaard
0d47f08629
* java/net/DatagramSocketImpl.java: Merge with Classpath
...
From-SVN: r46127
2001-10-09 17:40:13 +00:00
Mark Wielaard
0bdf7869bf
URLDecoder.java: Remerge with Classpath
...
* java/net/URLDecoder.java: Remerge with Classpath
* java/net/URLEncoder.java: Merge with Classpath
From-SVN: r46098
2001-10-08 21:03:34 +00:00
Mark Wielaard
627a8b878e
Makefile.am: Add new classes
...
* Makefile.am: Add new classes
(core_java_source_files): CharSequence
(ordinary_java_source_files): Authenticator, PasswordAuthentication
* Makefile.in: regenerate
* gcj/javaprims.h: ditto
* java/lang/CharSequence: new class from Classpath
* java/lang/String.java: implements CharSequence
(subSequence (int,int)): new method
* java/lang/SubString.java: implements CharSequence
(subSequence (int,int)): new method
remerge comments with Classpath
* java/net/Authenticator.java: new class from Classpath
* java/net/PasswordAuthentication.java: ditto
From-SVN: r45969
2001-10-02 20:59:31 +00:00
Mark Wielaard
477946a63d
FileWriter.java: Merge with Classpath.
...
* java/io/FileWriter.java: Merge with Classpath.
* java/io/FilterInputStream.java: Ditto.
(mark): no longer synchronized
(reset): Likewise
* java/io/FilterOutputStream.java: Merge with Classpath.
* java/io/FilterReader.java: Ditto.
(mark): no longer synchronized
(reset): Likewise
* java/io/FilterWriter.java: Merge with Classpath.
* java/io/Writer.java: Ditto.
* java/lang/Compiler.java: Ditto.
* java/lang/Process.java: Ditto.
* java/lang/Void.java: Ditto.
* java/net/ContentHandler.java: Ditto.
* java/net/DatagramPacket.java: Ditto.
* java/net/MulticastSocket.java: Merge comments with Classpath.
From-SVN: r45930
2001-10-01 18:24:54 +00:00
Mark Wielaard
cfcdbe5480
DataInput.java: Merge with Classpath.
...
* java/io/DataInput.java: Merge with Classpath.
* java/io/DataOutput.java: Idem.
* java/io/FilenameFilter.java: Idem.
* java/io/Serializable.java: Idem.
* java/lang/Cloneable.java: Idem.
* java/lang/Comparable.java: Idem.
* java/lang/Runnable.java: Idem.
* java/lang/reflect/Member.java: Idem.
* java/net/ContentHandlerFactory.java: Idem.
* java/net/FileNameMap.java: Idem.
* java/net/SocketImplFactory.java: Idem.
* java/net/SocketOptions.java: Idem.
* java/net/URLStreamHandlerFactory.java: Idem.
From-SVN: r45910
2001-09-30 18:04:38 +00:00
Bryce McKinlay
218e1e912d
re PR libgcj/4383 (file: protocol not supported in URLConnection?)
...
PR libgcj/4383
* gnu/gcj/protocol/file/Connection.java (connect): Throw
FileNotFoundException if appropriate.
* gnu/gcj/protocol/file/Handler.java (openConnection): Throw an
IOException if we got a file: url with a hostname. Comment out protocol
switch to ftp for now.
* java/net/URL.java (URL): Include protocol name in exception
message
when handler can't be found.
From-SVN: r45898
2001-09-30 08:52:16 +01:00
Anthony Green
a11e2c2279
jvm.h: Declare _Jv_RegisterResource.
...
* include/jvm.h: Declare _Jv_RegisterResource.
* gnu/gcj/Core.java, gnu/gcj/natCore.cc,
gnu/gcj/protocol/core/Connection.java,
gnu/gcj/protocol/core/Handler.java,
gnu/gcj/protocol/core/CoreInputStream.java,
gnu/gcj/protocol/core/natCoreInputStream.cc: New files.
* java/net/URL.java (setURLStreamHandler): Use
gnu.gcj.protocol.core.Handler for the core protocol.
* gnu/gcj/runtime/VMClassLoader.java (init): Add "core:/" to the
end of java.class.path.
* Makefile.am (ordinary_java_source_files): Add new java files.
(nat_source_files): Add new native code files.
* Makefile.in: Rebuilt.
From-SVN: r45450
2001-09-06 22:32:54 +00:00
Tom Tromey
7eee682ba8
Makefile.in: Rebuilt.
...
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added
UnsupportedClassVersionError.
* java/lang/UnsupportedClassVersionError.java: New file from
Classpath.
* java/io/CharConversionException.java, java/io/EOFException.java,
java/io/FileNotFoundException.java, java/io/IOException.java,
java/io/InterruptedIOException.java,
java/io/ObjectStreamException.java,
java/io/OptionalDataException.java,
java/io/StreamCorruptedException.java,
java/io/SyncFailedException.java,
java/io/UTFDataFormatException.java,
java/io/UnsupportedEncodingException.java,
java/lang/AbstractMethodError.java,
java/lang/ArithmeticException.java,
java/lang/ArrayIndexOutOfBoundsException.java,
java/lang/ArrayStoreException.java,
java/lang/ClassCastException.java,
java/lang/ClassCircularityError.java,
java/lang/ClassFormatError.java,
java/lang/CloneNotSupportedException.java, java/lang/Error.java,
java/lang/Exception.java,
java/lang/ExceptionInInitializerError.java,
java/lang/IllegalAccessError.java,
java/lang/IllegalAccessException.java,
java/lang/IllegalArgumentException.java,
java/lang/IllegalMonitorStateException.java,
java/lang/IllegalStateException.java,
java/lang/IllegalThreadStateException.java,
java/lang/IncompatibleClassChangeError.java,
java/lang/IndexOutOfBoundsException.java,
java/lang/InstantiationError.java,
java/lang/InstantiationException.java,
java/lang/InternalError.java, java/lang/InterruptedException.java,
java/lang/LinkageError.java,
java/lang/NegativeArraySizeException.java,
java/lang/NoClassDefFoundError.java,
java/lang/NoSuchFieldError.java,
java/lang/NoSuchFieldException.java,
java/lang/NoSuchMethodError.java,
java/lang/NoSuchMethodException.java,
java/lang/NullPointerException.java,
java/lang/NumberFormatException.java,
java/lang/OutOfMemoryError.java, java/lang/RuntimeException.java,
java/lang/SecurityException.java,
java/lang/StackOverflowError.java,
java/lang/StringIndexOutOfBoundsException.java,
java/lang/ThreadDeath.java, java/lang/UnknownError.java,
java/lang/UnsatisfiedLinkError.java,
java/lang/UnsupportedOperationException.java,
java/lang/VerifyError.java, java/lang/VirtualMachineError.java,
java/lang/reflect/InvocationTargetException.java,
java/net/BindException.java, java/net/ConnectException.java,
java/net/MalformedURLException.java,
java/net/NoRouteToHostException.java,
java/net/ProtocolException.java, java/net/SocketException.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java,
java/text/ParseException.java: Copied from Classpath, thanks to
Mark Wielaard who did the merge.
* java/lang/System.java (getProperty): Use single argument form of
SecurityManager.checkPropertyAccess.
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added VMSecurityManager.
* java/lang/VMSecurityManager.java: New file.
* java/lang/SecurityManager.java: Merged with Classpath.
From-SVN: r45353
2001-09-02 06:18:49 +00:00
Rainer Orth
60a78ccfac
re PR libgcj/3694 (natPlainDatagramSocketImpl.cc doesn't compile in ALPHA OSF1)
...
* include/posix.h (_POSIX_PII_SOCKET): Define.
* configure.in (HAVE_SOCKLEN_T): Define.
* java/net/natPlainSocketImpl.cc [!HAVE_SOCKLEN_T]: Move socklen_t
definition up.
(_JV_accept): New function, avoids Tru64 UNIX accept macro.
(java::net::PlainSocketImpl::accept): Use it.
Fixes PRs libgcj/3694, libgcj/3696.
* configure.in (HAVE_STRUCT_IPV6_MREQ): New test.
* acconfig.h (HAVE_STRUCT_IPV6_MREQ): Provide template.
* configure, include/config.h.in: Regenerate.
* java/net/natPlainDatagramSocketImpl.cc (union McastReq): Use it.
(mcastGrp): Likewise.
(java::net::PlainDatagramSocketImpl::setOption): Guard against
missing IPV6_MULTICAST_IF.
Fixes PR libgcj/3694.
From-SVN: r44546
2001-08-01 17:53:00 +00:00
Jeff Sturm
2ff78183f8
natPlainDatagramSocketImpl.cc: Undefine bind if defined.
...
* java/net/natPlainDatagramSocketImpl.cc: Undefine bind if defined.
(_Jv_bind): New static function.
(bind): Use _Jv_bind.
* java/net/natPlainSocketImpl.cc: Undefine bind, connect if defined.
(_Jv_bind, _Jv_connect): New static functions.
(bind): Use _Jv_bind.
(connect): Use _Jv_connect.
From-SVN: r44494
2001-07-31 01:59:44 +00:00
Rainer Orth
06c271c3cf
natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC 2533 socket options IPV6_JOIN_GROUP...
...
* java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC
2533 socket options IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, falling
back to old RFC 2133 variants if missing.
From-SVN: r44130
2001-07-18 20:39:52 +00:00
Tom Tromey
3610e0d548
[multiple changes]
...
2001-05-23 Tom Tromey <tromey@redhat.com>
* posix-threads.cc (_Jv_self_cache): Renamed from self_cache.
* gcj/Makefile.in: Rebuilt.
* gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h.
* gcj/javaprims.h: Include gcj/libgcj-config.h.
* gcj/libgcj-config.h.in: New file.
* libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@.
* configure: Rebuilt.
* configure.in: Enable hash synchronization by default on some
platforms.
(HASH_SYNC_SPEC): New subst.
(AC_CONFIG_HEADER): Added gcj/libgcj-config.h.
Correctly use `test -z' instead of `test -n' in a couple places.
(JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to
LIBGCJ_CXXFLAGS.
* configure.host (enable_java_net_default): Initialize.
(enable_hash_synchronization_default): New variable.
2001-05-23 Hans Boehm <Hans_Boehm@hp.com>
* boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash
synchronization in use.
(_Jv_MarkArray): Likewise.
(_Jv_AllocBytes): Don't check return result.
(handle_out_of_memory): New function.
(_Jv_InitGC): Set GC_oom_fn.
(trace_one_vtable): New global.
(_Jv_AllocTraceOne): New function.
* configure.in: Added --enable-hash-synchronization.
* defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc,
java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked.
* nogc.cc (_Jv_AllocObj): Throw out-of-memory.
(_Jv_AllocArray): Likewise.
(_Jv_AllocBytes): Likewise.
(_Jv_AllocPtrFreeObject): New function.
(_Jv_AllocTraceOne): Likewise.
* posix-threads.cc (_Jv_ThreadRegister): Handle slow
pthread_self().
(self_cache): New global.
(_Jv_ThreadSelf_out_of_line): New function.
* prims.cc (_Jv_AllocBytesChecked): Removed.
(_Jv_ThrowNoMemory): New function.
(_Jv_AllocObject): Don't check for null return from allocator.
(_Jv_NewObjectArray): Likewise.
(_Jv_AllocPtrFreeObject): New function.
(_Jv_NewPrimArray): Allocate pointer-free object if possible.
* include/javaprims.h (_Jv_AllocPtrFreeObject): Declare.
(_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value.
* include/boehm-gc.h (_Jv_AllocObj): Define.
(_Jv_AllocPtrFreeObj): Define.
* include/jvm.h (_Jv_AllocPtrFreeObj): Declare.
(_Jv_ThrowNoMemory): Declare.
(_Jv_AllocTraceOne): Declare.
(_Jv_AllocBytesChecked): Removed.
* include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock,
_Jv_MutexUnlock): Handle LOCK_DEBUG.
(_Jv_ThreadSelf): Handle case where system pthread_self() is
slow.
* java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as
friend.
* java/lang/Object.h (sync_info): Conditional upon presence of
hash synchronization.
* java/lang/natObject.cc: Much new code to handle thin locks and
hash synchronization.
* java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free
object if possible.
From-SVN: r42519
2001-05-24 05:40:37 +00:00
Kaveh R. Ghazi
9e65a913b6
natInetAddress.cc (java::net::InetAddress::aton): Wrap use of inet_pton in HAVE_INET6.
...
* java/net/natInetAddress.cc (java::net::InetAddress::aton):
Wrap use of inet_pton in HAVE_INET6.
From-SVN: r41547
2001-04-25 20:27:06 +00:00
Bryce McKinlay
28f7d9d05a
decl.c (init_decl_processing): Add new class "protectionDomain" field.
...
gcc/java:
2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (init_decl_processing): Add new class "protectionDomain"
field.
* class.c (make_class_data): Set initial value for "protectionDomain".
libjava:
2001-04-25 Bryce McKinlay <bryce@albatross.co.nz>
java.security merge and ClassLoader compliance fixes.
* java/lang/Class.h (Class): Include ProtectionDomain.h.
New protectionDomain field.
(forName): Add initialize parameter. Fixes declaration to comply with
JDK spec.
* java/lang/natClass.cc (forName): Correct declaration of the three-arg
variant. Honour "initialize" flag.
(getProtectionDomain0): New method.
* java/lang/Class.java: Fix forName() declaration.
(getPackage): New method based on Classpath implementation.
(getProtectionDomain0): New native method decl.
(getProtectionDomain): New method.
* java/lang/ClassLoader.java (getParent): Now final.
(definedPackages): New field.
(getPackage): New.
(defineClass): New variant with protectionDomain argument.
(definePackage): New.
(getPackages): New.
(findSystemClass): Now final.
(getSystemResourceAsStream): Remove redundant "final" modifier.
(getSystemResource): Remove redundant "final" modifier.
(getResources): Now final.
(protectionDomainPermission): New static field.
(unknownProtectionDomain): Ditto.
(defaultProtectionDomain): Ditto.
(getSystemClassLoader): Now non-native.
* java/util/ResourceBundle.java (tryGetSomeBundle): Use the correct
arguments for Class.forName().
* java/lang/Package.java: New file.
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): Removed.
(instance): Static initialize singleton.
(findClass): Override this, not findSystemClass.
* java/lang/natClassLoader.cc (defineClass0): Set class's
protectionDomain field as specified.
(getSystemClassLoader): Removed.
(findClass): Renamed from findSystemClass. Call the interpreter via
URLClassLoader.findClass if loading class via dlopen fails.
* java/security/*.java: java.security import/merge with Classpath.
* java/security/acl/*.java: Likewise.
* java/security/interfaces/*.java: Likewise.
* java/security/spec/*.java: Likewise.
* java/net/NetPermission.java: Likewise.
* java/net/SocketPermission.java: Likewise.
* gnu/java/security/provider/DefaultPolicy.java: Likewise.
* Makefile.am: Add new classes.
* Makefile.in: Rebuilt.
* gcj/javaprims.h: CNI namespace rebuild.
From-SVN: r41543
2001-04-25 16:45:15 +01:00
Per Bothner
b90f4049d3
URLStreamHandler.java (parseURL): Fix bug which would "canonicalize" "../../xxx" to "/xxx".
...
* java/net/URLStreamHandler.java (parseURL): Fix bug which would
"canonicalize" "../../xxx" to "/xxx".
From-SVN: r40641
2001-03-19 15:31:14 -08:00
Mark Wielaard
b9333bff58
URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)
...
* java/net/URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com )
(decode): Merge comments with Classpath, don't throw Exception
From-SVN: r39030
2001-01-15 07:58:16 +00:00
Anthony Green
bc6d273e64
Fix bug in URLConnection and correct javadoc annotations in StringBuffer.
...
From-SVN: r38781
2001-01-07 20:01:46 +00:00
Warren Levy
be17b0fcff
FileInputStream.java (close): Check if the fd is valid.
...
* java/io/FileInputStream.java (close): Check if the fd is valid.
* java/io/RandomAccessFile.java (close): Ditto.
* java/net/PlainDatagramSocketImpl.java (close): Ditto.
* java/net/PlainSocketImpl.java (close): Ditto.
From-SVN: r38131
2000-12-08 10:28:32 +00:00
Anthony Green
31280fb7c4
prims.cc (_Jv_NewObjectArray): Undo placement change.
...
2000-11-25 Anthony Green <green@redhat.com>
* prims.cc (_Jv_NewObjectArray): Undo placement change.
(_Jv_NewPrimArray): Likewise.
* gcj/array.h (__JArray): Undo const change. Removed constructor.
(class JArray): Removed constructor.
* java/lang/Thread.java (context_class_loader): New private data.
(getContextClassLoader): New method.
(setContextClassLoader): New method.
(Thread): Initialize context_class_loader.
* java/net/URLClassLoader.java: Import java.util.Enumeration.
(getResource): Rename to findResource.
(findResource): New method. Used to be getResource.
(getResourceAsStream): Deleted.
(jarFileize): Extracted logic from URLClassLoader constructor into
this new private method.
(addURL): New protected method.
(URLClassLoader): Call jarFileize. Use addElement instead of
insertElementAt.
(findResources): New method.
* java/lang/ClassLoader.java: Import java.util.Enumeration.
(getResource): Implement correct logic.
(findResource): New method.
(getResources): New method.
(findClass): Create a ClassNotFoundException with the name of the
class rather than nothing at all.
(defineClass) Only throw ClassFormatError.
* java/lang/Class.java (forName): New method.
* java/lang/Class.h (forName): New method.
* java/lang/natClass.cc (forName): New method.
From-SVN: r37751
2000-11-26 03:58:56 +00:00
Warren Levy
6678181b3c
InetAddress.java (addr): Renamed from 'address'.
...
* java/net/InetAddress.java (addr): Renamed from 'address'.
(address): New field to match Serialized Form doc.
(hostName): Renamed from 'hostname' to match Serialized Form doc.
(family): New serialization field.
(serialVersionUID): New field.
(readObject): New method.
(writeObject): New method.
(getFamily): New native method.
(InetAddress): Set family.
* java/net/natInetAddress.cc (getFamily): New method.
(addr): Renamed from 'address'.
(hostName): Renamed from 'hostname' to match Serialized Form doc.
* java/net/natPlainDatagramSocketImpl.cc (addr): Renamed from 'address'.
* java/net/natPlainSocketImpl.cc (addr): Renamed from 'address'.
Serialization mod.
From-SVN: r37222
2000-11-03 07:43:06 +00:00
Tom Tromey
1d336a099d
natField.cc (BooleanClass): Don't define.
...
* java/lang/reflect/natField.cc (BooleanClass): Don't define.
* java/lang/reflect/natArray.cc (BooleanClass): Don't define.
* java/lang/Class.h (Object): Added `class$' field.
* java/lang/Object.h (Object): Added `class$' field.
* defineclass.cc (ClassClass): Use `class$' form.
(ClassObject): Likewise.
* resolve.cc (ClassObject): Use `class$' form.
(ObjectClass): Likewise.
* interpret.cc (ClassError): Removed.
* java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use
`class$' form.
(IntegerClass): Likewise.
* java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$'
form.
* java/lang/natClassLoader.cc (CloneableClass): Use `class$' form.
(ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass,
SerializableClass): Likewise.
Include Serializable.h, Cloneable.h.
* java/lang/natSystem.cc (SystemClass): Removed.
(init_properties): Use `class$' form.
* java/lang/natObject.cc (CloneableClass): Removed.
(clone): Use `class$' form.
* java/lang/natClass.cc (CloneableClass): Use `class$' form.
(ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass,
ConstructorClass): Likewise.
* java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form.
(ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass,
IntegerClass, LongClass, FloatClass, DoubleClass): Likewise.
* java/io/natObjectInputStream.cc (ObjectClass): Use `class$'
form.
(ClassClass): Likewise.
* include/jvm.h (StringClass): Use `class$' form.
* prims.cc (ObjectClass): Removed.
(_Jv_RunMain): Use `class$' form.
(_Jv_AllocObject): Likewise.
* jni.cc (ClassClass): Use `class$' form.
(ThrowableClass): Likewise.
(ObjectClass): Likewise.
(MethodClass): Likewise.
(ThreadGroupClass): Likewise.
(NativeThreadClass): Likewise.
* boehm.cc (ObjectClass): Removed.
(ClassClass): Removed.
(_Jv_MarkObj): Use `class$' form.
* gcj/field.h (JvFieldIsRef): Use `class$' form.
Include RawData.h.
From-SVN: r36740
2000-10-06 01:49:32 +00:00
Warren Levy
bc6ccd3316
PropertyChangeEvent.java (serialVersionUID): Added.
...
* java/beans/PropertyChangeEvent.java (serialVersionUID): Added.
* java/beans/PropertyVetoException.java (serialVersionUID): Added.
* java/io/File.java (writeObject): Added.
(readObject): Added.
(serialVersionUID): Added.
* java/io/ObjectOutputStream.java (writeObject): Initialized
fieldsAlreadyWritten before recursion rather than after.
* java/io/ObjectStreamClass.java (serialVersionUID): Added.
* java/io/OptionalDataException.java (serialVersionUID): Added.
(OptionalDataException): Made package private.
* java/io/SyncFailedException.java (SyncFailedException): Removed
default constructor to match spec.
* java/lang/Boolean.java (serialVersionUID): Added.
* java/lang/Byte.java (serialVersionUID): Added.
* java/lang/Character.java (serialVersionUID): Added.
* java/lang/Double.java (serialVersionUID): Added.
* java/lang/Float.java (serialVersionUID): Added.
* java/lang/Integer.java (serialVersionUID): Added.
* java/lang/Long.java (serialVersionUID): Added.
* java/lang/Number.java (serialVersionUID): Added.
* java/lang/Short.java (serialVersionUID): Added.
* java/lang/String.java (serialVersionUID): Added.
* java/lang/ThreadDeath.java (ThreadDeath): Removed constructor
to match spec.
* java/lang/reflect/InvocationTargetException.java
(serialVersionUID): Added.
* java/net/URL.java (handler): Made transient.
(hashCode): Added field for serialization, per spec. and use
cached value if available.
(serialVersionUID): Added.
(URL): Initialize hashCode.
(set): Adjust hashCode.
(readObject): New Method to initialize the protocol handler when
deserializing.
(writeObject): New method.
* java/text/BreakIterator.java: Removed 'implements Serializable'.
* java/text/Collator.java: Removed 'implements Serializable'.
* java/util/GregorianCalendar.java (serialVersionUID): Added.
* java/util/Properties.java (serialVersionUID): Added.
* java/util/Random.java (serialVersionUID): Added.
(seed): Made private.
(nextNextGaussian): Made private.
(haveNextNextGaussian): Made private.
* java/util/Stack.java (serialVersionUID): Added.
* java/util/TimeZone.java (serialVersionUID): Added.
* java/util/Vector.java (serialVersionUID): Added.
Serialization mods.
From-SVN: r36272
2000-09-08 19:37:09 +00:00