From: Stefan Weil Date: Sat, 14 May 2011 23:38:04 +0000 (+0000) Subject: w32: Fix compilation and replace non-portable usage of ulong X-Git-Tag: v0.15.0-rc0~255^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d42fb313bc517f1b23daea867efb9968874745e;p=thirdparty%2Fqemu.git w32: Fix compilation and replace non-portable usage of ulong ulong is undefined for w32 (and maybe other) compilations. Replace it by uintptr_t (which also fixes compilation for w64 and is a better choice for pointer to integer conversions). Cc: Aurelien Jarno Signed-off-by: Stefan Weil Reviewed-by: Aurelien Jarno Signed-off-by: Alexander Graf --- diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 7a6a7dfa57d..8e4582f6abf 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1929,8 +1929,8 @@ static inline void cpu_set_tls(CPUState *env, target_ulong newtls) #if !defined(CONFIG_USER_ONLY) static inline int booke206_tlbe_id(CPUState *env, ppcemb_tlb_t *tlbe) { - ulong tlbel = (ulong)tlbe; - ulong tlbl = (ulong)env->tlb; + uintptr_t tlbel = (uintptr_t)tlbe; + uintptr_t tlbl = (uintptr_t)env->tlb; return (tlbel - tlbl) / sizeof(env->tlb[0]); }