summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/include/sys/socket.h37
-rw-r--r--win32/perllib.c2
2 files changed, 3 insertions, 36 deletions
diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index 194de9581f..e83fd2bd94 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -10,49 +10,14 @@
extern "C" {
#endif
-#ifndef _WINDOWS_
-#ifdef __GNUC__
#define WIN32_LEAN_AND_MEAN
#ifdef __GNUC__
-#define Win32_Winsock
+# define Win32_Winsock
#endif
#include <windows.h>
-#else
-#define _WINDOWS_
-
-#define FAR
-#define PASCAL __stdcall
-#define WINAPI __stdcall
-
-#undef WORD
-typedef int BOOL;
-typedef unsigned short WORD;
-typedef void* HANDLE;
-typedef void* HWND;
-typedef int (FAR WINAPI *FARPROC)();
-
-typedef unsigned long DWORD;
-typedef void *PVOID;
-
-#define IN
-#define OUT
-
-typedef struct _OVERLAPPED {
- DWORD Internal;
- DWORD InternalHigh;
- DWORD Offset;
- DWORD OffsetHigh;
- HANDLE hEvent;
-} OVERLAPPED, *LPOVERLAPPED;
-
-#endif
-#endif //_WINDOWS_
-// #ifndef __GNUC__
#include <winsock.h>
-// #endif
#define ENOTSOCK WSAENOTSOCK
-#undef HOST_NOT_FOUND
#ifdef USE_SOCKETS_AS_HANDLES
diff --git a/win32/perllib.c b/win32/perllib.c
index 48843f92da..3b57efba8d 100644
--- a/win32/perllib.c
+++ b/win32/perllib.c
@@ -371,7 +371,9 @@ DllMain(HANDLE hModule, /* DLL module handle */
* process termination or call to FreeLibrary.
*/
case DLL_PROCESS_DETACH:
+#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO)
PerlIO_cleanup();
+#endif
EndSockets();
#if defined(USE_THREADS) || defined(USE_ITHREADS)
if (PL_curinterp)