SDL_net: Reenable building with MSVC6 (#128)

From 641475e9a3df93b5396d23f502afec6d6a4d0a6c Mon Sep 17 00:00:00 2001
From: ElpisActual <[EMAIL REDACTED]>
Date: Mon, 21 Apr 2025 17:51:01 +1000
Subject: [PATCH] Reenable building with MSVC6 (#128)

---
 SDLnetsys.h         |   4 ++
 VisualC/SDL_net.dsp | 119 ++++++++++++++++++++++++++++++++++++++++++++
 VisualC/SDL_net.dsw |  29 +++++++++++
 3 files changed, 152 insertions(+)
 create mode 100644 VisualC/SDL_net.dsp
 create mode 100644 VisualC/SDL_net.dsw

diff --git a/SDLnetsys.h b/SDLnetsys.h
index 44db17e..33e9e0b 100644
--- a/SDLnetsys.h
+++ b/SDLnetsys.h
@@ -73,6 +73,10 @@ typedef int socklen_t;
 typedef Uint32 socklen_t;
 #endif
 
+#if defined(__USE_W32_SOCKETS) && !defined(IP_MSFILTER_SIZE)
+typedef int socklen_t;
+#endif
+
 /* System-dependent definitions */
 #ifndef __USE_W32_SOCKETS
 #ifdef __OS2__
diff --git a/VisualC/SDL_net.dsp b/VisualC/SDL_net.dsp
new file mode 100644
index 0000000..6804b71
--- /dev/null
+++ b/VisualC/SDL_net.dsp
@@ -0,0 +1,119 @@
+# Microsoft Developer Studio Project File - Name="SDL_net" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=SDL_net - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "SDL_net.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "SDL_net.mak" CFG="SDL_net - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "SDL_net - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "SDL_net - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "SDL_net - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib SDL.lib /nologo /subsystem:windows /dll /machine:I386
+
+!ELSEIF  "$(CFG)" == "SDL_net - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib SDL.lib iphlpapi.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "SDL_net - Win32 Release"
+# Name "SDL_net - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\SDL_net.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\SDLnet.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\SDLnetselect.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\SDLnetsys.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\SDLnetTCP.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\SDLnetUDP.c
+# End Source File
+# Begin Source File
+
+SOURCE=Version.rc
+# End Source File
+# End Target
+# End Project
diff --git a/VisualC/SDL_net.dsw b/VisualC/SDL_net.dsw
new file mode 100644
index 0000000..1e16492
--- /dev/null
+++ b/VisualC/SDL_net.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "SDL_net"=.\SDL_net.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+