harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r894786 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni: shared/netif.c unix/OSFileSystemLinux32.c windows/OSFileSystemWin32.c windows/OSNetworkSystemWin32.c
Date Thu, 31 Dec 2009 06:34:52 GMT
Author: regisxu
Date: Thu Dec 31 06:34:51 2009
New Revision: 894786

URL: http://svn.apache.org/viewvc?rev=894786&view=rev
Log:
use struct definitions from portlib, instead of defining them by self

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c?rev=894786&r1=894785&r2=894786&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c Thu Dec
31 06:34:51 2009
@@ -34,7 +34,7 @@
                                                          jclass clazz)
 {
   /* variables to store network interface data returned by call to port library */
-  struct hyNetworkInterfaceArray_struct networkInterfaceArray;
+  hyNetworkInterfaceArray_struct networkInterfaceArray;
   I_32 result = 0;
 
   /* variables for class and method objects needed to create bridge to java */

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?rev=894786&r1=894785&r2=894786&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Thu Dec 31 06:34:51 2009
@@ -32,6 +32,7 @@
 #include "vmi.h"
 #include "iohelp.h"
 #include "nethelp.h"
+#include "hysock.h"
 
 #include "IFileSystem.h"
 #include "OSFileSystem.h"
@@ -42,14 +43,6 @@
 #define FD_BIAS 0
 #endif /* ZOS */
 
-typedef int OSSOCKET;
-typedef struct hysocket_struct
-{
-  OSSOCKET sock;
-  U_16 family;
-} hysocket_struct;
-
-
 /**
  * Lock the file identified by the given handle.
  * The range and lock type are given.

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c?rev=894786&r1=894785&r2=894786&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
Thu Dec 31 06:34:51 2009
@@ -18,9 +18,9 @@
  * Win32 specific natives supporting the file system interface.
  */
 
-#if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
-#undef _WINSOCKAPI_
-#endif
+#include "vmi.h"
+#include "hysock.h"
+#include <mswsock.h>
 
 #include <windows.h>
 #include "nethelp.h"
@@ -28,14 +28,6 @@
 #include "IFileSystem.h"
 #include "OSFileSystem.h"
 
-typedef SOCKET OSSOCKET;
-typedef struct hysocket_struct
-{
-  OSSOCKET ipv4;
-  OSSOCKET ipv6;
-  U_8 flags;
-} hysocket_struct;
-
 /**
  * Lock the file identified by the given handle.
  * The range and lock type are given.

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c?rev=894786&r1=894785&r2=894786&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
Thu Dec 31 06:34:51 2009
@@ -64,8 +64,8 @@
   U_32 time_sec = (U_32)timeout/1000;
   U_32 time_msec = (U_32)(timeout%1000)*1000;
 
-  fdset_read = hymem_allocate_memory(sizeof (struct hyfdset_struct));
-  fdset_write =	hymem_allocate_memory(sizeof (struct hyfdset_struct));
+  fdset_read = hymem_allocate_memory(sizeof (hyfdset_struct));
+  fdset_write = hymem_allocate_memory(sizeof (hyfdset_struct));
 
   FD_ZERO (&fdset_read->handle);
   FD_ZERO (&fdset_write->handle);
@@ -180,7 +180,7 @@
   hyfdset_t fdset_read;
   I_32 result = 0;
 
-  fdset_read = hymem_allocate_memory(sizeof (struct hyfdset_struct));
+  fdset_read = hymem_allocate_memory(sizeof (hyfdset_struct));
   FD_ZERO (&fdset_read->handle);
 
   if (hysocketP->flags & SOCKET_IPV4_OPEN_MASK) {



Mime
View raw message