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

Patch from falk@debian.org, r=darin, sr+a=shaver.
This commit is contained in:
shaver%mozilla.org 2005-07-20 13:12:13 +00:00
Родитель 7827f6a2a4
Коммит cb9a437785
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

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