harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r389478 - in /incubator/harmony/enhanced/classlib/trunk/native-src: linux.IA32/luni/OSNetworkSystemLinux.c linux.IA32/luni/makefile linux.IA32/luni/nethelp.c shared/luni/nethelp.c win.IA32/luni/makefile win.IA32/luni/nethelp.c
Date Tue, 28 Mar 2006 11:29:44 GMT
Author: tellison
Date: Tue Mar 28 03:29:38 2006
New Revision: 389478

URL: http://svn.apache.org/viewcvs?rev=389478&view=rev
Log:
Apply patch HARMONY-183 (refactor linux specific parts of nethelp.c then make it shared code)

Added:
    incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/OSNetworkSystemLinux.c
    incubator/harmony/enhanced/classlib/trunk/native-src/shared/luni/nethelp.c
      - copied unchanged from r389138, incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c
Removed:
    incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/nethelp.c
    incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c
Modified:
    incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile
    incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile

Added: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/OSNetworkSystemLinux.c?rev=389478&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/OSNetworkSystemLinux.c
(added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/OSNetworkSystemLinux.c
Tue Mar 28 03:29:38 2006
@@ -0,0 +1,43 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "nethelp.h"
+#include "jclglob.h"
+#include "portsock.h"
+#include "hyport.h"
+
+//Alternative Select function
+int
+selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept){
+  PORT_ACCESS_FROM_ENV (env);
+  hytimeval_struct timeP;
+  hyfdset_t fdset_read;
+  I_32 result = 0;
+  I_32 size = 0;
+  if (0 <= uSecTime)
+    hysock_timeval_init (0, uSecTime, &timeP);
+
+  fdset_read = hymem_allocate_memory(sizeof (struct hyfdset_struct));
+  FD_ZERO (&fdset_read->handle);
+  FD_SET (hysocketP->sock, &fdset_read->handle);
+  size =hysocketP->sock + 1;
+
+  if (0 <= uSecTime)
+    result = hysock_select (size, fdset_read, NULL, NULL,&timeP);
+  else
+    result = hysock_select (size, fdset_read, NULL, NULL,NULL);
+  hymem_free_memory(fdset_read);
+  return result;
+}

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile?rev=389478&r1=389477&r2=389478&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile Tue Mar
28 03:29:38 2006
@@ -23,14 +23,15 @@
 BUILDFILES = \
 	$(SHAREDSUB)luni_copyright.o $(SHAREDSUB)file.o procimpl.o \
 	$(SHAREDSUB)oos.o $(SHAREDSUB)fileis.o \
-	$(SHAREDSUB)simpl.o $(SHAREDSUB)psimpl2.o nethelp.o $(SHAREDSUB)floatbits.o \
-	$(SHAREDSUB)rafile.o $(SHAREDSUB)ois.o helpers.o $(SHAREDSUB)math.o \
-	$(SHAREDSUB)luniglob.o $(SHAREDSUB)proxy.o $(SHAREDSUB)netif.o \
-	$(SHAREDSUB)process.o $(SHAREDSUB)bigint.o $(SHAREDSUB)osc.o $(SHAREDSUB)socket.o \
-	$(SHAREDSUB)inetadds.o $(SHAREDSUB)pssimpl.o $(SHAREDSUB)filedesc.o \
+	$(SHAREDSUB)simpl.o $(SHAREDSUB)psimpl2.o $(SHAREDSUB)nethelp.o \
+	$(SHAREDSUB)floatbits.o $(SHAREDSUB)rafile.o $(SHAREDSUB)ois.o \
+	helpers.o $(SHAREDSUB)math.o $(SHAREDSUB)luniglob.o $(SHAREDSUB)proxy.o \
+	$(SHAREDSUB)netif.o $(SHAREDSUB)process.o $(SHAREDSUB)bigint.o \
+	$(SHAREDSUB)osc.o $(SHAREDSUB)socket.o $(SHAREDSUB)inetadds.o \
+	$(SHAREDSUB)pssimpl.o $(SHAREDSUB)filedesc.o \
 	$(SHAREDSUB)timezone.o $(SHAREDSUB)pmsimpl.o pdsimpl.o \
 	$(SHAREDSUB)fileos.o $(SHAREDSUB)OSFileSystem.o OSFileSystemLinux32.o \
-	OSMemory.o OSMemoryLinux32.o OSNetworkSystem.o
+	OSMemory.o OSMemoryLinux32.o OSNetworkSystem.o OSNetworkSystemLinux.o
 
 MDLLIBFILES = \
 	../lib/libhycommon.a ../libhysig.so ../lib/libhyzip.a ../libhyzlib.so \

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile?rev=389478&r1=389477&r2=389478&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile Tue Mar 28
03:29:38 2006
@@ -29,7 +29,7 @@
 BUILDFILES = \
   $(SHAREDSUB)luni_copyright.obj $(SHAREDSUB)file.obj procimpl.obj \
   $(SHAREDSUB)oos.obj $(SHAREDSUB)fileis.obj $(SHAREDSUB)simpl.obj \
-  $(SHAREDSUB)psimpl2.obj nethelp.obj $(SHAREDSUB)floatbits.obj \
+  $(SHAREDSUB)psimpl2.obj $(SHAREDSUB)nethelp.obj $(SHAREDSUB)floatbits.obj \
   $(SHAREDSUB)rafile.obj $(SHAREDSUB)ois.obj helpers.obj $(SHAREDSUB)math.obj \
   $(SHAREDSUB)luniglob.obj $(SHAREDSUB)proxy.obj $(SHAREDSUB)netif.obj \
   $(SHAREDSUB)process.obj $(SHAREDSUB)bigint.obj $(SHAREDSUB)osc.obj \



Mime
View raw message