Index: nspr/pr/src/threads/combined/pruthr.c |
=================================================================== |
--- nspr/pr/src/threads/combined/pruthr.c (revision 293124) |
+++ nspr/pr/src/threads/combined/pruthr.c (working copy) |
@@ -73,13 +73,13 @@ |
#ifndef HAVE_CUSTOM_USER_THREADS |
stack = PR_NEWZAP(PRThreadStack); |
#ifdef HAVE_STACK_GROWING_UP |
- stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift) |
+ stack->stackTop = (char*) ((((intptr_t)&type) >> _pr_pageShift) |
wtc
2014/12/01 18:34:02
In the NSPR upstream, I changed intptr_t to PRWord
|
<< _pr_pageShift); |
#else |
#if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS) |
stack->stackTop = (char*) &thread; |
#else |
- stack->stackTop = (char*) ((((long)&type + _pr_pageSize - 1) |
+ stack->stackTop = (char*) ((((intptr_t)&type + _pr_pageSize - 1) |
>> _pr_pageShift) << _pr_pageShift); |
#endif |
#endif |
@@ -174,12 +174,12 @@ |
** Setup stackTop and stackBottom values. |
*/ |
#ifdef HAVE_STACK_GROWING_UP |
- ts->allocBase = (char*) ((((long)&ts) >> _pr_pageShift) |
+ ts->allocBase = (char*) ((((intptr_t)&ts) >> _pr_pageShift) |
<< _pr_pageShift); |
ts->stackBottom = ts->allocBase + ts->stackSize; |
ts->stackTop = ts->allocBase; |
#else |
- ts->allocBase = (char*) ((((long)&ts + _pr_pageSize - 1) |
+ ts->allocBase = (char*) ((((intptr_t)&ts + _pr_pageSize - 1) |
>> _pr_pageShift) << _pr_pageShift); |
ts->stackTop = ts->allocBase; |
ts->stackBottom = ts->allocBase - ts->stackSize; |