summaryrefslogtreecommitdiff
path: root/lib/setup-win32.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-09-29 08:16:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-09-29 10:42:49 +0200
commit180180a44d8e7a54b772af02eb90e0eab1c61d37 (patch)
treedc6559efeb0d2f911b8c781b4ab8499536136ec0 /lib/setup-win32.h
parent12246eddc5d844efec16141d259092fd69f89bc4 (diff)
downloadcurl-180180a44d8e7a54b772af02eb90e0eab1c61d37.tar.gz
Revert "build: remove checks for WinSock 1"
Due to CI issues This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc. Closes #7790
Diffstat (limited to 'lib/setup-win32.h')
-rw-r--r--lib/setup-win32.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/setup-win32.h b/lib/setup-win32.h
index 12d95e9d5..c35dec88c 100644
--- a/lib/setup-win32.h
+++ b/lib/setup-win32.h
@@ -25,11 +25,11 @@
/*
* Include header files for windows builds before redefining anything.
* Use this preprocessor block only to include or exclude windows.h,
- * winsock2.h or ws2tcpip.h. Any other windows thing belongs
+ * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
* to any other further and independent block. Under Cygwin things work
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
* never be included when __CYGWIN__ is defined. configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK2_H,
+ * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
* neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
*/
@@ -47,6 +47,10 @@
# ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
# endif
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
# endif
# include <tchar.h>
# ifdef UNICODE
@@ -63,6 +67,10 @@
#ifdef HAVE_WINSOCK2_H
# define USE_WINSOCK 2
+#else
+# ifdef HAVE_WINSOCK_H
+# error "WinSock version 1 is no longer supported, version 2 is required!"
+# endif
#endif
/*