diff options
author | Kean Johnson <kean@armory.com> | 2005-11-08 06:33:25 +0000 |
---|---|---|
committer | Kean Johnson <kean@armory.com> | 2005-11-08 06:33:25 +0000 |
commit | 6bb0c3796b6e1beddc376a896e865704886e1462 (patch) | |
tree | 6cac858c83fbce90d50d76c7dd28e3a1a88cd1d6 | |
parent | 14be0098ad90c3e68bd2d21b00ffabb76f1fd780 (diff) |
See ChangeLog entry 2005-11-07 for details.XORG-6_8_99_902
-rw-r--r-- | include/X11/Xlib.h | 6 | ||||
-rw-r--r-- | src/locking.c | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h index bb2aaa2..a26789b 100644 --- a/include/X11/Xlib.h +++ b/include/X11/Xlib.h @@ -1,4 +1,4 @@ -/* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.5 2005-07-03 07:00:55 daniels Exp $ */ +/* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.6 2005-11-08 06:33:25 jkj Exp $ */ /* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */ /* @@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group. #endif #endif /* USG */ -#if defined(SCO325) || defined(__USLC__) +#if defined(__SCO__) || defined(__UNIXWARE__) #include <stdint.h> #endif @@ -65,13 +65,11 @@ in this Software without prior written authorization from The Open Group. #ifndef X_WCHAR #ifdef X_NOT_STDC_ENV -#ifndef SCO324 #ifndef ISC #define X_WCHAR #endif #endif #endif -#endif #ifndef X_WCHAR #include <stddef.h> diff --git a/src/locking.c b/src/locking.c index 5312b5d..537ffa3 100644 --- a/src/locking.c +++ b/src/locking.c @@ -43,6 +43,10 @@ in this Software without prior written authorization from The Open Group. #ifdef XTHREADS +#ifdef __UNIXWARE__ +#include <dlfcn.h> +#endif + #include "locking.h" #ifdef XTHREADS_WARN #include <stdio.h> /* for warn/debug stuff */ @@ -587,11 +591,27 @@ static int _XInitDisplayLock( return 0; } +#ifdef __UNIXWARE__ +xthread_t __x11_thr_self() { return 0; } +xthread_t (*_x11_thr_self)() = __x11_thr_self; +#endif + Status XInitThreads() { if (_Xglobal_lock) return 1; +#ifdef __UNIXWARE__ + else { + void *dl_handle = dlopen(NULL, RTLD_LAZY); + if (!dl_handle || + ((_x11_thr_self = (xthread_t(*)())dlsym(dl_handle,"thr_self")) == 0)) { + _x11_thr_self = __x11_thr_self; + (void) fprintf (stderr, + "XInitThreads called, but no libthread in the calling program!\n" ); + } + } +#endif /* __UNIXWARE__ */ #ifdef xthread_init xthread_init(); /* return value? */ #endif |