wpp: Support long long constants if configure says long long is available
diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index 990fbb1..409706e 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -156,6 +156,7 @@
ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL]
%{
+#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -823,7 +824,7 @@
if(is_ll)
{
/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */
-#if defined(SIZEOF_LONGLONG) && SIZEOF_LONGLONG >= 8
+#ifdef HAVE_LONG_LONG
if (is_u)
{
val->ull = strtoull(str, NULL, radix);
diff --git a/libs/wpp/wpp_private.h b/libs/wpp/wpp_private.h
index fe60f65..d8a752a 100644
--- a/libs/wpp/wpp_private.h
+++ b/libs/wpp/wpp_private.h
@@ -20,6 +20,10 @@
#ifndef __WINE_WPP_PRIVATE_H
#define __WINE_WPP_PRIVATE_H
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
+
#include <stdio.h>
#include <string.h>
@@ -133,14 +137,16 @@
/*
- * I assume that 'long long' exists in the compiler when it has a size
- * of 8 or bigger. If not, then we revert to a simple 'long' for now.
+ * If the configure says we have long long then we can use it. Presumably
+ * if we have long long then we have strtoull and strtoll too. If that is
+ * not the case we will need to add to the configure tests.
+ * If we do not have long long , then we revert to a simple 'long' for now.
* This should prevent most unexpected things with other compilers than
* gcc and egcs for now.
* In the future it should be possible to use another way, like a
* structure, so that we can emulate the MS compiler.
*/
-#if defined(SIZEOF_LONGLONG) && SIZEOF_LONGLONG >= 8
+#ifdef HAVE_LONG_LONG
typedef long long wrc_sll_t;
typedef unsigned long long wrc_ull_t;
#else