From dcd470b6ab92b8e2661872de298de78de1b5057b Mon Sep 17 00:00:00 2001
From: Jim Egerton <jegerton@akamai.com>
Date: Mon, 23 Mar 2015 18:02:42 -0400
Subject: [PATCH 11/26] Support for vc10 build

Includes some changes for VC9 and VC7 compiles as well

(cherry picked from commit b225c773020eea0265d221a5d0dc77772cd25bf9)
---
 e_os.h        | 5 +++++
 util/mk1mf.pl | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/e_os.h b/e_os.h
index a24eb90..fac0d35 100644
--- a/e_os.h
+++ b/e_os.h
@@ -133,6 +133,11 @@ extern "C" {
 #  define clear_socket_error()    WSASetLastError(0)
 #  define readsocket(s,b,n)       recv((s),(b),(n),0)
 #  define writesocket(s,b,n)      send((s),(b),(n),0)
+#  if (_MSC_VER < 1600) /* pre VC10 */
+#   define EADDRINUSE   WSAEADDRINUSE
+#  else                 /* VC10 and later */
+#   define snprintf     _snprintf
+#  endif
 # elif defined(__DJGPP__)
 #  define WATT32
 #  define get_last_socket_error() errno
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 00a3efe..810408b 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -102,6 +102,9 @@ $infile="MINFO";
 	"VC-WIN64A",  "Microsoft C/C++ - Win64/x64",
 	"VC-CE",   "Microsoft eMbedded Visual C++ 3.0 - Windows CE ONLY",
 	"VC-NT",   "Microsoft Visual C++ [4-6] - Windows NT ONLY",
+	"VC-NT-VC7",  "Microsoft Visual C++ [4-6] - Windows NT ONLY",
+	"VC-NT-VC9",  "Microsoft Visual C++ [4-6] - Windows NT ONLY",
+	"VC-NT-VC10", "Microsoft Visual C++ [4-6] - Windows NT ONLY",
 	"Mingw32", "GNU C++ - Windows NT or 9x",
 	"Mingw32-files", "Create files with DOS copy ...",
 	"BC-NT",   "Borland C++ 4.5 - Windows NT",
-- 
2.3.2 (Apple Git-55)

