# HG changeset patch # User Matt Mackall # Date 2015-03-25 19:16:10 # Node ID 98042b0e19f9a04be3270cecb07915eac3a515cf # Parent e2ed40f0eb2edb73ea576ef06727f8e642b438ef manifest: move C bool polyfill into util.h diff --git a/mercurial/manifest.c b/mercurial/manifest.c --- a/mercurial/manifest.c +++ b/mercurial/manifest.c @@ -14,15 +14,6 @@ #include "util.h" -/* VC9 doesn't include bool and lacks stdbool.h based on my searching */ -#ifdef _MSC_VER -#define true 1 -#define false 0 -typedef unsigned char bool; -#else -#include -#endif - #define DEFAULT_LINES 100000 typedef struct { diff --git a/mercurial/util.h b/mercurial/util.h --- a/mercurial/util.h +++ b/mercurial/util.h @@ -209,4 +209,13 @@ static inline double getbefloat64(const return ret; } +/* VC9 doesn't include bool and lacks stdbool.h based on my searching */ +#ifdef _MSC_VER +#define true 1 +#define false 0 +typedef unsigned char bool; +#else +#include +#endif + #endif /* _HG_UTIL_H_ */