summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/Socket/Socket.xs2
-rw-r--r--win32/include/sys/socket.h4
-rw-r--r--win32/win32.c6
-rw-r--r--win32/win32.h3
4 files changed, 11 insertions, 4 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 51825871b7..b8e34083ee 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -26,7 +26,9 @@
#include "sockadapt.h"
#endif
+#ifndef WIN32 /* I_NETINET_TCP */
#include <netinet/tcp.h>
+#endif
#ifdef I_SYSUIO
# include <sys/uio.h>
diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index 6ffb0ac269..87506fbe87 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -47,9 +47,9 @@ typedef struct _OVERLAPPED {
#endif
#endif //_WINDOWS_
-#ifndef __GNUC__
+// #ifndef __GNUC__
#include <winsock.h>
-#endif
+// #endif
#define ENOTSOCK WSAENOTSOCK
#undef HOST_NOT_FOUND
diff --git a/win32/win32.c b/win32/win32.c
index 858f86e6b0..2fe8772d65 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -35,6 +35,7 @@
#define PerlIO FILE
#endif
+#include <sys/stat.h>
#include "EXTERN.h"
#include "perl.h"
@@ -46,7 +47,6 @@ extern CPerlObj* pPerl;
#include "Win32iop.h"
#include <fcntl.h>
-#include <sys/stat.h>
#ifndef __GNUC__
/* assert.h conflicts with #define of assert in perl.h */
#include <assert.h>
@@ -1320,11 +1320,15 @@ win32_uname(struct utsname *name)
char *arch;
GetSystemInfo(&info);
+#ifdef __MINGW32__
+ switch (info.DUMMYUNIONNAME.DUMMYSTRUCTNAME.wProcessorArchitecture) {
+#else
#ifdef __BORLANDC__
switch (info.u.s.wProcessorArchitecture) {
#else
switch (info.wProcessorArchitecture) {
#endif
+#endif
case PROCESSOR_ARCHITECTURE_INTEL:
arch = "x86"; break;
case PROCESSOR_ARCHITECTURE_MIPS:
diff --git a/win32/win32.h b/win32/win32.h
index f712928cf0..bfca44a1b2 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -23,7 +23,7 @@
#endif
#ifdef __GNUC__
-typedef long long __int64;
+// typedef long long __int64;
# define Win32_Winsock
/* GCC does not do __declspec() - render it a nop
* and turn on options to avoid importing data
@@ -393,3 +393,4 @@ struct thread_intern {
#endif /* USE_THREADS */
#endif /* _INC_WIN32_PERL5 */
+