Re: [PATCH] More cleanup + bugfixes
Re: [PATCH] More cleanup + bugfixes
- Subject: Re: [PATCH] More cleanup + bugfixes
- From: Ben Byer <email@hidden>
- Date: Fri, 16 Nov 2007 05:37:44 -0800
On Nov 16, 2007, at 12:09 AM, Jeremy Huddleston wrote:
Here's another patch to further the codebase cleanup.
1) Fixed a bug where XQUARTZ was #defined when auto but not when --
enable-xquartz
2) Cleaned up missing #includes and function prototypes.
3) Fixed some invalid C syntax problems
4) Removed a bunch of dead code
5) Cleaned up code to prevent some warnings
6) Bugfix in xpr/x-hook.c - looks like someone just forgot to finish
writing code for hook_remove()... I only noticed it because gcc -
Wall complained about reaching the end of a non-void function...
lucky for us gcc is smarter than we are.
http://cloud.cs.berkeley.edu/~jeremy/X11/X11-XDarwin-Cleanup.patch
You're a rock star!
The RegisterBlockAndWakeupHandlers warning is weird. Here's the
offending call:
if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler,
QuartzWakeupHandler,
NULL))
Wrong BlockHandler, AFAICT. RegisterBlockAndWakeupHandlers is
prototyped in include/dix.h:
extern Bool RegisterBlockAndWakeupHandlers(
BlockHandlerProcPtr /*blockHandler*/,
WakeupHandlerProcPtr /*wakeupHandler*/,
pointer /*blockData*/);
where the two function pointers are defined as
extern void BlockHandler(
pointer /*pTimeout*/,
pointer /*pReadmask*/);
extern void WakeupHandler(
int /*result*/,
pointer /*pReadmask*/);
typedef void (* WakeupHandlerProcPtr)(
pointer /* blockData */,
int /* result */,
pointer /* pReadmask */);
Note the missing typedef for BlockHandlerProcPtr! It turns out it's
hiding in /usr/X11/include/X11/Xdefs.h (and I only know that because
I tried making one up and the compiler complained that it had already
been defined).
typedef void (* BlockHandlerProcPtr)(pointer /* blockData */,
OSTimePtr /* pTimeout */,
pointer /* pReadmask */);
I think I got those, along with a couple others: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=0560544a9a7b6f102a6d47b11b979479efba787c
--
Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden