tAlways include winsock2.h before windows.h - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f62a14eaa3bee89cd73cefbaba018443efda20af
(DIR) parent d03514d9574c4a83ef37a8d0a11a9a350a311792
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sat, 7 Nov 2020 20:54:01 -0800
Always include winsock2.h before windows.h
Diffstat:
M src/cursesport/cursesport.h | 1 +
M src/error.c | 2 +-
M src/gtkport/clist.c | 1 +
M src/gtkport/gtkport.c | 2 +-
M src/gtkport/gtkport.h | 1 +
M src/gtkport/unicodewrap.c | 1 +
M src/gtkport/unicodewrap.h | 1 +
M src/network.c | 2 +-
M src/network.h | 1 +
M src/serverside.c | 2 +-
M src/util.h | 1 +
M src/winmain.c | 1 +
12 files changed, 12 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/src/cursesport/cursesport.h b/src/cursesport/cursesport.h
t@@ -29,6 +29,7 @@
#endif
#ifdef CYGWIN /* Definitions for native Win32 build */
+#include <winsock2.h>
#include <windows.h>
#include <string.h>
(DIR) diff --git a/src/error.c b/src/error.c
t@@ -28,8 +28,8 @@
#include <string.h> /* For strerror */
#ifdef CYGWIN
+#include <winsock2.h> /* For WSAxxx constants */
#include <windows.h> /* For FormatMessage() etc. */
-#include <winsock.h> /* For WSAxxx constants */
#else
#include <netdb.h> /* For h_errno error codes */
#endif
(DIR) diff --git a/src/gtkport/clist.c b/src/gtkport/clist.c
t@@ -28,6 +28,7 @@
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
#include <commctrl.h>
(DIR) diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c
t@@ -54,8 +54,8 @@ const gchar *GTK_STOCK_HELP = N_("_Help");
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
-#include <winsock.h>
#include <commctrl.h>
#include <richedit.h>
#include <shlwapi.h>
(DIR) diff --git a/src/gtkport/gtkport.h b/src/gtkport/gtkport.h
t@@ -31,6 +31,7 @@
/* GTK+ emulation prototypes etc. for Win32 platform */
+#include <winsock2.h>
#include <windows.h>
#include <glib.h>
#include <stdarg.h>
(DIR) diff --git a/src/gtkport/unicodewrap.c b/src/gtkport/unicodewrap.c
t@@ -25,6 +25,7 @@
#endif
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
#include <glib.h>
(DIR) diff --git a/src/gtkport/unicodewrap.h b/src/gtkport/unicodewrap.h
t@@ -28,6 +28,7 @@
#endif
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
#include <commctrl.h>
(DIR) diff --git a/src/network.c b/src/network.c
t@@ -27,8 +27,8 @@
#ifdef NETWORKING
#ifdef CYGWIN
+#include <winsock2.h> /* For network functions */
#include <windows.h> /* For datatypes such as BOOL */
-#include <winsock.h> /* For network functions */
#else
#include <sys/types.h> /* For size_t etc. */
#include <sys/socket.h> /* For struct sockaddr etc. */
(DIR) diff --git a/src/network.h b/src/network.h
t@@ -29,6 +29,7 @@
/* Various includes necessary for select() calls */
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
#else
#include <sys/types.h>
(DIR) diff --git a/src/serverside.c b/src/serverside.c
t@@ -30,8 +30,8 @@
#include <sys/stat.h>
#ifdef CYGWIN
+#include <winsock2.h> /* For network functions */
#include <windows.h> /* For datatypes such as BOOL */
-#include <winsock.h> /* For network functions */
#include <process.h> /* For getpid */
#else
#include <sys/socket.h> /* For struct sockaddr etc. */
(DIR) diff --git a/src/util.h b/src/util.h
t@@ -30,6 +30,7 @@
#include <stdio.h>
#ifdef CYGWIN /* Definitions for native Win32 build */
+#include <winsock2.h>
#include <windows.h>
#include <string.h>
(DIR) diff --git a/src/winmain.c b/src/winmain.c
t@@ -26,6 +26,7 @@
#ifdef CYGWIN
+#include <winsock2.h>
#include <windows.h>
#include <commctrl.h>
#include <glib.h>