aboutsummaryrefslogtreecommitdiff
path: root/lib/mprintf.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-21 00:10:27 +0000
committerYang Tse <yangsita@gmail.com>2008-08-21 00:10:27 +0000
commit5794ffe4bd75b4d0086a11c222884405bdc35839 (patch)
tree48bdd733bff0a754638cc9c5da090fea51daf7e5 /lib/mprintf.c
parentceb49d3742e4c27fdd86f9a6b043bebf7f42deaa (diff)
Some data type size adjustments.
Diffstat (limited to 'lib/mprintf.c')
-rw-r--r--lib/mprintf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index f139c8da1..f9e0c8764 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -53,9 +53,12 @@
#define SIZEOF_LONG_DOUBLE 0
#endif
+/*
+ * If SIZEOF_SIZE_T has not been defined, default to the size of long.
+ */
+
#ifndef SIZEOF_SIZE_T
-/* default to 4 bytes for size_t unless defined in the config.h */
-#define SIZEOF_SIZE_T 4
+# define SIZEOF_SIZE_T CURL_SIZEOF_LONG
#endif
#ifdef HAVE_LONGLONG
@@ -409,14 +412,14 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
case 'z':
/* the code below generates a warning if -Wunreachable-code is
used */
-#if SIZEOF_SIZE_T>4
+#if (SIZEOF_SIZE_T > CURL_SIZEOF_LONG)
flags |= FLAGS_LONGLONG;
#else
flags |= FLAGS_LONG;
#endif
break;
case 'O':
-#if CURL_SIZEOF_CURL_OFF_T > 4
+#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
flags |= FLAGS_LONGLONG;
#else
flags |= FLAGS_LONG;