aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/examples/anyauthput.c4
-rw-r--r--docs/examples/debug.c5
-rw-r--r--docs/examples/ftpupload.c2
-rw-r--r--docs/examples/multi-debugcallback.c7
4 files changed, 11 insertions, 7 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 11c9d3c77..dd5b5ddf7 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -13,7 +13,9 @@
#ifdef WIN32
# include <io.h>
#else
-# include <stdint.h>
+# ifndef __VMS
+# include <stdint.h>
+# endif
# include <unistd.h>
#endif
#include <sys/types.h>
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index 543a565eb..30ce820cc 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -29,11 +29,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
+ fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04zx: ", i);
+ fprintf(stream, "%04.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 76fc92ebb..a72792479 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
printf("Couldnt open '%s': %s\n", LOCAL_FILE, strerror(errno));
return 1;
}
- printf("Local file size: %ld bytes.\n", file_info.st_size);
+ printf("Local file size: %ld bytes.\n", (long)file_info.st_size);
/* get a FILE * of the same file */
hd_src = fopen(LOCAL_FILE, "rb");
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 6a7403a8a..22d26c774 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -38,11 +38,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
+ fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04zx: ", i);
+ fprintf(stream, "%04.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
@@ -74,7 +75,7 @@ void dump(const char *text,
static
int my_trace(CURL *handle, curl_infotype type,
- char *data, size_t size,
+ unsigned char *data, size_t size,
void *userp)
{
const char *text;