use struct definitions from portlib, instead of defining them by self
git-svn-id: https://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk@894786 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/luni/src/main/native/luni/shared/netif.c b/modules/luni/src/main/native/luni/shared/netif.c
index 4ded85e..c07089b 100644
--- a/modules/luni/src/main/native/luni/shared/netif.c
+++ b/modules/luni/src/main/native/luni/shared/netif.c
@@ -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 */
diff --git a/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c b/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
index ce009e6..95ff45f 100644
--- a/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
+++ b/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
@@ -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.
diff --git a/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c b/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
index 72520d6..4ab43c1 100644
--- a/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
+++ b/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
@@ -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.
diff --git a/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c b/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
index d594057..ca3d5fd 100644
--- a/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
+++ b/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
@@ -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) {