diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-18 13:23:06 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-18 13:23:06 -0600 |
commit | 3537da87de2601fa53eeda3e8d7fa0bca6eb6716 (patch) | |
tree | da0d2ea0a18004627bcb3f98eef8a0b4c82a731d /src | |
parent | bbd287103dad776d8a45c87c4e51fbc26d9b80d5 (diff) |
glx: remove depency on glheader.h and GLboolean type in XF86DRI code
Return Bool instead of GLboolean to match other functions.
Define PUBLIC/USED macros locally.
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/x11/XF86dri.c | 20 | ||||
-rw-r--r-- | src/glx/x11/xf86dri.h | 6 |
2 files changed, 18 insertions, 8 deletions
diff --git a/src/glx/x11/XF86dri.c b/src/glx/x11/XF86dri.c index 5b0bf14afe..a33de935ee 100644 --- a/src/glx/x11/XF86dri.c +++ b/src/glx/x11/XF86dri.c @@ -43,9 +43,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <X11/Xlibint.h> #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> -#include "glheader.h" #include "xf86dristr.h" + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define PUBLIC __attribute__((visibility("default"))) +# define USED __attribute__((used)) +#else +# define PUBLIC +# define USED +#endif + + + static XExtensionInfo _xf86dri_info_data; static XExtensionInfo *xf86dri_info = &_xf86dri_info_data; static char xf86dri_extension_name[] = XF86DRINAME; @@ -375,7 +385,7 @@ PUBLIC Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) context, hHWContext ); } -PUBLIC GLboolean XF86DRIDestroyContext(Display *dpy, int screen, +PUBLIC Bool XF86DRIDestroyContext(Display *dpy, int screen, XID context ) { XExtDisplayInfo *info = find_display (dpy); @@ -396,7 +406,7 @@ PUBLIC GLboolean XF86DRIDestroyContext(Display *dpy, int screen, return True; } -PUBLIC GLboolean XF86DRICreateDrawable(Display *dpy, int screen, +PUBLIC Bool XF86DRICreateDrawable(Display *dpy, int screen, XID drawable, drm_drawable_t * hHWDrawable ) { XExtDisplayInfo *info = find_display (dpy); @@ -430,7 +440,7 @@ static int noopErrorHandler(Display *dpy, XErrorEvent *xerr) return 0; } -PUBLIC GLboolean XF86DRIDestroyDrawable(Display *dpy, int screen, +PUBLIC Bool XF86DRIDestroyDrawable(Display *dpy, int screen, XID drawable ) { XExtDisplayInfo *info = find_display (dpy); @@ -452,7 +462,7 @@ PUBLIC GLboolean XF86DRIDestroyDrawable(Display *dpy, int screen, * the windows is gone, by wrapping the destroy call in an error * handler. */ - XSync(dpy, GL_FALSE); + XSync(dpy, False); oldXErrorHandler = XSetErrorHandler(noopErrorHandler); LockDisplay(dpy); diff --git a/src/glx/x11/xf86dri.h b/src/glx/x11/xf86dri.h index cd650b5829..a7d2a896d1 100644 --- a/src/glx/x11/xf86dri.h +++ b/src/glx/x11/xf86dri.h @@ -92,13 +92,13 @@ Bool XF86DRICreateContext( Display *dpy, int screen, Visual *visual, Bool XF86DRICreateContextWithConfig( Display *dpy, int screen, int configID, XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); -extern GLboolean XF86DRIDestroyContext( Display *dpy, int screen, +extern Bool XF86DRIDestroyContext( Display *dpy, int screen, XID context_id ); -extern GLboolean XF86DRICreateDrawable( Display *dpy, int screen, +extern Bool XF86DRICreateDrawable( Display *dpy, int screen, XID drawable, drm_drawable_t *hHWDrawable ); -extern GLboolean XF86DRIDestroyDrawable( Display *dpy, int screen, +extern Bool XF86DRIDestroyDrawable( Display *dpy, int screen, XID drawable); Bool XF86DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable, |