changeset 24823:3550ccbafca2 stable

util.h: also sniff for C99 before trying to use stdbool.h (issue4605) stdbool.h isn't required until C99. Sigh.
author Augie Fackler <augie@google.com>
date Mon, 20 Apr 2015 14:47:51 -0400
parents 8678b1eafbcf
children 0325c0da05df
files mercurial/util.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.h	Mon Apr 20 17:16:22 2015 +0200
+++ b/mercurial/util.h	Mon Apr 20 14:47:51 2015 -0400
@@ -218,7 +218,7 @@
 
 #define MIN(a, b) (((a)<(b))?(a):(b))
 /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
-#ifdef _MSC_VER
+#ifdef _MSC_VER || __STDC_VERSION__ < 199901L
 #define true 1
 #define false 0
 typedef unsigned char bool;