[Mesa-dev] [PATCH] fix compilation of glsl_lexer.ll with msvc
Morgan Armand
morgan.devel at gmail.com
Sat Oct 29 01:42:57 PDT 2011
strtoull is not supported on msvc (as there is no C99 support).
---
src/glsl/glsl_lexer.ll | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index e444536..00065d5 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -93,7 +93,11 @@ literal_integer(char *text, int len, struct
_mesa_glsl_parse_state *state,
if (base == 16)
digits += 2;
+#ifdef _MSC_VER
+ __int64 value = _strtoui64(digits, NULL, base);
+#else
unsigned long long value = strtoull(digits, NULL, base);
+#endif
lval->n = (int)value;
--
1.7.7.1.msysgit.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111029/7020ded3/attachment.html>
More information about the mesa-dev
mailing list