aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-31 12:12:35 +0000
committerYang Tse <yangsita@gmail.com>2008-08-31 12:12:35 +0000
commit79ffbf7fe1af3fb3d6a4a1ad31eeaaecb1dbd8e6 (patch)
treef32c0a37b801eba76087d9899cf0885d7edaf8e4 /docs/examples
parent4f0d286d2c24fd0104e4769f190277b39dc50474 (diff)
MSVC adjustment
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/10-at-a-time.c7
-rw-r--r--docs/examples/anyauthput.c17
-rw-r--r--docs/examples/fopen.c4
-rw-r--r--docs/examples/ftpuploadresume.c3
4 files changed, 24 insertions, 7 deletions
diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c
index 0b2a20ed8..13ff196c8 100644
--- a/docs/examples/10-at-a-time.c
+++ b/docs/examples/10-at-a-time.c
@@ -16,11 +16,10 @@
#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",
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 41531f7aa..11c9d3c77 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -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>
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index 9801e15c1..0a9e9e30d 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -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>
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index d8d1c5b88..362711c33 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -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++ */