Fix for building with MS Visual-C and single-threaded
authorGisle Vanem <gvanem@broadpark.no>
Sun, 2 Oct 2005 16:52:07 +0000 (16:52 +0000)
committerGisle Vanem <gvanem@broadpark.no>
Sun, 2 Oct 2005 16:52:07 +0000 (16:52 +0000)
runtime libs.

lib/hostthre.c
lib/setup.h

index a1204cf..c364ebf 100644 (file)
 /* The last #include file should be: */
 #include "memdebug.h"
 
+#if defined(_MSC_VER) && defined(CURL_NO__BEGINTHREADEX)
+#pragma message ("No _beginthreadex() available in this RTL")
+#endif
+
 /***********************************************************************
  * Only for Windows threaded name resolves builds
  **********************************************************************/
index 201e783..4b3a507 100644 (file)
@@ -262,6 +262,14 @@ typedef int curl_socket_t;
 #endif
 #endif
 
+/* "cl -ML" or "cl -MLd" implies a single-threaded runtime library where
+   _beginthreadex() is not available */
+#if defined(_MSC_VER) && !defined(_MT) && !defined(USE_ARES)
+#undef USE_THREADING_GETADDRINFO
+#undef USE_THREADING_GETHOSTBYNAME
+#define CURL_NO__BEGINTHREADEX
+#endif
+
 #ifdef mpeix
 #define IOCTL_3_ARGS
 #endif