This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.net.PlainSocketImpl.java


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to trunk to partly merge 
java.net.PlainSocketImpl.java with classpath. More to come.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+9F1SWSOgCCdjSDsRAmJhAKCdI3vlAO86FLu8IF6TwjA4uZjsXACbBi8O
ekyAadT8vT/Zlz7ybYepSvI=
=NKSf
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1977
diff -u -b -B -r1.1977 ChangeLog
--- ChangeLog	21 Jun 2003 12:49:38 -0000	1.1977
+++ ChangeLog	21 Jun 2003 13:19:49 -0000
@@ -1,5 +1,13 @@
 2003-06-21  Michael Koch  <konqueror@gmx.de>
 
+	* java/net/PlainSocketImpl.java:
+	Reformatting.
+	(static): New implicit method.
+	(read): Made package private.
+	(write): Likewise.
+
+2003-06-21  Michael Koch  <konqueror@gmx.de>
+
 	* java/util/SimpleTimeZone.java:
 	Removed unneeded import, reformatting.
 
Index: java/net/PlainSocketImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/PlainSocketImpl.java,v
retrieving revision 1.16
diff -u -b -B -r1.16 PlainSocketImpl.java
--- java/net/PlainSocketImpl.java	20 Mar 2003 08:19:58 -0000	1.16
+++ java/net/PlainSocketImpl.java	21 Jun 2003 13:19:49 -0000
@@ -41,18 +41,29 @@
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import gnu.classpath.Configuration;
 
 /**
- * The standard GCJ socket implementation.
  * Written using on-line Java Platform 1.2 API Specification, as well
  * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
  * Status:  Believed complete and correct.
- *
+ */
+
+/**
  * @author Per Bothner <bothner@cygnus.com>
  * @author Nic Ferrier <nferrier@tapsellferrier.co.uk>
  */
 class PlainSocketImpl extends SocketImpl
 {
+  // Static initializer to load native library.
+  static
+    {
+      if (Configuration.INIT_LOAD_LIBRARY)
+        {
+          System.loadLibrary("javanet");
+        }
+    }
+  
   // These fields are mirrored for use in native code to avoid cpp conflicts
   // when the #defines in system header files are the same as the public fields.
   static final int _Jv_TCP_NODELAY_ = SocketOptions.TCP_NODELAY,
@@ -137,17 +148,17 @@
 
   // The native read methods.
 
-  private native int read() throws IOException;
+  native int read() throws IOException;
 
-  private native int read(byte[] buffer, int offset, int count)
+  native int read(byte[] buffer, int offset, int count)
     throws IOException;
 
 
   // The native write methods.
 
-  private native void write(int c) throws IOException;
+  native void write(int c) throws IOException;
 
-  private native void write(byte[] buffer, int offset, int count)
+  native void write(byte[] buffer, int offset, int count)
     throws IOException;
 
   protected void finalize() throws Throwable

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]