From: Nick Ing-Simmons Date: Sat, 15 May 1999 15:56:10 +0000 (+0000) Subject: Mingw32 + w32api-0.1.5 tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a9ec5a384827281b406275296e7470424fe6b86;p=p5sagit%2Fp5-mst-13.2.git Mingw32 + w32api-0.1.5 tweaks - now more like other Win32 compilers p4raw-id: //depot/perl@3425 --- diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 5182587..b8e3408 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 +#endif #ifdef I_SYSUIO # include diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h index 6ffb0ac..87506fb 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 -#endif +// #endif #define ENOTSOCK WSAENOTSOCK #undef HOST_NOT_FOUND diff --git a/win32/win32.c b/win32/win32.c index 858f86e..2fe8772 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -35,6 +35,7 @@ #define PerlIO FILE #endif +#include #include "EXTERN.h" #include "perl.h" @@ -46,7 +47,6 @@ extern CPerlObj* pPerl; #include "Win32iop.h" #include -#include #ifndef __GNUC__ /* assert.h conflicts with #define of assert in perl.h */ #include @@ -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 f712928..bfca44a 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 */ +