]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: align some Windows sleep defines with each other
authorMarc Hoersken <info@marc-hoersken.de>
Wed, 4 Mar 2020 15:11:03 +0000 (16:11 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Wed, 4 Mar 2020 15:11:03 +0000 (16:11 +0100)
tests/libtest/lib1515.c
tests/libtest/lib1531.c
tests/server/util.h

index c72554a3ba31bba6211acf89b9c7c8854d65e045..b879836f96422339777115f752f17db657b50ba3 100644 (file)
@@ -36,7 +36,7 @@
 #define DNS_TIMEOUT 1
 
 #if defined(WIN32) || defined(_WIN32)
-#define sleep(s) Sleep(s * 1000)
+#define sleep(sec) Sleep ((sec)*1000)
 #endif
 
 static int debug_callback(CURL *curl, curl_infotype info, char *msg,
index 4a4dc133ac74d346a2918c0d00fe81bbfc771e68..5c939955987714e8724dd9c30f19bcc79877a596 100644 (file)
@@ -107,7 +107,7 @@ int test(char *URL)
        curl_multi_fdset() doc. */
 
     if(maxfd == -1) {
-#ifdef _WIN32
+#if defined(WIN32) || defined(_WIN32)
       Sleep(100);
       rc = 0;
 #else
index 7b4ec162677bcdf64317323fbb0e8b126a828457..236d4550e00bf79b128e46f97fffb2846f2217cf 100644 (file)
@@ -37,16 +37,16 @@ extern const char *path;
 /* global variable, log file name */
 extern const char *serverlogfile;
 
-#ifdef WIN32
+#if defined(WIN32) || defined(_WIN32)
 #include <process.h>
 #include <fcntl.h>
 
-#define sleep(sec)   Sleep ((sec)*1000)
+#define sleep(sec) Sleep ((sec)*1000)
 
 #undef perror
 #define perror(m) win32_perror(m)
 void win32_perror(const char *msg);
-#endif  /* WIN32 */
+#endif  /* WIN32 or _WIN32 */
 
 #ifdef USE_WINSOCK
 void win32_init(void);