loader: explicitly check for architecture

André Hentschel nerv at dawncrow.de
Sun Dec 19 15:45:55 CST 2010


otherwise you might get a warning if you anyway compile it(even if that's bad of course):
warning: integer constant is too large for ‘long’ type
---
 loader/preloader.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/loader/preloader.c b/loader/preloader.c
index 995cf59..32bb3a0 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -113,11 +113,13 @@ static struct wine_preload_info preload_info[] =
     { (void *)0x00010000, 0x00100000 },  /* DOS area */
     { (void *)0x00110000, 0x67ef0000 },  /* low memory area */
     { (void *)0x7f000000, 0x03000000 },  /* top-down allocations + shared heap + virtual heap */
-#else
+#elif defined(__x86_64__)
     { (void *)0x000000010000, 0x00100000 },  /* DOS area */
     { (void *)0x000000110000, 0x67ef0000 },  /* low memory area */
     { (void *)0x00007ff00000, 0x000f0000 },  /* shared user data */
     { (void *)0x7ffffe000000, 0x01ff0000 },  /* top-down allocations + virtual heap */
+#else
+#error preloader not implemented for this CPU
 #endif
     { 0, 0 },                            /* PE exe range set with WINEPRELOADRESERVE */
     { 0, 0 }                             /* end of list */
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list