diff -ur old/libXext-1.0.4/src/extutil.c new/libXext-1.0.4/src/extutil.c --- old/libXext-1.0.4/src/extutil.c 2007-11-28 01:46:14.000000000 +0100 +++ new/libXext-1.0.4/src/extutil.c 2008-10-09 23:33:07.000000000 +0200 @@ -235,7 +235,7 @@ -static int _default_exterror (Display *dpy, char *ext_name, char *reason) +static int _default_exterror (Display *dpy, _Xconst char *ext_name, _Xconst char *reason) { fprintf (stderr, "Xlib: extension \"%s\" %s on display \"%s\".\n", ext_name, reason, DisplayString(dpy)); @@ -248,11 +248,11 @@ * requested extension is referenced. This should eventually move into Xlib. */ -extern int (*_XExtensionErrorFunction)(Display*, char *, char * ); +extern XextErrorHandler _XExtensionErrorFunction; -int (*XSetExtensionErrorHandler(int (*handler)(Display*, char *, char * )))(Display*, char *, char * ) +XextErrorHandler XSetExtensionErrorHandler (XextErrorHandler handler) { - int (*oldhandler)(Display*, char *, char * ) = _XExtensionErrorFunction; + XextErrorHandler oldhandler = _XExtensionErrorFunction; _XExtensionErrorFunction = (handler ? handler : _default_exterror); @@ -265,8 +265,8 @@ */ int XMissingExtension (Display *dpy, _Xconst char *ext_name) { - int (*func)(Display*, char *, char *) = (_XExtensionErrorFunction ? - _XExtensionErrorFunction : _default_exterror); + XextErrorHandler func = (_XExtensionErrorFunction ? + _XExtensionErrorFunction : _default_exterror); if (!ext_name) ext_name = X_EXTENSION_UNKNOWN; return (*func) (dpy, ext_name, X_EXTENSION_MISSING); diff -ur old/libXext-1.0.4/src/globals.c new/libXext-1.0.4/src/globals.c --- old/libXext-1.0.4/src/globals.c 2007-11-28 01:47:48.000000000 +0100 +++ new/libXext-1.0.4/src/globals.c 2008-10-09 23:44:56.000000000 +0200 @@ -75,8 +75,7 @@ /* * Error handlers; used to be in XlibInt.c */ -typedef int (*funcptr)(Display*, char *, char *); -ZEROINIT (funcptr, _XExtensionErrorFunction, NULL); +ZEROINIT (XextErrorHandler, _XExtensionErrorFunction, NULL); /* * NOTE: any additional external definition NEED diff -ur old/xextproto-7.0.3/Xext.h new/xextproto-7.0.3/Xext.h --- old/xextproto-7.0.3/Xext.h 2008-05-22 02:05:29.000000000 +0200 +++ new/xextproto-7.0.3/Xext.h 2008-10-09 23:32:59.000000000 +0200 @@ -32,16 +32,14 @@ _XFUNCPROTOBEGIN -extern int (*XSetExtensionErrorHandler( - int (*handler)( - Display *, - char *, - char * - ) -))( - Display *, - char *, - char * +typedef int (*XextErrorHandler) ( + Display * /* dpy */, + _Xconst char* /* ext_name */, + _Xconst char* /* reason */ +); + +extern XextErrorHandler XSetExtensionErrorHandler( + XextErrorHandler /* handler */ ); extern int XMissingExtension(