Bug 269823: invalid casts prevent compilation on 64-bit platforms with gcc4.

Patch from falk@debian.org, r=darin, sr+a=shaver.


git-svn-id: svn://10.0.0.236/trunk@176326 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shaver%mozilla.org 2005-07-20 13:12:13 +00:00
parent 859c29dd1b
commit 0656ce1457

View File

@ -420,8 +420,9 @@ typedef PRUint32 nsresult;
* Use these macros to do 64bit safe pointer conversions.
*/
#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
#define NS_PTR_TO_INT32(x) ((PRInt32) (PRWord) (x))
#define NS_PTR_TO_UINT32(x) ((PRUint32) (PRWord) (x))
#define NS_INT32_TO_PTR(x) ((void *) (PRWord) (x))
/*
* Use NS_STRINGIFY to form a string literal from the value of a macro.