Index: native-src/linux.IA32/luni/OSNetworkSystemLinux.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ native-src/linux.IA32/luni/OSNetworkSystemLinux.c 2006-03-06 12:23:06.000000000 +0000 @@ -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; +} Index: native-src/linux.IA32/luni/makefile =================================================================== --- native-src/linux.IA32/luni/makefile.orig 2006-03-06 12:13:36.000000000 +0000 +++ native-src/linux.IA32/luni/makefile 2006-03-06 12:18:52.000000000 +0000 @@ -23,14 +23,15 @@ BUILDFILES = \ $(SHAREDSUB)luni_copyright.o $(SHAREDSUB)file.o procimpl.o \ $(SHAREDSUB)oos.o $(SHAREDSUB)fileis.o \ - 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 \ - process.o $(SHAREDSUB)bigint.o $(SHAREDSUB)osc.o $(SHAREDSUB)socket.o \ + 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 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 \ Index: native-src/win.IA32/luni/makefile =================================================================== --- native-src/win.IA32/luni/makefile.orig 2006-03-06 12:13:36.000000000 +0000 +++ native-src/win.IA32/luni/makefile 2006-03-06 12:16:11.000000000 +0000 @@ -29,7 +29,7 @@ BUILDFILES = \ $(SHAREDSUB)luni_copyright.obj $(SHAREDSUB)file.obj procimpl.obj \ $(SHAREDSUB)oos.obj $(SHAREDSUB)fileis.obj 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 \ process.obj $(SHAREDSUB)bigint.obj $(SHAREDSUB)osc.obj \