This patch is from DragonFly developer Joerg Sonnenberger and the pkgsrc
collection.
I tested using /dev/sysmouse with moused using my serial /dev/cuaa0.
mappings (including left-handed mouse etc.). Fixed incorrect usage of
non-reversed, but ZAxisMapped buttons for state detection. Nuked unused
part of reverseMap.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
source files in the xserver/xorg tree, predicated on defines of
HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
<X11/fonts/foo.h>.
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
<X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
(XFree86 Bugzilla #1438, John Heasley). "To fix this, I've added a
mouse buffer (Xisb buffer) "scale" value to the MouseDevPtr type. If
set, it is used as structure size of which we want space for a few."