OLD | NEW |
| (Empty) |
1 diff --git a/nspr/pr/src/threads/combined/pruthr.c b/nspr/pr/src/threads/combine
d/pruthr.c | |
2 index 825ed89..4fb8765 100644 | |
3 --- a/nspr/pr/src/threads/combined/pruthr.c | |
4 +++ b/nspr/pr/src/threads/combined/pruthr.c | |
5 @@ -73,13 +73,13 @@ void _PR_InitThreads(PRThreadType type, PRThreadPriority pri
ority, | |
6 #ifndef HAVE_CUSTOM_USER_THREADS | |
7 stack = PR_NEWZAP(PRThreadStack); | |
8 #ifdef HAVE_STACK_GROWING_UP | |
9 - stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift) | |
10 + stack->stackTop = (char*) ((((intptr_t)&type) >> _pr_pageShift) | |
11 << _pr_pageShift); | |
12 #else | |
13 #if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS) | |
14 stack->stackTop = (char*) &thread; | |
15 #else | |
16 - stack->stackTop = (char*) ((((long)&type + _pr_pageSize - 1) | |
17 + stack->stackTop = (char*) ((((intptr_t)&type + _pr_pageSize - 1) | |
18 >> _pr_pageShift) << _pr_pageShift); | |
19 #endif | |
20 #endif | |
21 @@ -174,12 +174,12 @@ static void _PR_InitializeNativeStack(PRThreadStack *ts) | |
22 ** Setup stackTop and stackBottom values. | |
23 */ | |
24 #ifdef HAVE_STACK_GROWING_UP | |
25 - ts->allocBase = (char*) ((((long)&ts) >> _pr_pageShift) | |
26 + ts->allocBase = (char*) ((((intptr_t)&ts) >> _pr_pageShift) | |
27 << _pr_pageShift); | |
28 ts->stackBottom = ts->allocBase + ts->stackSize; | |
29 ts->stackTop = ts->allocBase; | |
30 #else | |
31 - ts->allocBase = (char*) ((((long)&ts + _pr_pageSize - 1) | |
32 + ts->allocBase = (char*) ((((intptr_t)&ts + _pr_pageSize - 1) | |
33 >> _pr_pageShift) << _pr_pageShift); | |
34 ts->stackTop = ts->allocBase; | |
35 ts->stackBottom = ts->allocBase - ts->stackSize; | |
OLD | NEW |