aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-18 12:53:05 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-18 12:53:05 +0000
commit1dc5bf4f73703f7a7ba0f846b183660b44130d50 (patch)
tree38e581ad252818420b45d23c76cfbe92bfadcb8d /lib
parent01cfe670c5a78c59ba5a81212f9cd2a3deb9614b (diff)
#ifndef and #define magic to prevent compiler warnings when doing #if BLA
where BLA is undefined
Diffstat (limited to 'lib')
-rw-r--r--lib/mprintf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 6ca74f3fb..ffe645108 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -38,6 +38,15 @@
#include <ctype.h>
#include <string.h>
+#ifndef SIZEOF_LONG_LONG
+/* prevents warnings on picky compilers */
+#define SIZEOF_LONG_LONG 0
+#endif
+#ifndef SIZEOF_LONG_DOUBLE
+#define SIZEOF_LONG_DOUBLE 0
+#endif
+
+
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
@@ -1129,7 +1138,7 @@ int main()
{
char buffer[129];
char *ptr;
-#ifdef SIZEOF_LONG_LONG
+#if SIZEOF_LONG_LONG>0
long long hullo;
dprintf("%3$12s %1$s %2$qd %4$d\n", "daniel", hullo, "stenberg", 65);
#endif