wpp supports long long constants if configure says they are available.

Bill Medland billmedland at mercuryspeed.com
Tue Apr 25 19:57:24 CDT 2006


Bill Medland (billmedland at mercuryspeed.com)
Support long long constants if the configure says long long is available

Index: wine/libs/wpp/ppl.l
===================================================================
RCS file: /home/wine/wine/libs/wpp/ppl.l,v
retrieving revision 1.10
diff -u -r1.10 ppl.l
--- wine/libs/wpp/ppl.l 21 Apr 2006 11:17:41 -0000 1.10
+++ wine/libs/wpp/ppl.l 26 Apr 2006 00:54:14 -0000
@@ -823,7 +823,7 @@
  if(is_ll)
  {
 /* Assume as in the declaration of wrc_ull_t and wrc_sll_t */
-#if defined(SIZEOF_LONGLONG) && SIZEOF_LONGLONG >= 8
+#if defined(HAVE_LONG_LONG)
   if (is_u)
   {
    val->ull = strtoull(str, NULL, radix);
Index: wine/libs/wpp/wpp_private.h
===================================================================
RCS file: /home/wine/wine/libs/wpp/wpp_private.h,v
retrieving revision 1.3
diff -u -r1.3 wpp_private.h
--- wine/libs/wpp/wpp_private.h	10 Oct 2005 18:06:50 -0000	1.3
+++ wine/libs/wpp/wpp_private.h	26 Apr 2006 00:54:14 -0000
@@ -23,6 +23,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <config.h>
+
 struct pp_entry;	/* forward */
 /*
  * Include logic
@@ -133,14 +135,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
+#if defined(HAVE_LONG_LONG)
 typedef long long wrc_sll_t;
 typedef unsigned long long wrc_ull_t;
 #else



More information about the wine-patches mailing list