]> granicus.if.org Git - curl/commitdiff
MSVC adjustment
authorYang Tse <yangsita@gmail.com>
Sun, 31 Aug 2008 12:12:35 +0000 (12:12 +0000)
committerYang Tse <yangsita@gmail.com>
Sun, 31 Aug 2008 12:12:35 +0000 (12:12 +0000)
docs/examples/10-at-a-time.c
docs/examples/anyauthput.c
docs/examples/fopen.c
docs/examples/ftpuploadresume.c
lib/easy.c

index 0b2a20ed8361be7b33043b8729a18df08da13cbe..13ff196c85cfcace499cdb7401a4f7db08fe4a31 100644 (file)
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
-#include <curl/multi.h>
-#ifdef WIN32
-#include <windows.h>
+#ifndef WIN32
+#  include <unistd.h>
 #endif
+#include <curl/multi.h>
 
 static const char *urls[] = {
   "http://www.microsoft.com",
index 41531f7aafc8b311de4127e21a842833e5a22a0b..11c9d3c77c88abaf1a2311ec4d079d9bf89bb28c 100644 (file)
@@ -9,10 +9,23 @@
  */
 
 #include <stdio.h>
-#include <stdint.h>
 #include <fcntl.h>
+#ifdef WIN32
+#  include <io.h>
+#else
+#  include <stdint.h>
+#  include <unistd.h>
+#endif
+#include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
+
+#ifdef _MSC_VER
+#  ifdef _WIN64
+     typedef __int64 intptr_t;
+#  else
+     typedef int intptr_t;
+#  endif
+#endif
 
 #include <curl/curl.h>
 
index 9801e15c15733dbad00b5036b33e1522f70ae65d..0a9e9e30d599968aac7a592efbf0e1ef5f511c0c 100644 (file)
@@ -45,7 +45,9 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <sys/time.h>
+#ifndef WIN32
+#  include <sys/time.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 
index d8d1c5b888b70c829c9d78d629fe0e3999091927..362711c330698f1bbb96ef72aa09e6ff2ee78639 100644 (file)
@@ -21,6 +21,9 @@
 
 #include <curl/curl.h>
 
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#  error _snscanf requires MSVC 7.0 or later.
+#endif
 
 /* The MinGW headers are missing a few Win32 function definitions,
    you shouldn't need this if you use VC++ */
index 0f6154448fa1d4e21439a7c20138b700e92bcfad..d83a88511bbcd746f32ad6c304c66f8580c3375e 100644 (file)
@@ -205,6 +205,10 @@ static long          init_flags;
 #define system_strdup strdup
 #endif
 
+#if defined(_MSC_VER) && defined(_DLL)
+#  pragma warning(disable:4232) /* MSVC extension, dllimport identity */
+#endif
+
 #ifndef __SYMBIAN32__
 /*
  * If a memory-using function (like curl_getenv) is used before
@@ -227,6 +231,10 @@ curl_strdup_callback Curl_cstrdup;
 curl_calloc_callback Curl_ccalloc;
 #endif
 
+#if defined(_MSC_VER) && defined(_DLL)
+#  pragma warning(default:4232) /* MSVC extension, dllimport identity */
+#endif
+
 /**
  * curl_global_init() globally initializes cURL given a bitwise set of the
  * different features of what to initialize.