diff options
-rw-r--r-- | src/examples/authorization_example.c | 6 | ||||
-rw-r--r-- | src/include/platform.h | 2 | ||||
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_get.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_get_response_cleanup.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_iplimit.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_post.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_termination.c | 7 | ||||
-rw-r--r-- | src/testcurl/test_urlparse.c | 7 | ||||
-rw-r--r-- | src/testspdy/test_proxies.c | 7 | ||||
-rw-r--r-- | src/testzzuf/socat.c | 7 |
11 files changed, 67 insertions, 4 deletions
diff --git a/src/examples/authorization_example.c b/src/examples/authorization_example.c index bb480267..39dd3966 100644 --- a/src/examples/authorization_example.c +++ b/src/examples/authorization_example.c | |||
@@ -25,6 +25,12 @@ | |||
25 | 25 | ||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include <microhttpd.h> | 27 | #include <microhttpd.h> |
28 | #ifdef _WIN32 | ||
29 | #ifndef WIN32_LEAN_AND_MEAN | ||
30 | #define WIN32_LEAN_AND_MEAN 1 | ||
31 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
32 | #include <windows.h> | ||
33 | #endif | ||
28 | 34 | ||
29 | #define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" | 35 | #define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" |
30 | 36 | ||
diff --git a/src/include/platform.h b/src/include/platform.h index 1ee0ee1c..84c381d7 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -120,6 +120,8 @@ | |||
120 | 120 | ||
121 | #if defined(_WIN32) && !defined(__CYGWIN__) | 121 | #if defined(_WIN32) && !defined(__CYGWIN__) |
122 | #include <ws2tcpip.h> | 122 | #include <ws2tcpip.h> |
123 | #define sleep(seconds) (SleepEx((seconds)*1000, 1)/1000) | ||
124 | #define usleep(useconds) (void)SleepEx((useconds)/1000, 1) | ||
123 | #endif | 125 | #endif |
124 | 126 | ||
125 | #ifndef MHD_SOCKET_DEFINED | 127 | #ifndef MHD_SOCKET_DEFINED |
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index f8f3c99d..0e304327 100644 --- a/src/testcurl/https/test_https_time_out.c +++ b/src/testcurl/https/test_https_time_out.c | |||
@@ -31,6 +31,13 @@ | |||
31 | #include "tls_test_common.h" | 31 | #include "tls_test_common.h" |
32 | #include <gcrypt.h> | 32 | #include <gcrypt.h> |
33 | 33 | ||
34 | #ifdef _WIN32 | ||
35 | #ifndef WIN32_LEAN_AND_MEAN | ||
36 | #define WIN32_LEAN_AND_MEAN 1 | ||
37 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
38 | #include <windows.h> | ||
39 | #endif | ||
40 | |||
34 | extern const char srv_key_pem[]; | 41 | extern const char srv_key_pem[]; |
35 | extern const char srv_self_signed_cert_pem[]; | 42 | extern const char srv_self_signed_cert_pem[]; |
36 | 43 | ||
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index 855a0742..6043fe3c 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -34,8 +34,11 @@ | |||
34 | #include <string.h> | 34 | #include <string.h> |
35 | #include <time.h> | 35 | #include <time.h> |
36 | 36 | ||
37 | #ifdef __MINGW32__ | 37 | #ifdef _WIN32 |
38 | #define usleep(usec) (Sleep ((usec) / 1000),0) | 38 | #ifndef WIN32_LEAN_AND_MEAN |
39 | #define WIN32_LEAN_AND_MEAN 1 | ||
40 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
41 | #include <windows.h> | ||
39 | #endif | 42 | #endif |
40 | 43 | ||
41 | #ifndef WINDOWS | 44 | #ifndef WINDOWS |
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c index 81615766..39d7ece6 100644 --- a/src/testcurl/test_get_response_cleanup.c +++ b/src/testcurl/test_get_response_cleanup.c | |||
@@ -41,6 +41,13 @@ | |||
41 | #include <unistd.h> | 41 | #include <unistd.h> |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #ifdef _WIN32 | ||
45 | #ifndef WIN32_LEAN_AND_MEAN | ||
46 | #define WIN32_LEAN_AND_MEAN 1 | ||
47 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
48 | #include <windows.h> | ||
49 | #endif | ||
50 | |||
44 | #define TESTSTR "/* DO NOT CHANGE THIS LINE */" | 51 | #define TESTSTR "/* DO NOT CHANGE THIS LINE */" |
45 | 52 | ||
46 | static int oneone; | 53 | static int oneone; |
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c index 0b2b9b6c..cf06a972 100644 --- a/src/testcurl/test_iplimit.c +++ b/src/testcurl/test_iplimit.c | |||
@@ -37,6 +37,13 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef _WIN32 | ||
41 | #ifndef WIN32_LEAN_AND_MEAN | ||
42 | #define WIN32_LEAN_AND_MEAN 1 | ||
43 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
44 | #include <windows.h> | ||
45 | #endif | ||
46 | |||
40 | static int oneone; | 47 | static int oneone; |
41 | 48 | ||
42 | struct CBC | 49 | struct CBC |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index f735c630..a0be0f94 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -36,6 +36,13 @@ | |||
36 | #include <unistd.h> | 36 | #include <unistd.h> |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifdef _WIN32 | ||
40 | #ifndef WIN32_LEAN_AND_MEAN | ||
41 | #define WIN32_LEAN_AND_MEAN 1 | ||
42 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
43 | #include <windows.h> | ||
44 | #endif | ||
45 | |||
39 | #define POST_DATA "name=daniel&project=curl" | 46 | #define POST_DATA "name=daniel&project=curl" |
40 | 47 | ||
41 | static int oneone; | 48 | static int oneone; |
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c index 36e81fdc..5af907a0 100644 --- a/src/testcurl/test_termination.c +++ b/src/testcurl/test_termination.c | |||
@@ -41,6 +41,13 @@ | |||
41 | #include <sys/socket.h> | 41 | #include <sys/socket.h> |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #ifdef _WIN32 | ||
45 | #ifndef WIN32_LEAN_AND_MEAN | ||
46 | #define WIN32_LEAN_AND_MEAN 1 | ||
47 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
48 | #include <windows.h> | ||
49 | #endif | ||
50 | |||
44 | static int | 51 | static int |
45 | connection_handler (void *cls, | 52 | connection_handler (void *cls, |
46 | struct MHD_Connection *connection, | 53 | struct MHD_Connection *connection, |
diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c index 8a809073..0f87ac4d 100644 --- a/src/testcurl/test_urlparse.c +++ b/src/testcurl/test_urlparse.c | |||
@@ -32,8 +32,11 @@ | |||
32 | #include <string.h> | 32 | #include <string.h> |
33 | #include <time.h> | 33 | #include <time.h> |
34 | 34 | ||
35 | #ifdef __MINGW32__ | 35 | #ifdef _WIN32 |
36 | #define usleep(usec) (Sleep ((usec) / 1000),0) | 36 | #ifndef WIN32_LEAN_AND_MEAN |
37 | #define WIN32_LEAN_AND_MEAN 1 | ||
38 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
39 | #include <windows.h> | ||
37 | #endif | 40 | #endif |
38 | 41 | ||
39 | #ifndef WINDOWS | 42 | #ifndef WINDOWS |
diff --git a/src/testspdy/test_proxies.c b/src/testspdy/test_proxies.c index 38d5f3cb..751c2a7a 100644 --- a/src/testspdy/test_proxies.c +++ b/src/testspdy/test_proxies.c | |||
@@ -34,6 +34,13 @@ | |||
34 | #include <sys/wait.h> /* pid_t */ | 34 | #include <sys/wait.h> /* pid_t */ |
35 | #include "common.h" | 35 | #include "common.h" |
36 | 36 | ||
37 | #ifdef _WIN32 | ||
38 | #ifndef WIN32_LEAN_AND_MEAN | ||
39 | #define WIN32_LEAN_AND_MEAN 1 | ||
40 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
41 | #include <windows.h> | ||
42 | #endif | ||
43 | |||
37 | #define EXPECTED_BODY "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" | 44 | #define EXPECTED_BODY "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" |
38 | 45 | ||
39 | 46 | ||
diff --git a/src/testzzuf/socat.c b/src/testzzuf/socat.c index e4559a02..9b351197 100644 --- a/src/testzzuf/socat.c +++ b/src/testzzuf/socat.c | |||
@@ -29,6 +29,13 @@ | |||
29 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
30 | #include <signal.h> | 30 | #include <signal.h> |
31 | 31 | ||
32 | #ifdef _WIN32 | ||
33 | #ifndef WIN32_LEAN_AND_MEAN | ||
34 | #define WIN32_LEAN_AND_MEAN 1 | ||
35 | #endif /* !WIN32_LEAN_AND_MEAN */ | ||
36 | #include <windows.h> | ||
37 | #endif | ||
38 | |||
32 | 39 | ||
33 | /** | 40 | /** |
34 | * A larger loop count will run more random tests -- | 41 | * A larger loop count will run more random tests -- |