Fossil SCM

include <winsock2.h> before <ws2tcpip.h> whenever needed. Thanks to Konstantin Khomoutov for reporting this.

jan.nijtmans 2012-12-14 11:50 UTC trunk
Commit 0658068a237b8a5c3bc9df61e1b40f15da53b8ef
2 files changed +1 +2 -4
+1
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,11 @@
2121
** formatting function and its cousins, and routines to encode and
2222
** decode strings in HTML or HTTP.
2323
*/
2424
#include "config.h"
2525
#ifdef _WIN32
26
+# include <winsock2.h>
2627
# include <ws2tcpip.h>
2728
#else
2829
# include <sys/socket.h>
2930
# include <netinet/in.h>
3031
# include <arpa/inet.h>
3132
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,11 @@
21 ** formatting function and its cousins, and routines to encode and
22 ** decode strings in HTML or HTTP.
23 */
24 #include "config.h"
25 #ifdef _WIN32
 
26 # include <ws2tcpip.h>
27 #else
28 # include <sys/socket.h>
29 # include <netinet/in.h>
30 # include <arpa/inet.h>
31
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,11 @@
21 ** formatting function and its cousins, and routines to encode and
22 ** decode strings in HTML or HTTP.
23 */
24 #include "config.h"
25 #ifdef _WIN32
26 # include <winsock2.h>
27 # include <ws2tcpip.h>
28 #else
29 # include <sys/socket.h>
30 # include <netinet/in.h>
31 # include <arpa/inet.h>
32
--- src/http_socket.c
+++ src/http_socket.c
@@ -27,14 +27,12 @@
2727
*/
2828
2929
#include "config.h"
3030
#include "http_socket.h"
3131
#if defined(_WIN32)
32
-# if defined(__MINGW32__)
33
-# include <ws2tcpip.h>
34
-# endif
35
-# include <windows.h>
32
+# include <winsock2.h>
33
+# include <ws2tcpip.h>
3634
#else
3735
# include <netinet/in.h>
3836
# include <arpa/inet.h>
3937
# include <sys/socket.h>
4038
# include <netdb.h>
4139
--- src/http_socket.c
+++ src/http_socket.c
@@ -27,14 +27,12 @@
27 */
28
29 #include "config.h"
30 #include "http_socket.h"
31 #if defined(_WIN32)
32 # if defined(__MINGW32__)
33 # include <ws2tcpip.h>
34 # endif
35 # include <windows.h>
36 #else
37 # include <netinet/in.h>
38 # include <arpa/inet.h>
39 # include <sys/socket.h>
40 # include <netdb.h>
41
--- src/http_socket.c
+++ src/http_socket.c
@@ -27,14 +27,12 @@
27 */
28
29 #include "config.h"
30 #include "http_socket.h"
31 #if defined(_WIN32)
32 # include <winsock2.h>
33 # include <ws2tcpip.h>
 
 
34 #else
35 # include <netinet/in.h>
36 # include <arpa/inet.h>
37 # include <sys/socket.h>
38 # include <netdb.h>
39

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button