diff --git a/include/ts_xlib.h b/include/ts_xlib.h index 53103b0a806..6b2ee99c040 100644 --- a/include/ts_xlib.h +++ b/include/ts_xlib.h @@ -12,6 +12,7 @@ # error You must include config.h to use this header #endif +#ifdef HAVE_X11_XLIB_H #include @@ -147,7 +148,7 @@ extern int TSXUnmapWindow(Display*, Window); extern int TSXWarpPointer(Display*, Window, Window, int, int, unsigned int, unsigned int, int, int); extern XIM TSXOpenIM(Display*, struct _XrmHashBucketRec*, char*, char*); extern int (*TSXSynchronize(Display *, Bool))(Display *); -extern void TS_XInitImageFuncPtrs(XImage *); +#endif /* defined(HAVE_X11_XLIB_H) */ #endif /* __WINE_TS_XLIB_H */ diff --git a/include/ts_xresource.h b/include/ts_xresource.h index 102716882a0..2c82c052e16 100644 --- a/include/ts_xresource.h +++ b/include/ts_xresource.h @@ -12,6 +12,7 @@ # error You must include config.h to use this header #endif +#ifdef HAVE_X11_XLIB_H #include #include @@ -26,5 +27,6 @@ extern XrmDatabase TSXrmGetStringDatabase(const char*); extern void TSXrmMergeDatabases(XrmDatabase, XrmDatabase*); extern void TSXrmParseCommand(XrmDatabase*, XrmOptionDescList, int, const char*, int*, char**); +#endif /* defined(HAVE_X11_XLIB_H) */ #endif /* __WINE_TS_XRESOURCE_H */ diff --git a/include/ts_xutil.h b/include/ts_xutil.h index 42744efeed8..3286ecefd68 100644 --- a/include/ts_xutil.h +++ b/include/ts_xutil.h @@ -12,6 +12,7 @@ # error You must include config.h to use this header #endif +#ifdef HAVE_X11_XLIB_H #include #include @@ -56,5 +57,6 @@ extern int TSXAddPixel(struct _XImage *, long); extern XContext TSXUniqueContext(void); extern int TSXDeleteContext(Display*,XID,XContext); +#endif /* defined(HAVE_X11_XLIB_H) */ #endif /* __WINE_TS_XUTIL_H */ diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers index 78d0ada571c..9ab4986b9ad 100755 --- a/tools/make_X11wrappers +++ b/tools/make_X11wrappers @@ -57,8 +57,8 @@ foreach $name (@dolist) { $x11_incl = ""; $extensions_dir = ""; - $pre_file = ""; - $post_file = ""; + $pre_file = "#ifdef HAVE_X11_XLIB_H\n"; + $post_file = "#endif /* defined(HAVE_X11_XLIB_H) */\n"; $inc_name = $name; if($name eq "Xutil" || $name eq "Xresource" || $name eq "XShm") { $x11_incl = "#include \n"; @@ -388,8 +388,6 @@ output_fn_short("XvImage *", "XvShmCreateImage", "Display*", "XvPortID", "int", "int (*TSXSynchronize(Display *, Bool))(Display *)", "int (*TSXSynchronize(Display *a0, Bool a1))(Display *)", "a0, a1"); - print OUTC "\nextern void _XInitImageFuncPtrs(XImage *);\n"; - output_fn("_XInitImageFuncPtrs", "void", "XImage *", "XImage *a0", "a0"); } elsif($name eq "Xutil") { output_fn("XDestroyImage", "int", "struct _XImage *", "struct _XImage *a0", "a0"); diff --git a/tsx11/X11_calls b/tsx11/X11_calls index 00aaeb7a198..cf57942c443 100644 --- a/tsx11/X11_calls +++ b/tsx11/X11_calls @@ -185,7 +185,6 @@ XrmInitialize XrmMergeDatabases XrmParseCommand XrmUniqueQuark -_XInitImageFuncPtrs XF86DGAQueryExtension XF86DGASetViewPort XF86DGAInstallColormap diff --git a/tsx11/ts_xlib.c b/tsx11/ts_xlib.c index d2d92dbf5a3..aca35c9b191 100644 --- a/tsx11/ts_xlib.c +++ b/tsx11/ts_xlib.c @@ -6,6 +6,7 @@ #include "config.h" +#ifdef HAVE_X11_XLIB_H #include @@ -1171,13 +1172,5 @@ int (*TSXSynchronize(Display *a0, Bool a1))(Display *) return r; } -extern void _XInitImageFuncPtrs(XImage *); - -void TS_XInitImageFuncPtrs(XImage *a0) -{ - wine_tsx11_lock(); - _XInitImageFuncPtrs(a0); - wine_tsx11_unlock(); -} - +#endif /* defined(HAVE_X11_XLIB_H) */ diff --git a/tsx11/ts_xresource.c b/tsx11/ts_xresource.c index ae0e6e3cc4b..8848ffad551 100644 --- a/tsx11/ts_xresource.c +++ b/tsx11/ts_xresource.c @@ -6,6 +6,7 @@ #include "config.h" +#ifdef HAVE_X11_XLIB_H #include #include @@ -63,4 +64,5 @@ void TSXrmParseCommand(XrmDatabase* a0, XrmOptionDescList a1, int a2, const ch wine_tsx11_unlock(); } +#endif /* defined(HAVE_X11_XLIB_H) */ diff --git a/tsx11/ts_xutil.c b/tsx11/ts_xutil.c index 8deb364b791..cf663d4208f 100644 --- a/tsx11/ts_xutil.c +++ b/tsx11/ts_xutil.c @@ -6,6 +6,7 @@ #include "config.h" +#ifdef HAVE_X11_XLIB_H #include #include @@ -59,15 +60,6 @@ Region TSXCreateRegion(void) return r; } -int TSXDeleteContext(Display* a0, XID a1, XContext a2) -{ - int r; - wine_tsx11_lock(); - r = XDeleteContext(a0, a1, a2); - wine_tsx11_unlock(); - return r; -} - int TSXDestroyRegion(Region a0) { int r; @@ -325,4 +317,14 @@ XContext TSXUniqueContext(void) return r; } +int TSXDeleteContext(Display*a0,XID a1,XContext a2) +{ + int r; + wine_tsx11_lock(); + r = XDeleteContext(a0,a1,a2); + wine_tsx11_unlock(); + return r; +} + +#endif /* defined(HAVE_X11_XLIB_H) */