diff options
Diffstat (limited to 'libX11/include')
-rw-r--r-- | libX11/include/X11/Xlib.h | 4 | ||||
-rw-r--r-- | libX11/include/X11/Xlibint.h | 29 | ||||
-rw-r--r-- | libX11/include/X11/Xregion.h | 2 |
3 files changed, 20 insertions, 15 deletions
diff --git a/libX11/include/X11/Xlib.h b/libX11/include/X11/Xlib.h index 65f253cd4..f29976354 100644 --- a/libX11/include/X11/Xlib.h +++ b/libX11/include/X11/Xlib.h @@ -91,8 +91,8 @@ _Xmblen( typedef char *XPointer; -#define Bool int -#define Status int +typedef int Bool; +typedef int Status; #define True 1 #define False 0 diff --git a/libX11/include/X11/Xlibint.h b/libX11/include/X11/Xlibint.h index 443155964..e7d2487cf 100644 --- a/libX11/include/X11/Xlibint.h +++ b/libX11/include/X11/Xlibint.h @@ -273,29 +273,32 @@ struct _XLockPtrs { ); }; -#if defined(WIN32) && !defined(_XLIBINT_) -#define _XCreateMutex_fn (*_XCreateMutex_fn_p) -#define _XFreeMutex_fn (*_XFreeMutex_fn_p) -#define _XLockMutex_fn (*_XLockMutex_fn_p) -#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p) -#define _Xglobal_lock (*_Xglobal_lock_p) +#ifdef WIN32 +#ifdef LIB11_DLL +#define X11_EXTERN __declspec(dllexport) extern +#else +#define X11_EXTERN __declspec(dllimport) extern #endif +#else +#define X11_EXTERN extern +#endif + /* in XlibInt.c */ -extern void (*_XCreateMutex_fn)( +X11_EXTERN void (*_XCreateMutex_fn)( LockInfoPtr /* lock */ ); -extern void (*_XFreeMutex_fn)( +X11_EXTERN void (*_XFreeMutex_fn)( LockInfoPtr /* lock */ ); -extern void (*_XLockMutex_fn)( +X11_EXTERN void (*_XLockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif ); -extern void (*_XUnlockMutex_fn)( +X11_EXTERN void (*_XUnlockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ @@ -303,7 +306,7 @@ extern void (*_XUnlockMutex_fn)( #endif ); -extern LockInfoPtr _Xglobal_lock; +X11_EXTERN LockInfoPtr _Xglobal_lock; #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) #define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__) @@ -826,10 +829,10 @@ extern int _XError( extern int _XIOError( Display* /* dpy */ ) _X_NORETURN; -extern int (*_XIOErrorFunction)( +X11_EXTERN int (*_XIOErrorFunction)( Display* /* dpy */ ); -extern int (*_XErrorFunction)( +X11_EXTERN int (*_XErrorFunction)( Display* /* dpy */, XErrorEvent* /* error_event */ ); diff --git a/libX11/include/X11/Xregion.h b/libX11/include/X11/Xregion.h index c25d70b41..54afcd0bb 100644 --- a/libX11/include/X11/Xregion.h +++ b/libX11/include/X11/Xregion.h @@ -58,8 +58,10 @@ typedef struct { #define TRUE 1 #define FALSE 0 +#ifndef MAXSHORT #define MAXSHORT 32767 #define MINSHORT -MAXSHORT +#endif #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif |