#ifdef WIN32
# include <io.h>
#else
-# include <stdint.h>
+# ifndef __VMS
+# include <stdint.h>
+# endif
# include <unistd.h>
#endif
#include <sys/types.h>
/* 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 */
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");
/* 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 */
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;