get sources building on windows+MSVC again (untested with other
Gurusamy Sarathy [Thu, 23 Nov 2000 02:18:38 +0000 (02:18 +0000)]
compilers)

p4raw-id: //depot/perl@7827

win32/include/sys/socket.h
win32/perllib.c

index 194de95..e83fd2b 100644 (file)
 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
 
index 48843f9..3b57efb 100644 (file)
@@ -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)