From 39ee719d76c9c3522a0e51d2507f826bf9692a80 Mon Sep 17 00:00:00 2001 From: Joseph Heenan Date: Sat, 4 Oct 2014 08:08:57 -0500 Subject: Avoid redefinition warning from clang when building cmapdump.c In file included from scripts/cmapdump.c:19: scripts/../source/fitz/ftoa.c:30:23: warning: redefinition of typedef 'ulong' is a C11 feature [-Wtypedef-redefinition] typedef unsigned long ulong; ^ scripts/../source/fitz/strtod.c:30:23: note: previous definition is here typedef unsigned long ulong; ^ 1 warning generated. (Apparently in earlier versions of clang this is an error.) --- source/fitz/ftoa.c | 3 +++ source/fitz/strtod.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/fitz/ftoa.c b/source/fitz/ftoa.c index dc3ce73b..47759425 100644 --- a/source/fitz/ftoa.c +++ b/source/fitz/ftoa.c @@ -27,7 +27,10 @@ #define NAN (INFINITY-INFINITY) #endif +#ifndef DEFINED_ULONG +#define DEFINED_ULONG typedef unsigned long ulong; +#endif enum { NSIGNIF = 9 }; diff --git a/source/fitz/strtod.c b/source/fitz/strtod.c index f548b6f3..7ab30fb2 100644 --- a/source/fitz/strtod.c +++ b/source/fitz/strtod.c @@ -27,7 +27,10 @@ #define NAN (INFINITY-INFINITY) #endif +#ifndef DEFINED_ULONG +#define DEFINED_ULONG typedef unsigned long ulong; +#endif static ulong umuldiv(ulong a, ulong b, ulong c) -- cgit v1.2.3