diff options
author | wtc%netscape.com <devnull@localhost> | 1998-08-10 23:38:38 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1998-08-10 23:38:38 +0000 |
commit | 9cb8995332c41b7e9eebcc78efff05f1d5895eec (patch) | |
tree | 1cfa95b8d7402a849b60386a6a44c79d66770518 | |
parent | 5f262152c2bc8930be0797f8df33439961f6a387 (diff) | |
download | nspr-hg-9cb8995332c41b7e9eebcc78efff05f1d5895eec.tar.gz |
The local threads don't work on RedHat 5.1 Sparc Linux (with glibc2).
I suspect it's because glibc2's setjmp/longjmp (Sparc version) does
not allow us to modify the jmp_buf. So I added some comments and
a #error directive to force the build to fail.
-rw-r--r-- | pr/include/md/_linux.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h index 548d4a92..32305c2f 100644 --- a/pr/include/md/_linux.h +++ b/pr/include/md/_linux.h @@ -129,11 +129,29 @@ extern void _MD_CleanupBeforeExit(void); #elif defined(__sparc__) /* Sparc */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +/* + * FIXME: The setjmp/longjmp approach works in Red Hat 4.2 but + * not in Red Hat 5.1 for Linux/Sparc. We should talk to the + * maintainer of Linux/Sparc glibc2 about this. Or we can write + * assembly code to save and restore thread contexts. Before + * this problem is solved, you can build the pthreads version. + * Set the environment variable USE_PTHREADS to 1 before you + * build. + */ +#error "Please see comments in pr/include/md/_linux.h" +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[JB_SP] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[JB_FP] = val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[JB_FP]) +#define _MD_SP_TYPE int +#else #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__fp #define _MD_SET_FP(_t, val) #define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) #define _MD_GET_FP_PTR(_t) ((void *) 0) #define _MD_SP_TYPE __ptr_t +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ #elif defined(__i386__) /* Intel based Linux */ |