aboutsummaryrefslogtreecommitdiff
path: root/X11
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
committermarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
commit3562e78743202e43aec8727005182a2558117eca (patch)
tree8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /X11
downloadvcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz
vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2
vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip
Checked in the following released items:
xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz
Diffstat (limited to 'X11')
-rw-r--r--X11/AUTHORS23
-rw-r--r--X11/COPYING43
-rw-r--r--X11/ChangeLog773
-rw-r--r--X11/DECkeysym.h67
-rw-r--r--X11/HPkeysym.h165
-rw-r--r--X11/Makefile.am45
-rw-r--r--X11/Makefile.in628
-rw-r--r--X11/Sunkeysym.h112
-rw-r--r--X11/X.h722
-rw-r--r--X11/XF86keysym.h228
-rw-r--r--X11/XWDFile.h114
-rw-r--r--X11/Xalloca.h144
-rw-r--r--X11/Xarch.h126
-rw-r--r--X11/Xatom.h79
-rw-r--r--X11/Xdefs.h110
-rw-r--r--X11/Xfuncproto.h.in122
-rw-r--r--X11/Xfuncs.h98
-rw-r--r--X11/Xmd.h211
-rw-r--r--X11/Xos.h296
-rw-r--r--X11/Xos_r.h1160
-rw-r--r--X11/Xosdefs.h176
-rw-r--r--X11/Xpoll.h.in255
-rw-r--r--X11/Xproto.h2161
-rw-r--r--X11/Xprotostr.h78
-rw-r--r--X11/Xthreads.h316
-rw-r--r--X11/Xw32defs.h81
-rw-r--r--X11/Xwindows.h80
-rw-r--r--X11/Xwinsock.h66
-rw-r--r--X11/aclocal.m4930
-rw-r--r--X11/ap_keysym.h51
-rw-r--r--X11/autogen.sh12
-rw-r--r--X11/config.guess1500
-rw-r--r--X11/config.sub1616
-rw-r--r--X11/configure6044
-rw-r--r--X11/configure.ac203
-rw-r--r--X11/do-not-use-config.h.in76
-rw-r--r--X11/extensions/AUTHORS2
-rw-r--r--X11/extensions/COPYING179
-rw-r--r--X11/extensions/ChangeLog185
-rw-r--r--X11/extensions/INSTALL8
-rw-r--r--X11/extensions/MITMisc.h66
-rw-r--r--X11/extensions/Makefile.am55
-rw-r--r--X11/extensions/Makefile.in530
-rw-r--r--X11/extensions/NEWS2
-rw-r--r--X11/extensions/README10
-rw-r--r--X11/extensions/XEVI.h64
-rw-r--r--X11/extensions/XEVIstr.h98
-rw-r--r--X11/extensions/XI.h288
-rw-r--r--X11/extensions/XInput.h1200
-rw-r--r--X11/extensions/XIproto.h1617
-rw-r--r--X11/extensions/XKB.h788
-rw-r--r--X11/extensions/XKBbells.h143
-rw-r--r--X11/extensions/XKBconfig.h280
-rw-r--r--X11/extensions/XKBfile.h494
-rw-r--r--X11/extensions/XKBgeom.h659
-rw-r--r--X11/extensions/XKBproto.h1282
-rw-r--r--X11/extensions/XKBrules.h201
-rw-r--r--X11/extensions/XKBsrv.h1187
-rw-r--r--X11/extensions/XKBstr.h614
-rw-r--r--X11/extensions/XKM.h70
-rw-r--r--X11/extensions/XKMformat.h301
-rw-r--r--X11/extensions/XLbx.h155
-rw-r--r--X11/extensions/XResproto.h130
-rw-r--r--X11/extensions/XShm.h161
-rw-r--r--X11/extensions/XTest.h164
-rw-r--r--X11/extensions/Xag.h114
-rw-r--r--X11/extensions/Xagstr.h182
-rw-r--r--X11/extensions/Xcup.h69
-rw-r--r--X11/extensions/Xcupstr.h109
-rw-r--r--X11/extensions/Xdbe.h136
-rw-r--r--X11/extensions/Xdbeproto.h277
-rw-r--r--X11/extensions/Xeviestr.h165
-rw-r--r--X11/extensions/Xext.h57
-rw-r--r--X11/extensions/Xge.h54
-rw-r--r--X11/extensions/aclocal.m4612
-rw-r--r--X11/extensions/autogen.sh12
-rw-r--r--X11/extensions/bigreqsproto.pc.in9
-rw-r--r--X11/extensions/bigreqstr.h69
-rw-r--r--X11/extensions/composite.h71
-rw-r--r--X11/extensions/compositeproto.h191
-rw-r--r--X11/extensions/compositeproto.pc.in9
-rw-r--r--X11/extensions/compositeproto.txt339
-rw-r--r--X11/extensions/configure3164
-rw-r--r--X11/extensions/configure.ac8
-rw-r--r--X11/extensions/damageproto.h160
-rw-r--r--X11/extensions/damageproto.pc.in9
-rw-r--r--X11/extensions/damageproto.txt221
-rw-r--r--X11/extensions/damagewire.h58
-rw-r--r--X11/extensions/dpms.h67
-rw-r--r--X11/extensions/dpmsstr.h186
-rw-r--r--X11/extensions/evieproto.pc.in9
-rw-r--r--X11/extensions/extutil.h192
-rw-r--r--X11/extensions/fixesproto.pc.in9
-rw-r--r--X11/extensions/ge.h62
-rw-r--r--X11/extensions/geproto.h85
-rw-r--r--X11/extensions/inputproto.pc.in9
-rw-r--r--X11/extensions/install-sh325
-rw-r--r--X11/extensions/kbproto.pc.in9
-rw-r--r--X11/extensions/lbxbuf.h51
-rw-r--r--X11/extensions/lbxbufstr.h45
-rw-r--r--X11/extensions/lbxdeltastr.h105
-rw-r--r--X11/extensions/lbximage.h151
-rw-r--r--X11/extensions/lbxopts.h133
-rw-r--r--X11/extensions/lbxstr.h935
-rw-r--r--X11/extensions/lbxzlib.h64
-rw-r--r--X11/extensions/missing360
-rw-r--r--X11/extensions/mitmiscstr.h70
-rw-r--r--X11/extensions/mkinstalldirs111
-rw-r--r--X11/extensions/multibuf.h317
-rw-r--r--X11/extensions/multibufst.h609
-rw-r--r--X11/extensions/randr.h141
-rw-r--r--X11/extensions/randrproto.h654
-rw-r--r--X11/extensions/randrproto.pc.in9
-rw-r--r--X11/extensions/randrproto.txt1767
-rw-r--r--X11/extensions/record.h211
-rw-r--r--X11/extensions/recordproto.pc.in9
-rw-r--r--X11/extensions/recordstr.h322
-rw-r--r--X11/extensions/render.h189
-rw-r--r--X11/extensions/renderproto.h663
-rw-r--r--X11/extensions/renderproto.pc.in9
-rw-r--r--X11/extensions/renderproto.txt1253
-rw-r--r--X11/extensions/resourceproto.pc.in9
-rw-r--r--X11/extensions/saver.h54
-rw-r--r--X11/extensions/saverproto.h178
-rw-r--r--X11/extensions/scrnsaver.h136
-rw-r--r--X11/extensions/scrnsaverproto.pc.in9
-rw-r--r--X11/extensions/security.h111
-rw-r--r--X11/extensions/securstr.h116
-rw-r--r--X11/extensions/shape.h180
-rw-r--r--X11/extensions/shapestr.h234
-rw-r--r--X11/extensions/shmstr.h217
-rw-r--r--X11/extensions/sync.h469
-rw-r--r--X11/extensions/syncstr.h494
-rw-r--r--X11/extensions/xcmiscproto.pc.in9
-rw-r--r--X11/extensions/xcmiscstr.h112
-rw-r--r--X11/extensions/xextproto.pc.in9
-rw-r--r--X11/extensions/xfixesproto.h520
-rw-r--r--X11/extensions/xfixeswire.h127
-rw-r--r--X11/extensions/xtestext1.h326
-rw-r--r--X11/extensions/xteststr.h120
-rw-r--r--X11/fonts/COPYING86
-rw-r--r--X11/fonts/ChangeLog4
-rw-r--r--X11/fonts/FS.h132
-rw-r--r--X11/fonts/FSproto.h816
-rw-r--r--X11/fonts/Makefile.am13
-rw-r--r--X11/fonts/Makefile.in439
-rw-r--r--X11/fonts/aclocal.m4879
-rw-r--r--X11/fonts/autogen.sh12
-rw-r--r--X11/fonts/configure2587
-rw-r--r--X11/fonts/configure.ac8
-rw-r--r--X11/fonts/font.h169
-rw-r--r--X11/fonts/fontproto.h93
-rw-r--r--X11/fonts/fontsproto.pc.in9
-rw-r--r--X11/fonts/fontstruct.h295
-rw-r--r--X11/fonts/fsmasks.h98
-rw-r--r--X11/fonts/install-sh294
-rw-r--r--X11/fonts/missing336
-rw-r--r--X11/fonts/mkinstalldirs111
-rw-r--r--X11/install-sh507
-rw-r--r--X11/keysym.h76
-rw-r--r--X11/keysymdef.h2374
-rw-r--r--X11/missing367
-rw-r--r--X11/xproto.pc.in10
-rw-r--r--X11/xtrans/AUTHORS7
-rw-r--r--X11/xtrans/COPYING124
-rw-r--r--X11/xtrans/ChangeLog867
-rw-r--r--X11/xtrans/INSTALL237
-rw-r--r--X11/xtrans/Makefile.am27
-rw-r--r--X11/xtrans/Makefile.in566
-rw-r--r--X11/xtrans/NEWS0
-rw-r--r--X11/xtrans/README14
-rw-r--r--X11/xtrans/Xtrans.c1382
-rw-r--r--X11/xtrans/Xtrans.h478
-rw-r--r--X11/xtrans/Xtransint.h414
-rw-r--r--X11/xtrans/Xtranslcl.c2561
-rw-r--r--X11/xtrans/Xtranssock.c2511
-rw-r--r--X11/xtrans/Xtranstli.c1418
-rw-r--r--X11/xtrans/Xtransutil.c642
-rw-r--r--X11/xtrans/aclocal.m4959
-rw-r--r--X11/xtrans/configure4848
-rw-r--r--X11/xtrans/configure.ac49
-rw-r--r--X11/xtrans/install-sh519
-rw-r--r--X11/xtrans/missing367
-rw-r--r--X11/xtrans/transport.c73
-rw-r--r--X11/xtrans/xtrans.m4138
-rw-r--r--X11/xtrans/xtrans.pc.in9
186 files changed, 76425 insertions, 0 deletions
diff --git a/X11/AUTHORS b/X11/AUTHORS
new file mode 100644
index 000000000..1bfcc436b
--- /dev/null
+++ b/X11/AUTHORS
@@ -0,0 +1,23 @@
+The architect of the X11 core protocol was Bob Scheifler of MIT LCS, with
+significant contributions from Jim Gettys, Phil Karlton and Scott
+McGregor of Digital, Dave Rosenthal of Sun, and many others of
+the xpert mailing list.
+
+The original sample server implementation of the X11 protocol was
+implemented by Phil Karlton and Susan Angebrandt doing the device
+independent part of the server, with Raymond Drewry and Todd Newman of
+Digital Equipment Corporation, doing the mi and original ddx
+implementation; their feedback was vital to a good design, along with
+that of the more than 100 alpha and beta testers who bravely tested
+the X11 core design.
+
+The X11 protocol library (Xlib) was built principally by Jim Gettys of
+Digital and MIT Project Athena, with assistance from Ron Newman of MIT
+Project Athena.
+
+Our thanks to those at MIT, Digital Equipment Corporation, Hewlett-Packard,
+IBM, and many others who had faith in us reimplementing X from first
+principles.
+
+If there are mistakes here, they are mine; entirely possible after
+over 15 years. - Jim Gettys
diff --git a/X11/COPYING b/X11/COPYING
new file mode 100644
index 000000000..1724bb299
--- /dev/null
+++ b/X11/COPYING
@@ -0,0 +1,43 @@
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
diff --git a/X11/ChangeLog b/X11/ChangeLog
new file mode 100644
index 000000000..5b791fbc0
--- /dev/null
+++ b/X11/ChangeLog
@@ -0,0 +1,773 @@
+commit 33a7de5cdacb59503b26c6523ffb33dba118faed
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Thu Oct 23 22:41:01 2008 +1030
+
+ Bump to 7.0.14.
+
+commit 1cf41088ff751e60071a519466b5a51b65c7626a
+Author: Bastien Nocera <bnocera@redhat.com>
+Date: Wed Oct 15 14:20:45 2008 +1030
+
+ Keysyms needed for some HID remote controls to work under X. #16519
+
+ In particular, this enables Sony Ericsson phones and PS3 BD remotes.
+
+ X.Org Bug 16519 <https://bugs.freedesktop.org/show_bug.cgi?id=16519>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+
+commit 0b541b3fa282531c97c6ecee574c8b92b1489bfc
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Tue Oct 14 21:56:14 2008 +1030
+
+ Fix typos in comments (UP/DOWN TACK and LEFT/RIGHT TACK wrong way round).
+
+ Spotted by Erik Streb and Julien Cristau.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+
+commit c94477f16356790741ebc139d2d0b15d79c83e28
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Tue Oct 14 21:54:16 2008 +1030
+
+ Revert "Fix typos in comments (UP/DOWN TACK and LEFT/RIGHT TACK wrong way round)."
+
+ Codepoints should have moved with the comments. See next commit for correct
+ patch.
+
+ This reverts commit 2945d2f97c264783e4050a8f6c3016290014b9e2.
+
+commit 2945d2f97c264783e4050a8f6c3016290014b9e2
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Tue Oct 14 21:04:08 2008 +1030
+
+ Fix typos in comments (UP/DOWN TACK and LEFT/RIGHT TACK wrong way round).
+
+ Spotted by Erik Streb.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+
+commit 610eb9698316b7cdfe378ce7776c4520f8b061ff
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Mon Oct 13 12:01:16 2008 +1030
+
+ Add keysyms for XF86XK_Battery, XF86XK_Bluetooth, XF86XK_WLAN, XF86XK_UWB.
+
+commit 0846d7adfe790897e879c5ed53d4f81db459a20d
+Author: James Cloos <cloos@jhcloos.com>
+Date: Sun Jul 13 17:57:09 2008 -0400
+
+ Add dead_perispomeni to keysymdef.h
+
+ Make the dead_perispomeni keysym an alias to dead_tilde
+ (which is currently used for entering characters with
+ perispomeni).
+
+ Cf: https://bugs.freedesktop.org/show_bug.cgi?id=14013
+
+commit 38edd9839fa8495602378af36c67b2477b24eca2
+Author: James Cloos <cloos@jhcloos.com>
+Date: Sun Jul 13 17:54:47 2008 -0400
+
+ fix typo in commit 40ed4eef
+
+commit 53859ee4e431c21000e282971894dbe9384ed205
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Wed May 28 17:17:38 2008 +0930
+
+ Bump to 7.0.13.
+
+commit 44e458285bb2e7771963a9ab9b5f03d2fb48e611
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Tue May 15 16:41:08 2007 +0930
+
+ Add GenericEvent and xGenericEvent definitions.
+ (cherry picked from commit 8a96cdca08db2563e8c4c7c9a110a3ab6d973fcc)
+
+commit 22878c30d21580146200c00070478f88d969bcaa
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Thu May 8 15:02:41 2008 -0700
+
+ Apple: Added a comment to explain _DARWIN_C_SOURCE
+
+commit e3035a7e6e56e01eb79478ea5342e032ec67a190
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Thu May 8 12:16:15 2008 -0700
+
+ Apple: Define _DARWIN_C_SOURCE otherwise _XOPEN_SOURCE, _POSIX_SOURCE, or _POSIX_C_SOURCE will cause fd_mask to not be defined due to the strict namespace
+
+commit 05b119d78e1c6a4db563b2a976cee0173489f9b6
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Thu May 8 11:36:03 2008 -0700
+
+ Apple: Cleaned up some Apple definitions
+
+commit c879dab58f82f4789f27933c22706c84015f8684
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date: Tue Apr 29 00:37:28 2008 +0100
+
+ avoid checking for fds_bits on mingw
+
+commit 8642ec676db0dd875f4d3a97d8a3cdbf6843a985
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Sat Apr 26 18:21:41 2008 +0100
+
+ Use Sleep() instead of sleep() on windows
+
+ (was already done in Xwindows.h, just not Xw32defs.h)
+
+commit a893a6ac5d9fdfe9a420d1812402a01904e6482b
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Sat Apr 26 08:52:29 2008 +0100
+
+ Use winsock2.h
+
+commit c705bab0f6efcb6937b7ccc2fb415e701878fddb
+Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
+Date: Mon Apr 21 21:27:26 2008 +0100
+
+ Added comment to slightly discourage the definition of ever more Unicode keysyms
+
+commit 44e24a27bca023cf7b799f191fe6d52e12efbe5f
+Author: James Cloos <cloos@jhcloos.com>
+Date: Sat Apr 12 15:48:46 2008 -0400
+
+ Add more dead key syms
+ Add dead keys to support input of the precomposed latin characters in
+ ISO 10747 which have ring, line, circumflex, tilde, breve or diaeresis
+ below.
+
+ This addresses: https://bugs.freedesktop.org/show_bug.cgi?id=15446
+
+commit 07e83988ec0b1c9577646daca3943badd5dcc0d1
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Mar 6 11:34:17 2008 -0500
+
+ Fix typo in XF86Keysym.h
+
+ Fix typo reported in https://bugs.freedesktop.org/show_bug.cgi?id=11193
+ thereby making XF86Keysym.h match libX11’s XKeysymDB.
+
+commit d34310efef11264ddff79320b8c6f03705b1208a
+Author: Adam Jackson <ajax@redhat.com>
+Date: Wed Mar 5 22:09:16 2008 -0500
+
+ x11proto 7.0.12
+
+commit e4ad7a8080e4ac0b868fa7cf39bc5ad9a6e0bee1
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sun Feb 10 19:07:49 2008 -0800
+
+ Fixed #ifdef checks that were using i386 to use __i386__
+
+ """
+ It's simply obsolete, sloppy, compiler namespace pollution. The
+ compiler is not allowed to predefine symbols that might conflict with
+ ordinary identifiers. For backwards compatibility gcc currently
+ predefines i386 when compiling for x86 32-bit (but not 64-bit), but that
+ will go away. It is also not defined if you specify -ansi when invoking
+ the compiler, because then it is seriously standards compliant. Other
+ compilers shouldn't define it either. Correct code shouldn't rely on it
+ being defined. However __i386__ is safe and proper.
+ """
+
+commit e49280c1c33622dbf288b0ac4f8324b01ff9b4aa
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Mon Dec 10 21:33:01 2007 -0800
+
+ Changed __DARWIN__ to __APPLE__
+
+commit 5ae4d304ecb5fb4af0435c9f2efde3d2da5905d1
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Oct 30 18:44:49 2007 -0700
+
+ Make Xalloca.h work with Sun C++ compiler
+
+commit 5ccc71161283fdb2c42da1eeb4049650f6a2f429
+Author: Ben Byer <bbyer@bbyer.apple.com>
+Date: Tue Oct 30 18:40:47 2007 -0700
+
+ fd_mask needs to be defined on OS X, too
+
+commit 8be48ca399c3efd0e5d59f53da1b37d02647f33b
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Mon Sep 24 12:28:25 2007 +0300
+
+ Check headers before testing for fds_bits access method (bug #8442)
+
+ HP-UX doesn't have sys/select.h, so make sure we don't overzealously include
+ headers when we try to find out how to use fds_bits.
+
+commit 68e841fb4bf489531635e6bee70f041d2c3cb87c
+Author: James Cloos <cloos@jhcloos.com>
+Date: Sat Sep 8 08:30:17 2007 -0400
+
+ bump to 7.0.11
+
+commit 11fd082a384499c38065e06065bf80f244e9909a
+Author: Eric Anholt <eric@anholt.net>
+Date: Tue Aug 28 14:54:44 2007 -0700
+
+ Describe what XF86XK_Display does (or now is meant to do).
+
+commit 40ed4eef92e31fcf7ea0a436e1a00cdf49484c1b
+Author: James Cloos <cloos@jhcloos.com>
+Date: Wed Aug 22 21:10:47 2007 -0400
+
+ Add dead_abovecomma and dead_abovereversedcomma
+
+ Also added aliases dead_psili and dead_dasia.
+
+ The UCS unifies Combining Psili and Combining Dasia with
+ Combining Comma Above and Combining Reversed Comma Above.
+ These two aliases mirror that unification.
+
+commit ab74d270c76b17926504815ba43ee35b8b18d3be
+Author: James Cloos <cloos@jhcloos.com>
+Date: Wed Aug 22 21:01:48 2007 -0400
+
+ Comment on the new locations of the files referenced in keysymdef.h
+ keysymdef.h has a comment from the monolithic days suggesting that
+ the file be kept in sync with mappings inxc/lib/X11/KeyBind.c and
+ the protocol specication in xc/doc/specs/XProtocol/X11.keysyms.
+
+ This commit adds pointers to the new locations of those two files.
+
+commit 1edcfdb7f5c51e5c8014c56c4d5937337b7d4302
+Author: James Cloos <cloos@jhcloos.com>
+Date: Tue Aug 21 00:10:08 2007 -0400
+
+ Add *~ to .gitignore to skip patch/emacs droppings
+
+commit d8a49874bbd05a927c42102c0c5c147cf72cb1dd
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Wed May 9 16:46:25 2007 +0100
+
+ bcopy needs definition in Xfuncs.h for Xming
+
+commit 7505880329d6b81f0c77d6aaa3995390659d5c63
+Author: Tilman Sauerbeck <tilman@code-monkey.de>
+Date: Tue May 1 14:54:27 2007 +0200
+
+ Added some more files to .gitignore.
+
+commit 0c55a57dca2e888ba089e280f62e1c5bb55db7d7
+Author: Tilman Sauerbeck <tilman@code-monkey.de>
+Date: Tue May 1 14:52:57 2007 +0200
+
+ Enable GCC's visibility attributes on GCC 4 or greater only.
+
+commit 30f5eedf800f6683161fca9fc3e2d6ddc9ce0ac3
+Author: Zephaniah E. Hull <warp@agamemnon.b5>
+Date: Fri Feb 2 15:11:26 2007 -0500
+
+ Add keysym definitions from Jim Gettys.
+
+commit 5951f0355c6b1c591241bccb2023e6c4d493e701
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Dec 16 01:09:50 2006 +0200
+
+ bump to 7.0.10
+
+commit 0422755ef9373fbb6f69fbb599d791331837f747
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Dec 16 01:09:44 2006 +0200
+
+ don't distribute Xfuncproto.h and Xpoll.h
+ Don't distribute these two files, as they're generated during the build.
+
+commit cf44526713681ccfb6ef929a9c25ea650c5d1a32
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Dec 6 19:02:19 2006 +0200
+
+ Makefile.am: make ChangeLog hook safer
+ Make ChangeLog hook as safe as possible.
+
+commit 528e313fd1f1ae6f2303d3963afe41545f55ef88
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Oct 26 00:45:44 2006 +0300
+
+ bump to 7.0.9
+
+commit ab484c934301a61edc66dc1e4f554ec97b53aaf8
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Oct 26 00:45:36 2006 +0300
+
+ Xfuncproto: add _X_LIKELY and _X_UNLIKELY
+ Add gcc branch hinting annotations.
+
+commit 178cae180bc8b2e8feaaeda6d7c0317cf2715e14
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Sep 21 18:43:06 2006 +0300
+
+ Xfuncproto: define _X_INLINE for older compilers
+
+commit 241e9dfd400aa21919d06fb7c78b5730eee12aab
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Sep 21 14:51:00 2006 +0300
+
+ bump to 7.0.8
+
+commit e51b21e316a5a1b9442a5d972b4ffa03455aca6e
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Sep 21 14:50:45 2006 +0300
+
+ XF86keysym: add keyboard/monitor brightness controls (Bug #8120)
+ Add XF86{Kbd,Mon}Brightness{Up,Down}, and XF86KbdLightOnOff.
+
+commit c3f56593f776e7f9e3e0d220c6bcf8be38a16839
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Sep 20 21:11:30 2006 +0300
+
+ Xfuncproto: add _X_INLINE
+
+commit 4fb2e257ae6de38971be8005283402226aea1ee5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri Jul 14 17:59:19 2006 -0700
+
+ Replace manual ChangeLog with dist-hook to generate from git log
+
+commit 2153ef4b7c2a93cba39ae08352ea2c46e5f0eefb
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri Jul 14 17:54:38 2006 -0700
+
+ renamed: .cvsignore -> .gitignore
+
+commit 0b76eb310307cd16e55d0c0792b54a2c6774fb88
+Author: Dan McNichol <mcnichol@austin.ibm.com>
+Date: Fri Jul 14 17:53:34 2006 -0700
+
+ Bug #7458: AIX changes to Xmd.h
+
+ Bugzilla Bug #7458 <https://bugs.freedesktop.org/show_bug.cgi?id=7458>
+ Patch #6179 <https://bugs.freedesktop.org/attachment.cgi?id=6179>
+
+commit bb7584b5c88236c59c4e3040bc7c28c150abf048
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Jun 10 15:33:50 2006 +0000
+
+ Add ISO_Level5_{Shift,Latch,Lock}.
+
+commit e9aebeae3661d4c464c7aa53722d0a6bf915101a
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Jun 1 23:31:20 2006 +0000
+
+ Bug #6887: Add dead_stroke, bump to 7.0.7. (Troy Korjuslommi)
+
+commit f3886640d29026359ffc4add39b66b8ff48472d3
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Jun 1 23:00:34 2006 +0000
+
+ Bump to 7.0.6.
+
+commit d10d0302be37adb22804270926332e9d701935bb
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Jun 1 23:00:03 2006 +0000
+
+ Bug #6296: Add support for Braille. (Samuel Thibault)
+
+commit 0471bfcce2787d2f1ff0fc2d019840e2bae8bc49
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Apr 26 23:26:49 2006 +0000
+
+ Bump to 7.0.5
+
+commit 2a2b6db1f78f94c8f3690f675f0c032401fb2541
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Apr 26 00:00:02 2006 +0000
+
+ Fix more comment typos.
+
+commit 33cea539618d58d64efb6a5c0465d14a471256cd
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Thu Apr 20 01:24:25 2006 +0000
+
+ On Solaris, #include <sys/isa_defs.h> to be sure _LP64 is defined in 64-bit
+ builds.
+ Fix some comment typos.
+
+commit 5e7d5cbf21c33f883ab508a51422775f59c4da00
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:39 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit 1827a78f3a23c77dbcddfc8227d85c5add59d819
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 05:49:47 2005 +0000
+
+ Update package version number for X11R7 RC3 release.
+
+commit 45811c86eb34e9f09e7d807ba4633107513f0d52
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 01:13:36 2005 +0000
+
+ Automatically generate FUNCPROTO and NARROWPROTO defines in Xfuncproto.h.
+
+commit c03cc7739b37ca504a2b56a73945755c41c68b2a
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Mon Nov 21 10:51:15 2005 +0000
+
+ Ignore Xpoll.h, which is generated now.
+
+commit 54c8ddf303053fb398e00fc8a35df712a7f3d47d
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Nov 21 02:47:21 2005 +0000
+
+ Change values of XK_MATHEMATICAL symbols to use 0x1000000 + Unicode value,
+ as Xorg Architecture Task Force agreed last year should be done for all
+ new keysyms mapped to Unicode characters.
+
+commit f13eca1bc0feba2476f87e019a4ef40693a61ed8
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Nov 9 21:20:33 2005 +0000
+
+ Update package version number for X11R7 RC2 release.
+
+commit 448763bde4a31cb012ad17cd6c5159411102432b
+Author: Kean Johnson <kean@armory.com>
+Date: Tue Nov 8 06:33:25 2005 +0000
+
+ See ChangeLog entry 2005-11-07 for details.
+
+commit 59a5a5ebb6781d417d7a4d5905999da5fc76a083
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:48:15 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit 3f74cc5e8309b2a4ac7671ca3c52c304ec5aa57f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Oct 15 00:48:27 2005 +0000
+
+ Remove duplicate keysyms accidentally added to XK_MATHEMATICAL section.
+
+commit eaffdc0d593b94d9036033911535371e73698573
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Oct 9 15:37:29 2005 +0000
+
+ Bug #4688: Add various mathematical keysyms (all Unicode).
+
+commit 40b6e64fb1084f7b0270c279ac7132e52886c912
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Sun Aug 21 15:27:27 2005 +0000
+
+ define CSRG_BASED here on systems that used to define it in Imake
+ configuration. For use in the modular tree.
+
+commit 04f9f7fd17cab16e5b0b135409011c0d284b002c
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Tue Aug 2 19:19:40 2005 +0000
+
+ Add basic .cvsignore files for proto modules.
+
+commit cd0400eeda5d7818232844d93343877ef0ff8168
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Tue Aug 2 18:36:30 2005 +0000
+
+ Fix the fds_bits test on OSX and maybe others. OSX defines fd_set in
+ <sys/types.h> just to be perverse.
+
+commit a475adb523a4d24cd53d436ba8c98ac7c8d37934
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jul 30 21:07:25 2005 +0000
+
+ Add prototypes of Xalloc/free functions.
+ Export ImUtil.h to match modular tree install.
+ Define SVR4 to 1 to avoid warning about redefining to different values.
+ Include missing headers to clear more compiler warnings.
+
+commit f6bd2288d3630ff7cb864e54cc7ebab1b3069067
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:57 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 74a3f7f77830e4417a4bc4145114030dfaef6f4e
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Jul 23 02:53:32 2005 +0000
+
+ Remove all _XOPEN_SOURCE definitions from Xos.h, as Xpoll.h.in now deals
+ with this by using which of fds_bits or __fds_bits we have.
+
+commit f97e34e65e403140dde00d260be0fd7f853ac8f0
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Fri Jul 22 08:01:39 2005 +0000
+
+ Add includex11dir as a path to the includes, sans X11/.
+ Turn Xpoll.h into a generated file. In the modular tree, substitute in
+ whichever of fds_bits or __fds_bits is being used for the member of
+ fd_set on the system; in the monolithic tree, substitute in fds_bits
+ unconditionally, as that's the way it was before thanks to
+ _XOPEN_SOURCE being defined.
+
+commit 7a9ce57163172557d6ba41119a5a3b2837dbbc8e
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jul 16 20:54:13 2005 +0000
+
+ Guard INCLUDE_ALLOCA_H define to end redefinition warnings.
+
+commit 825b6ae347b3896b8ea38e6021170d45ae3bfd65
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Thu Jul 14 22:08:38 2005 +0000
+
+ Don't define _XOPEN_SOURCE on SVR4, because it will REMOVE required
+ definitions.
+
+commit acc0551fb1af1152c1b630ff5e82f023f11751e2
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Jul 13 23:43:08 2005 +0000
+
+ #define INCLUDE_ALLOCA_H when building with Sun compilers. (Imake *.cf
+ files define this for a number of platforms in the monolith, but these
+ will need to be translated into #ifdef's or similar mechanism to work
+ in a world without Imake.)
+
+commit b8301067b6e962a3dc786dd909726b7e6cb81085
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Wed Jul 13 20:12:13 2005 +0000
+
+ include <X11/Xwindows.h> instead of <windows.h>. Several namespace
+ conflicts are worked around in Xwindows.h
+
+commit ec7a156bcdbe8e4bddf232d4a03f47d426096736
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Jul 13 07:23:56 2005 +0000
+
+ Make some minor source adjustments so that we don not need to use
+ -D_XOPEN_SOURCE -D_BSD_SOURCE everywhere as this will leak out of the
+ modular environment and into application build processes, potentially
+ foulling up their compiles.
+
+commit 2a0445903d06c332acf70cfd18ba57ddbbeada32
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Jul 3 07:55:00 2005 +0000
+
+ Move misc.h and os.h from proto/X11 to xserver/xorg/include.
+
+commit ef6f542053b30af29b8045ffa6ce26386aab7bba
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jun 28 13:15:27 2005 +0000
+
+ - Remove xfixes.pc.in from lib/lbxutil
+ - Add missing backslash in proto/X11/Makefile.am
+ Both pointed out by ISHIKAWA Mutsumi
+
+commit 4cf89be7baf8a79d2d399abd17c4e23279cca364
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Mon Jun 27 17:41:09 2005 +0000
+
+ - Add os.h and misc.h to proto/X11
+ - In symlink.sh move os.h and misc.h from xserver/include to proto/X11
+ - in xc/lib/lbxutil/ do some include-with-<>-instead-of-with-""
+
+commit e575c5104a8627428dd18c4040d4ad787655164a
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed May 25 22:12:21 2005 +0000
+
+ - Use XTRANS_CONNECTION_FLAGS macro in lib/FS/configure.ac
+ - Don't symlink transport.c, which is a generated file
+ - instead add a new file fs_transport.c that include Xtrans/X11/transport.c
+
+commit 207e3f82011d5f83db0eca318a1de50f0c1da0dc
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed May 25 21:47:56 2005 +0000
+
+ - Add FSlib to symlink.sh
+ - Change Xtrans includedir back to be X11/Xtrans, so that users of it can
+ continue to include <X11/*>
+ - Add build system for FSlib
+ - Conditionally include config.h in xc/lib/FS
+ - Remove redundant include of FSproto.h in xc/lib/FS
+ - Add check to proto/X11/configure.ac whether -D_XOPEN_SOURCE is needed.
+
+commit a5a4bfe9b432e7d8238f9a02d80be4ce6bb64978
+Author: Josh Triplett <josh@speakeasy.net>
+Date: Mon May 23 01:22:10 2005 +0000
+
+ The macros in Xpoll.h poke at the guts of struct fd_set in ways that only
+ work if _XOPEN_SOURCE is defined, so define it in Cflags in the
+ pkg-config file.
+
+commit 2f4c3aa871a047359f8121e6401be1ba4cf0b8e0
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:22:40 2005 +0000
+
+ revert last change, didn't do right thing at all, sorry for the noise
+
+commit 4809dd9150599a9e88f64cd1b82737872b7b1b94
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:10:19 2005 +0000
+
+ Require automake 1.7 in AM_INIT_AUTOMAKE
+
+commit 6ff17c33f0773e152122d66cbaffaa54e53e086c
+Author: Josh Triplett <josh@speakeasy.net>
+Date: Sat May 14 07:56:49 2005 +0000
+
+ Add AUTHORS file for X11 from xlibs tree.
+
+commit 3f8b0ba6071dcdd62ea424cab0bddb39db2ebe6a
+Author: Josh Triplett <josh@speakeasy.net>
+Date: Sat May 14 07:55:10 2005 +0000
+
+ Add some COPYING files.
+
+commit 803c8ecaba2f8c703bbb46c0d740bfa349ce0245
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri May 6 01:46:31 2005 +0000
+
+ Initial build system files for proto module.
+
+commit a870c60741273ebd6cb1e69b4e535ce3a6bc76bf
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Thu Apr 28 22:04:12 2005 +0000
+
+ Don't define X_NOT_STDC_ENV on Solaris x86. Bugzilla #3158:
+ https://bugs.freedesktop.org/show_bug.cgi?id=3158 Patch #2588:
+ https://bugs.freedesktop.org/attachment.cgi?id=2588 (Henry Zhao, Sun
+ Microsystems)
+
+commit 372f37171ba3875ea4bf7f60150d92869e06010f
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Wed Apr 20 13:58:17 2005 +0000
+
+ check for define PATH_MAX before referencing it
+
+commit e489ec65b4b2ab0a050d8dbf7ec0658e6decb8b3
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Mar 2 19:29:31 2005 +0000
+
+ Patch #2007 <https://bugs.freedesktop.org/attachment.cgi?id=2007>
+ 1) Fix Solaris #ifdefs to choose between UI/SVR4 (early POSIX draft) and
+ POSIX standard thread API's correctly.
+ 2) Fix calls to POSIX standard versions to check errors correctly. (POSIX
+ defines a return value of 0 on success, errno value on error, but the
+ macros were checking for -1 on error.)
+
+commit d761e87224d3e60c5355ac3e3468835fc3b4be92
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date: Wed Mar 2 11:20:29 2005 +0000
+
+ xc/config/cf/DragonFly.cf
+ xc/config/cf/Imake.cf
+ xc/config/cf/Imakefile
+ xc/config/imake/imake.c
+ xc/config/imake/imakemdep.h
+ xc/extras/drm/shared/drm.h
+ xc/include/Xos_r.h
+ xc/lib/xtrans/Xtranssock.c
+ xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
+ xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
+ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c
+ //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004
+ (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for
+ DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org>
+ and Mike Verona <firedragonfly@gmail.com>.
+
+commit 1cae0cb4b1442b34d76ee5623fb2a17ed2353c50
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Sun Jan 9 15:06:04 2005 +0000
+
+ Make sure PATH_MAX is at least 1024
+
+commit 9df4ffce552a0f6eca47764a3f79b466629e8bab
+Author: Egbert Eich <eich@suse.de>
+Date: Mon Jan 3 18:03:49 2005 +0000
+
+ gcc 4 doesn't like predeffines line 'linux' any more. To muffle the
+ compiler replace them with __linux__ (Bugzilla #2207).
+
+commit dd82af84ed67f439444e75ea1d032c082e15db51
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Mon Nov 15 15:06:53 2004 +0000
+
+ Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
+ mingw (Win32) port
+
+commit 618956f1f783a8c330aab8eac425937f0b8e50e1
+Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
+Date: Sun Sep 26 20:46:18 2004 +0000
+
+ The big keysym cleanup, to bring implementation in line with the recent
+ revision of Appendix A of the protocol spec. (Markus Kuhn)
+
+commit 7cb1490d8932d745b3a5e2b3370a000da064306f
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Aug 11 21:14:16 2004 +0000
+
+ Apply PPC64 build patch (Bug #303, Mike A. Harris, Alan Coopersmith).
+
+commit 5b67de2bce0e33a4a85439ebcf7b726a6da24545
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 18:43:05 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit e88a09c1df46637979c4d131a8e41af923ff4d45
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:31:34 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 9259b43390c50d330f557390cc4576f5315c3f53
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:10:53 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 99bbbc3fcaf67b02a50e4ff4007225b1b64beb36
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:35:11 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit 82d7bb39bc84eb16134e931263f53bc88d1788ac
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:22:24 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 0700ff31a84abc06fdf4b05c2328ff2329dc909c
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Jan 29 08:07:54 2004 +0000
+
+ Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit ad76b5cc436937d9fb945bd43d9356651fe182ca
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Dec 19 20:54:20 2003 +0000
+
+ XFree86 4.3.99.902 (RC 2)
+
+commit 376f9efdab6ef2dce267caa0a0228892e768e390
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:28:01 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 5ec315b967cb1ae519f514896f0b48fb5407f863
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:42 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit f2001f5bd5316842106a98b23f09400688575fa3
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:42 2003 +0000
+
+ Initial revision
+
+commit ee0a1a43dc707f960e637fdf2118723e4de0a55d
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 15:54:35 2003 +0000
+
+ R6.6 is the Xorg base-line
diff --git a/X11/DECkeysym.h b/X11/DECkeysym.h
new file mode 100644
index 000000000..6ab103e5d
--- /dev/null
+++ b/X11/DECkeysym.h
@@ -0,0 +1,67 @@
+/* $Xorg: DECkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+
+/***********************************************************
+
+Copyright 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * DEC private keysyms
+ * (29th bit set)
+ */
+
+/* two-key compose sequence initiators, chosen to map to Latin1 characters */
+
+#define DXK_ring_accent 0x1000FEB0
+#define DXK_circumflex_accent 0x1000FE5E
+#define DXK_cedilla_accent 0x1000FE2C
+#define DXK_acute_accent 0x1000FE27
+#define DXK_grave_accent 0x1000FE60
+#define DXK_tilde 0x1000FE7E
+#define DXK_diaeresis 0x1000FE22
+
+/* special keysym for LK2** "Remove" key on editing keypad */
+
+#define DXK_Remove 0x1000FF00 /* Remove */
diff --git a/X11/HPkeysym.h b/X11/HPkeysym.h
new file mode 100644
index 000000000..2d09277d8
--- /dev/null
+++ b/X11/HPkeysym.h
@@ -0,0 +1,165 @@
+/* $Xorg: HPkeysym.h,v 1.5 2001/02/09 02:03:22 xorgcvs Exp $ */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Hewlett Packard
+or Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+*/
+
+#ifndef _HPKEYSYM_H
+
+#define _HPKEYSYM
+
+#define hpXK_ClearLine 0x1000FF6F
+#define hpXK_InsertLine 0x1000FF70
+#define hpXK_DeleteLine 0x1000FF71
+#define hpXK_InsertChar 0x1000FF72
+#define hpXK_DeleteChar 0x1000FF73
+#define hpXK_BackTab 0x1000FF74
+#define hpXK_KP_BackTab 0x1000FF75
+#define hpXK_Modelock1 0x1000FF48
+#define hpXK_Modelock2 0x1000FF49
+#define hpXK_Reset 0x1000FF6C
+#define hpXK_System 0x1000FF6D
+#define hpXK_User 0x1000FF6E
+#define hpXK_mute_acute 0x100000A8
+#define hpXK_mute_grave 0x100000A9
+#define hpXK_mute_asciicircum 0x100000AA
+#define hpXK_mute_diaeresis 0x100000AB
+#define hpXK_mute_asciitilde 0x100000AC
+#define hpXK_lira 0x100000AF
+#define hpXK_guilder 0x100000BE
+#define hpXK_Ydiaeresis 0x100000EE
+#define hpXK_IO 0x100000EE
+#define hpXK_longminus 0x100000F6
+#define hpXK_block 0x100000FC
+
+
+#ifndef _OSF_Keysyms
+#define _OSF_Keysyms
+
+#define osfXK_Copy 0x1004FF02
+#define osfXK_Cut 0x1004FF03
+#define osfXK_Paste 0x1004FF04
+#define osfXK_BackTab 0x1004FF07
+#define osfXK_BackSpace 0x1004FF08
+#define osfXK_Clear 0x1004FF0B
+#define osfXK_Escape 0x1004FF1B
+#define osfXK_AddMode 0x1004FF31
+#define osfXK_PrimaryPaste 0x1004FF32
+#define osfXK_QuickPaste 0x1004FF33
+#define osfXK_PageLeft 0x1004FF40
+#define osfXK_PageUp 0x1004FF41
+#define osfXK_PageDown 0x1004FF42
+#define osfXK_PageRight 0x1004FF43
+#define osfXK_Activate 0x1004FF44
+#define osfXK_MenuBar 0x1004FF45
+#define osfXK_Left 0x1004FF51
+#define osfXK_Up 0x1004FF52
+#define osfXK_Right 0x1004FF53
+#define osfXK_Down 0x1004FF54
+#define osfXK_EndLine 0x1004FF57
+#define osfXK_BeginLine 0x1004FF58
+#define osfXK_EndData 0x1004FF59
+#define osfXK_BeginData 0x1004FF5A
+#define osfXK_PrevMenu 0x1004FF5B
+#define osfXK_NextMenu 0x1004FF5C
+#define osfXK_PrevField 0x1004FF5D
+#define osfXK_NextField 0x1004FF5E
+#define osfXK_Select 0x1004FF60
+#define osfXK_Insert 0x1004FF63
+#define osfXK_Undo 0x1004FF65
+#define osfXK_Menu 0x1004FF67
+#define osfXK_Cancel 0x1004FF69
+#define osfXK_Help 0x1004FF6A
+#define osfXK_SelectAll 0x1004FF71
+#define osfXK_DeselectAll 0x1004FF72
+#define osfXK_Reselect 0x1004FF73
+#define osfXK_Extend 0x1004FF74
+#define osfXK_Restore 0x1004FF78
+#define osfXK_Delete 0x1004FFFF
+
+#endif /* _OSF_Keysyms */
+
+
+/**************************************************************
+ * The use of the following macros is deprecated.
+ * They are listed below only for backwards compatibility.
+ */
+#define XK_Reset 0x1000FF6C
+#define XK_System 0x1000FF6D
+#define XK_User 0x1000FF6E
+#define XK_ClearLine 0x1000FF6F
+#define XK_InsertLine 0x1000FF70
+#define XK_DeleteLine 0x1000FF71
+#define XK_InsertChar 0x1000FF72
+#define XK_DeleteChar 0x1000FF73
+#define XK_BackTab 0x1000FF74
+#define XK_KP_BackTab 0x1000FF75
+#define XK_Ext16bit_L 0x1000FF76
+#define XK_Ext16bit_R 0x1000FF77
+#define XK_mute_acute 0x100000a8
+#define XK_mute_grave 0x100000a9
+#define XK_mute_asciicircum 0x100000aa
+#define XK_mute_diaeresis 0x100000ab
+#define XK_mute_asciitilde 0x100000ac
+#define XK_lira 0x100000af
+#define XK_guilder 0x100000be
+#ifndef XK_Ydiaeresis
+#define XK_Ydiaeresis 0x100000ee
+#endif
+#define XK_IO 0x100000ee
+#define XK_longminus 0x100000f6
+#define XK_block 0x100000fc
+
+#endif /* _HPKEYSYM_H */
diff --git a/X11/Makefile.am b/X11/Makefile.am
new file mode 100644
index 000000000..533d281fb
--- /dev/null
+++ b/X11/Makefile.am
@@ -0,0 +1,45 @@
+xprotodir = $(includedir)/X11
+xproto_HEADERS = \
+ ap_keysym.h \
+ DECkeysym.h \
+ HPkeysym.h \
+ keysymdef.h \
+ keysym.h \
+ Sunkeysym.h \
+ Xalloca.h \
+ Xarch.h \
+ Xatom.h \
+ Xdefs.h \
+ XF86keysym.h \
+ Xfuncs.h \
+ X.h \
+ Xmd.h \
+ Xosdefs.h \
+ Xos.h \
+ Xos_r.h \
+ Xproto.h \
+ Xprotostr.h \
+ Xthreads.h \
+ Xw32defs.h \
+ XWDFile.h \
+ Xwindows.h \
+ Xwinsock.h
+
+nodist_xproto_HEADERS = \
+ Xfuncproto.h \
+ Xpoll.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xproto.pc
+
+EXTRA_DIST = autogen.sh xproto.pc.in ChangeLog
+
+CLEANFILES=ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
+
diff --git a/X11/Makefile.in b/X11/Makefile.in
new file mode 100644
index 000000000..d98cb473f
--- /dev/null
+++ b/X11/Makefile.in
@@ -0,0 +1,628 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/Xfuncproto.h.in \
+ $(srcdir)/Xpoll.h.in $(srcdir)/do-not-use-config.h.in \
+ $(srcdir)/xproto.pc.in $(top_srcdir)/configure \
+ $(xproto_HEADERS) AUTHORS COPYING ChangeLog config.guess \
+ config.sub install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = do-not-use-config.h Xfuncproto.h
+CONFIG_CLEAN_FILES = Xpoll.h xproto.pc
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xprotodir)" \
+ "$(DESTDIR)$(xprotodir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+nodist_xprotoHEADERS_INSTALL = $(INSTALL_HEADER)
+xprotoHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(nodist_xproto_HEADERS) $(xproto_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_FDS_BITS = @USE_FDS_BITS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+xprotodir = $(includedir)/X11
+xproto_HEADERS = \
+ ap_keysym.h \
+ DECkeysym.h \
+ HPkeysym.h \
+ keysymdef.h \
+ keysym.h \
+ Sunkeysym.h \
+ Xalloca.h \
+ Xarch.h \
+ Xatom.h \
+ Xdefs.h \
+ XF86keysym.h \
+ Xfuncs.h \
+ X.h \
+ Xmd.h \
+ Xosdefs.h \
+ Xos.h \
+ Xos_r.h \
+ Xproto.h \
+ Xprotostr.h \
+ Xthreads.h \
+ Xw32defs.h \
+ XWDFile.h \
+ Xwindows.h \
+ Xwinsock.h
+
+nodist_xproto_HEADERS = \
+ Xfuncproto.h \
+ Xpoll.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xproto.pc
+EXTRA_DIST = autogen.sh xproto.pc.in ChangeLog
+CLEANFILES = ChangeLog
+all: do-not-use-config.h Xfuncproto.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+do-not-use-config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/do-not-use-config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status do-not-use-config.h
+$(srcdir)/do-not-use-config.h.in: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+Xfuncproto.h: stamp-h2
+ @if test ! -f $@; then \
+ rm -f stamp-h2; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \
+ else :; fi
+
+stamp-h2: $(srcdir)/Xfuncproto.h.in $(top_builddir)/config.status
+ @rm -f stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status Xfuncproto.h
+
+distclean-hdr:
+ -rm -f do-not-use-config.h stamp-h1 Xfuncproto.h stamp-h2
+Xpoll.h: $(top_builddir)/config.status $(srcdir)/Xpoll.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+xproto.pc: $(top_builddir)/config.status $(srcdir)/xproto.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-nodist_xprotoHEADERS: $(nodist_xproto_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xprotodir)" || $(MKDIR_P) "$(DESTDIR)$(xprotodir)"
+ @list='$(nodist_xproto_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(nodist_xprotoHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xprotodir)/$$f'"; \
+ $(nodist_xprotoHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xprotodir)/$$f"; \
+ done
+
+uninstall-nodist_xprotoHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_xproto_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(xprotodir)/$$f'"; \
+ rm -f "$(DESTDIR)$(xprotodir)/$$f"; \
+ done
+install-xprotoHEADERS: $(xproto_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xprotodir)" || $(MKDIR_P) "$(DESTDIR)$(xprotodir)"
+ @list='$(xproto_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(xprotoHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xprotodir)/$$f'"; \
+ $(xprotoHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xprotodir)/$$f"; \
+ done
+
+uninstall-xprotoHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xproto_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(xprotodir)/$$f'"; \
+ rm -f "$(DESTDIR)$(xprotodir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) do-not-use-config.h.in Xfuncproto.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) do-not-use-config.h.in Xfuncproto.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d $(distdir) || mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS) do-not-use-config.h Xfuncproto.h
+installdirs:
+ for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xprotodir)" "$(DESTDIR)$(xprotodir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nodist_xprotoHEADERS install-pkgconfigDATA \
+ install-xprotoHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nodist_xprotoHEADERS uninstall-pkgconfigDATA \
+ uninstall-xprotoHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+ distclean distclean-generic distclean-hdr distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-nodist_xprotoHEADERS \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip install-xprotoHEADERS installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-nodist_xprotoHEADERS uninstall-pkgconfigDATA \
+ uninstall-xprotoHEADERS
+
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/X11/Sunkeysym.h b/X11/Sunkeysym.h
new file mode 100644
index 000000000..e72344440
--- /dev/null
+++ b/X11/Sunkeysym.h
@@ -0,0 +1,112 @@
+/* $Xorg: Sunkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+
+/************************************************************
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1991 by Sun Microsystems, Inc. Mountain View, CA.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright no-
+tice appear in all copies and that both that copyright no-
+tice and this permission notice appear in supporting docu-
+mentation, and that the name of Sun not be used in
+advertising or publicity pertaining to distribution of the
+software without specific prior written permission. Sun
+makes no representations about the suitability of this
+software for any purpose. It is provided "as is" without any
+express or implied warranty.
+
+SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
+NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
+ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+***********************************************************/
+
+/*
+ * Floating Accent
+ */
+
+#define SunXK_FA_Grave 0x1005FF00
+#define SunXK_FA_Circum 0x1005FF01
+#define SunXK_FA_Tilde 0x1005FF02
+#define SunXK_FA_Acute 0x1005FF03
+#define SunXK_FA_Diaeresis 0x1005FF04
+#define SunXK_FA_Cedilla 0x1005FF05
+
+/*
+ * Miscellaneous Functions
+ */
+
+#define SunXK_F36 0x1005FF10 /* Labeled F11 */
+#define SunXK_F37 0x1005FF11 /* Labeled F12 */
+
+#define SunXK_Sys_Req 0x1005FF60
+#define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */
+
+/*
+ * International & Multi-Key Character Composition
+ */
+
+#define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */
+#define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */
+
+/*
+ * Cursor Control
+ */
+
+#define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */
+#define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */
+
+/*
+ * Open Look Functions
+ */
+
+#define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */
+#define SunXK_Again 0x0000FF66 /* Same as XK_Redo */
+#define SunXK_Find 0x0000FF68 /* Same as XK_Find */
+#define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */
+#define SunXK_Props 0x1005FF70
+#define SunXK_Front 0x1005FF71
+#define SunXK_Copy 0x1005FF72
+#define SunXK_Open 0x1005FF73
+#define SunXK_Paste 0x1005FF74
+#define SunXK_Cut 0x1005FF75
+
+#define SunXK_PowerSwitch 0x1005FF76
+#define SunXK_AudioLowerVolume 0x1005FF77
+#define SunXK_AudioMute 0x1005FF78
+#define SunXK_AudioRaiseVolume 0x1005FF79
+#define SunXK_VideoDegauss 0x1005FF7A
+#define SunXK_VideoLowerBrightness 0x1005FF7B
+#define SunXK_VideoRaiseBrightness 0x1005FF7C
+#define SunXK_PowerSwitchShift 0x1005FF7D
diff --git a/X11/X.h b/X11/X.h
new file mode 100644
index 000000000..ebcc767da
--- /dev/null
+++ b/X11/X.h
@@ -0,0 +1,722 @@
+/*
+ * $Xorg: X.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
+ */
+
+/* Definitions for the X window system likely to be used by applications */
+
+#ifndef X_H
+#define X_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/X.h,v 1.6 2003/07/09 15:27:28 tsi Exp $ */
+
+#define X_PROTOCOL 11 /* current protocol version */
+#define X_PROTOCOL_REVISION 0 /* current minor version */
+
+/* Resources */
+
+/*
+ * _XSERVER64 must ONLY be defined when compiling X server sources on
+ * systems where unsigned long is not 32 bits, must NOT be used in
+ * client or library code.
+ */
+#ifndef _XSERVER64
+# ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+typedef unsigned long XID;
+# endif
+# ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+typedef unsigned long Mask;
+# endif
+# ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+typedef unsigned long Atom; /* Also in Xdefs.h */
+# endif
+typedef unsigned long VisualID;
+typedef unsigned long Time;
+#else
+# include <X11/Xmd.h>
+# ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+typedef CARD32 XID;
+# endif
+# ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+typedef CARD32 Mask;
+# endif
+# ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+typedef CARD32 Atom;
+# endif
+typedef CARD32 VisualID;
+typedef CARD32 Time;
+#endif
+
+typedef XID Window;
+typedef XID Drawable;
+#ifndef _XTYPEDEF_FONT
+# define _XTYPEDEF_FONT
+typedef XID Font;
+#endif
+typedef XID Pixmap;
+typedef XID Cursor;
+typedef XID Colormap;
+typedef XID GContext;
+typedef XID KeySym;
+
+typedef unsigned char KeyCode;
+
+/*****************************************************************
+ * RESERVED RESOURCE AND CONSTANT DEFINITIONS
+ *****************************************************************/
+
+#ifndef None
+#define None 0L /* universal null resource or null atom */
+#endif
+
+#define ParentRelative 1L /* background pixmap in CreateWindow
+ and ChangeWindowAttributes */
+
+#define CopyFromParent 0L /* border pixmap in CreateWindow
+ and ChangeWindowAttributes
+ special VisualID and special window
+ class passed to CreateWindow */
+
+#define PointerWindow 0L /* destination window in SendEvent */
+#define InputFocus 1L /* destination window in SendEvent */
+
+#define PointerRoot 1L /* focus window in SetInputFocus */
+
+#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
+
+#define AnyKey 0L /* special Key Code, passed to GrabKey */
+
+#define AnyButton 0L /* special Button Code, passed to GrabButton */
+
+#define AllTemporary 0L /* special Resource ID passed to KillClient */
+
+#define CurrentTime 0L /* special Time */
+
+#define NoSymbol 0L /* special KeySym */
+
+/*****************************************************************
+ * EVENT DEFINITIONS
+ *****************************************************************/
+
+/* Input Event Masks. Used as event-mask window attribute and as arguments
+ to Grab requests. Not to be confused with event names. */
+
+#define NoEventMask 0L
+#define KeyPressMask (1L<<0)
+#define KeyReleaseMask (1L<<1)
+#define ButtonPressMask (1L<<2)
+#define ButtonReleaseMask (1L<<3)
+#define EnterWindowMask (1L<<4)
+#define LeaveWindowMask (1L<<5)
+#define PointerMotionMask (1L<<6)
+#define PointerMotionHintMask (1L<<7)
+#define Button1MotionMask (1L<<8)
+#define Button2MotionMask (1L<<9)
+#define Button3MotionMask (1L<<10)
+#define Button4MotionMask (1L<<11)
+#define Button5MotionMask (1L<<12)
+#define ButtonMotionMask (1L<<13)
+#define KeymapStateMask (1L<<14)
+#define ExposureMask (1L<<15)
+#define VisibilityChangeMask (1L<<16)
+#define StructureNotifyMask (1L<<17)
+#define ResizeRedirectMask (1L<<18)
+#define SubstructureNotifyMask (1L<<19)
+#define SubstructureRedirectMask (1L<<20)
+#define FocusChangeMask (1L<<21)
+#define PropertyChangeMask (1L<<22)
+#define ColormapChangeMask (1L<<23)
+#define OwnerGrabButtonMask (1L<<24)
+
+/* Event names. Used in "type" field in XEvent structures. Not to be
+confused with event masks above. They start from 2 because 0 and 1
+are reserved in the protocol for errors and replies. */
+
+#define KeyPress 2
+#define KeyRelease 3
+#define ButtonPress 4
+#define ButtonRelease 5
+#define MotionNotify 6
+#define EnterNotify 7
+#define LeaveNotify 8
+#define FocusIn 9
+#define FocusOut 10
+#define KeymapNotify 11
+#define Expose 12
+#define GraphicsExpose 13
+#define NoExpose 14
+#define VisibilityNotify 15
+#define CreateNotify 16
+#define DestroyNotify 17
+#define UnmapNotify 18
+#define MapNotify 19
+#define MapRequest 20
+#define ReparentNotify 21
+#define ConfigureNotify 22
+#define ConfigureRequest 23
+#define GravityNotify 24
+#define ResizeRequest 25
+#define CirculateNotify 26
+#define CirculateRequest 27
+#define PropertyNotify 28
+#define SelectionClear 29
+#define SelectionRequest 30
+#define SelectionNotify 31
+#define ColormapNotify 32
+#define ClientMessage 33
+#define MappingNotify 34
+#define GenericEvent 35
+#define LASTEvent 36 /* must be bigger than any event # */
+
+
+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
+ state in various key-, mouse-, and button-related events. */
+
+#define ShiftMask (1<<0)
+#define LockMask (1<<1)
+#define ControlMask (1<<2)
+#define Mod1Mask (1<<3)
+#define Mod2Mask (1<<4)
+#define Mod3Mask (1<<5)
+#define Mod4Mask (1<<6)
+#define Mod5Mask (1<<7)
+
+/* modifier names. Used to build a SetModifierMapping request or
+ to read a GetModifierMapping request. These correspond to the
+ masks defined above. */
+#define ShiftMapIndex 0
+#define LockMapIndex 1
+#define ControlMapIndex 2
+#define Mod1MapIndex 3
+#define Mod2MapIndex 4
+#define Mod3MapIndex 5
+#define Mod4MapIndex 6
+#define Mod5MapIndex 7
+
+
+/* button masks. Used in same manner as Key masks above. Not to be confused
+ with button names below. */
+
+#define Button1Mask (1<<8)
+#define Button2Mask (1<<9)
+#define Button3Mask (1<<10)
+#define Button4Mask (1<<11)
+#define Button5Mask (1<<12)
+
+#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
+
+
+/* button names. Used as arguments to GrabButton and as detail in ButtonPress
+ and ButtonRelease events. Not to be confused with button masks above.
+ Note that 0 is already defined above as "AnyButton". */
+
+#define Button1 1
+#define Button2 2
+#define Button3 3
+#define Button4 4
+#define Button5 5
+
+/* Notify modes */
+
+#define NotifyNormal 0
+#define NotifyGrab 1
+#define NotifyUngrab 2
+#define NotifyWhileGrabbed 3
+
+#define NotifyHint 1 /* for MotionNotify events */
+
+/* Notify detail */
+
+#define NotifyAncestor 0
+#define NotifyVirtual 1
+#define NotifyInferior 2
+#define NotifyNonlinear 3
+#define NotifyNonlinearVirtual 4
+#define NotifyPointer 5
+#define NotifyPointerRoot 6
+#define NotifyDetailNone 7
+
+/* Visibility notify */
+
+#define VisibilityUnobscured 0
+#define VisibilityPartiallyObscured 1
+#define VisibilityFullyObscured 2
+
+/* Circulation request */
+
+#define PlaceOnTop 0
+#define PlaceOnBottom 1
+
+/* protocol families */
+
+#define FamilyInternet 0 /* IPv4 */
+#define FamilyDECnet 1
+#define FamilyChaos 2
+#define FamilyInternet6 6 /* IPv6 */
+
+/* authentication families not tied to a specific protocol */
+#define FamilyServerInterpreted 5
+
+/* Property notification */
+
+#define PropertyNewValue 0
+#define PropertyDelete 1
+
+/* Color Map notification */
+
+#define ColormapUninstalled 0
+#define ColormapInstalled 1
+
+/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
+
+#define GrabModeSync 0
+#define GrabModeAsync 1
+
+/* GrabPointer, GrabKeyboard reply status */
+
+#define GrabSuccess 0
+#define AlreadyGrabbed 1
+#define GrabInvalidTime 2
+#define GrabNotViewable 3
+#define GrabFrozen 4
+
+/* AllowEvents modes */
+
+#define AsyncPointer 0
+#define SyncPointer 1
+#define ReplayPointer 2
+#define AsyncKeyboard 3
+#define SyncKeyboard 4
+#define ReplayKeyboard 5
+#define AsyncBoth 6
+#define SyncBoth 7
+
+/* Used in SetInputFocus, GetInputFocus */
+
+#define RevertToNone (int)None
+#define RevertToPointerRoot (int)PointerRoot
+#define RevertToParent 2
+
+/*****************************************************************
+ * ERROR CODES
+ *****************************************************************/
+
+#define Success 0 /* everything's okay */
+#define BadRequest 1 /* bad request code */
+#define BadValue 2 /* int parameter out of range */
+#define BadWindow 3 /* parameter not a Window */
+#define BadPixmap 4 /* parameter not a Pixmap */
+#define BadAtom 5 /* parameter not an Atom */
+#define BadCursor 6 /* parameter not a Cursor */
+#define BadFont 7 /* parameter not a Font */
+#define BadMatch 8 /* parameter mismatch */
+#define BadDrawable 9 /* parameter not a Pixmap or Window */
+#define BadAccess 10 /* depending on context:
+ - key/button already grabbed
+ - attempt to free an illegal
+ cmap entry
+ - attempt to store into a read-only
+ color map entry.
+ - attempt to modify the access control
+ list from other than the local host.
+ */
+#define BadAlloc 11 /* insufficient resources */
+#define BadColor 12 /* no such colormap */
+#define BadGC 13 /* parameter not a GC */
+#define BadIDChoice 14 /* choice not in range or already used */
+#define BadName 15 /* font or color name doesn't exist */
+#define BadLength 16 /* Request length incorrect */
+#define BadImplementation 17 /* server is defective */
+
+#define FirstExtensionError 128
+#define LastExtensionError 255
+
+/*****************************************************************
+ * WINDOW DEFINITIONS
+ *****************************************************************/
+
+/* Window classes used by CreateWindow */
+/* Note that CopyFromParent is already defined as 0 above */
+
+#define InputOutput 1
+#define InputOnly 2
+
+/* Window attributes for CreateWindow and ChangeWindowAttributes */
+
+#define CWBackPixmap (1L<<0)
+#define CWBackPixel (1L<<1)
+#define CWBorderPixmap (1L<<2)
+#define CWBorderPixel (1L<<3)
+#define CWBitGravity (1L<<4)
+#define CWWinGravity (1L<<5)
+#define CWBackingStore (1L<<6)
+#define CWBackingPlanes (1L<<7)
+#define CWBackingPixel (1L<<8)
+#define CWOverrideRedirect (1L<<9)
+#define CWSaveUnder (1L<<10)
+#define CWEventMask (1L<<11)
+#define CWDontPropagate (1L<<12)
+#define CWColormap (1L<<13)
+#define CWCursor (1L<<14)
+
+/* ConfigureWindow structure */
+
+#define CWX (1<<0)
+#define CWY (1<<1)
+#define CWWidth (1<<2)
+#define CWHeight (1<<3)
+#define CWBorderWidth (1<<4)
+#define CWSibling (1<<5)
+#define CWStackMode (1<<6)
+
+
+/* Bit Gravity */
+
+#define ForgetGravity 0
+#define NorthWestGravity 1
+#define NorthGravity 2
+#define NorthEastGravity 3
+#define WestGravity 4
+#define CenterGravity 5
+#define EastGravity 6
+#define SouthWestGravity 7
+#define SouthGravity 8
+#define SouthEastGravity 9
+#define StaticGravity 10
+
+/* Window gravity + bit gravity above */
+
+#define UnmapGravity 0
+
+/* Used in CreateWindow for backing-store hint */
+
+#define NotUseful 0
+#define WhenMapped 1
+#define Always 2
+
+/* Used in GetWindowAttributes reply */
+
+#define IsUnmapped 0
+#define IsUnviewable 1
+#define IsViewable 2
+
+/* Used in ChangeSaveSet */
+
+#define SetModeInsert 0
+#define SetModeDelete 1
+
+/* Used in ChangeCloseDownMode */
+
+#define DestroyAll 0
+#define RetainPermanent 1
+#define RetainTemporary 2
+
+/* Window stacking method (in configureWindow) */
+
+#define Above 0
+#define Below 1
+#define TopIf 2
+#define BottomIf 3
+#define Opposite 4
+
+/* Circulation direction */
+
+#define RaiseLowest 0
+#define LowerHighest 1
+
+/* Property modes */
+
+#define PropModeReplace 0
+#define PropModePrepend 1
+#define PropModeAppend 2
+
+/*****************************************************************
+ * GRAPHICS DEFINITIONS
+ *****************************************************************/
+
+/* graphics functions, as in GC.alu */
+
+#define GXclear 0x0 /* 0 */
+#define GXand 0x1 /* src AND dst */
+#define GXandReverse 0x2 /* src AND NOT dst */
+#define GXcopy 0x3 /* src */
+#define GXandInverted 0x4 /* NOT src AND dst */
+#define GXnoop 0x5 /* dst */
+#define GXxor 0x6 /* src XOR dst */
+#define GXor 0x7 /* src OR dst */
+#define GXnor 0x8 /* NOT src AND NOT dst */
+#define GXequiv 0x9 /* NOT src XOR dst */
+#define GXinvert 0xa /* NOT dst */
+#define GXorReverse 0xb /* src OR NOT dst */
+#define GXcopyInverted 0xc /* NOT src */
+#define GXorInverted 0xd /* NOT src OR dst */
+#define GXnand 0xe /* NOT src OR NOT dst */
+#define GXset 0xf /* 1 */
+
+/* LineStyle */
+
+#define LineSolid 0
+#define LineOnOffDash 1
+#define LineDoubleDash 2
+
+/* capStyle */
+
+#define CapNotLast 0
+#define CapButt 1
+#define CapRound 2
+#define CapProjecting 3
+
+/* joinStyle */
+
+#define JoinMiter 0
+#define JoinRound 1
+#define JoinBevel 2
+
+/* fillStyle */
+
+#define FillSolid 0
+#define FillTiled 1
+#define FillStippled 2
+#define FillOpaqueStippled 3
+
+/* fillRule */
+
+#define EvenOddRule 0
+#define WindingRule 1
+
+/* subwindow mode */
+
+#define ClipByChildren 0
+#define IncludeInferiors 1
+
+/* SetClipRectangles ordering */
+
+#define Unsorted 0
+#define YSorted 1
+#define YXSorted 2
+#define YXBanded 3
+
+/* CoordinateMode for drawing routines */
+
+#define CoordModeOrigin 0 /* relative to the origin */
+#define CoordModePrevious 1 /* relative to previous point */
+
+/* Polygon shapes */
+
+#define Complex 0 /* paths may intersect */
+#define Nonconvex 1 /* no paths intersect, but not convex */
+#define Convex 2 /* wholly convex */
+
+/* Arc modes for PolyFillArc */
+
+#define ArcChord 0 /* join endpoints of arc */
+#define ArcPieSlice 1 /* join endpoints to center of arc */
+
+/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
+ GC.stateChanges */
+
+#define GCFunction (1L<<0)
+#define GCPlaneMask (1L<<1)
+#define GCForeground (1L<<2)
+#define GCBackground (1L<<3)
+#define GCLineWidth (1L<<4)
+#define GCLineStyle (1L<<5)
+#define GCCapStyle (1L<<6)
+#define GCJoinStyle (1L<<7)
+#define GCFillStyle (1L<<8)
+#define GCFillRule (1L<<9)
+#define GCTile (1L<<10)
+#define GCStipple (1L<<11)
+#define GCTileStipXOrigin (1L<<12)
+#define GCTileStipYOrigin (1L<<13)
+#define GCFont (1L<<14)
+#define GCSubwindowMode (1L<<15)
+#define GCGraphicsExposures (1L<<16)
+#define GCClipXOrigin (1L<<17)
+#define GCClipYOrigin (1L<<18)
+#define GCClipMask (1L<<19)
+#define GCDashOffset (1L<<20)
+#define GCDashList (1L<<21)
+#define GCArcMode (1L<<22)
+
+#define GCLastBit 22
+/*****************************************************************
+ * FONTS
+ *****************************************************************/
+
+/* used in QueryFont -- draw direction */
+
+#define FontLeftToRight 0
+#define FontRightToLeft 1
+
+#define FontChange 255
+
+/*****************************************************************
+ * IMAGING
+ *****************************************************************/
+
+/* ImageFormat -- PutImage, GetImage */
+
+#define XYBitmap 0 /* depth 1, XYFormat */
+#define XYPixmap 1 /* depth == drawable depth */
+#define ZPixmap 2 /* depth == drawable depth */
+
+/*****************************************************************
+ * COLOR MAP STUFF
+ *****************************************************************/
+
+/* For CreateColormap */
+
+#define AllocNone 0 /* create map with no entries */
+#define AllocAll 1 /* allocate entire map writeable */
+
+
+/* Flags used in StoreNamedColor, StoreColors */
+
+#define DoRed (1<<0)
+#define DoGreen (1<<1)
+#define DoBlue (1<<2)
+
+/*****************************************************************
+ * CURSOR STUFF
+ *****************************************************************/
+
+/* QueryBestSize Class */
+
+#define CursorShape 0 /* largest size that can be displayed */
+#define TileShape 1 /* size tiled fastest */
+#define StippleShape 2 /* size stippled fastest */
+
+/*****************************************************************
+ * KEYBOARD/POINTER STUFF
+ *****************************************************************/
+
+#define AutoRepeatModeOff 0
+#define AutoRepeatModeOn 1
+#define AutoRepeatModeDefault 2
+
+#define LedModeOff 0
+#define LedModeOn 1
+
+/* masks for ChangeKeyboardControl */
+
+#define KBKeyClickPercent (1L<<0)
+#define KBBellPercent (1L<<1)
+#define KBBellPitch (1L<<2)
+#define KBBellDuration (1L<<3)
+#define KBLed (1L<<4)
+#define KBLedMode (1L<<5)
+#define KBKey (1L<<6)
+#define KBAutoRepeatMode (1L<<7)
+
+#define MappingSuccess 0
+#define MappingBusy 1
+#define MappingFailed 2
+
+#define MappingModifier 0
+#define MappingKeyboard 1
+#define MappingPointer 2
+
+/*****************************************************************
+ * SCREEN SAVER STUFF
+ *****************************************************************/
+
+#define DontPreferBlanking 0
+#define PreferBlanking 1
+#define DefaultBlanking 2
+
+#define DisableScreenSaver 0
+#define DisableScreenInterval 0
+
+#define DontAllowExposures 0
+#define AllowExposures 1
+#define DefaultExposures 2
+
+/* for ForceScreenSaver */
+
+#define ScreenSaverReset 0
+#define ScreenSaverActive 1
+
+/*****************************************************************
+ * HOSTS AND CONNECTIONS
+ *****************************************************************/
+
+/* for ChangeHosts */
+
+#define HostInsert 0
+#define HostDelete 1
+
+/* for ChangeAccessControl */
+
+#define EnableAccess 1
+#define DisableAccess 0
+
+/* Display classes used in opening the connection
+ * Note that the statically allocated ones are even numbered and the
+ * dynamically changeable ones are odd numbered */
+
+#define StaticGray 0
+#define GrayScale 1
+#define StaticColor 2
+#define PseudoColor 3
+#define TrueColor 4
+#define DirectColor 5
+
+
+/* Byte order used in imageByteOrder and bitmapBitOrder */
+
+#define LSBFirst 0
+#define MSBFirst 1
+
+#endif /* X_H */
diff --git a/X11/XF86keysym.h b/X11/XF86keysym.h
new file mode 100644
index 000000000..2a39f4ea1
--- /dev/null
+++ b/X11/XF86keysym.h
@@ -0,0 +1,228 @@
+/* $XFree86: xc/include/XF86keysym.h,v 1.16 2003/02/11 02:51:10 dawes Exp $ */
+
+/*
+ * XFree86 vendor specific keysyms.
+ *
+ * The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
+ *
+ * When adding new entries, the xc/lib/XKeysymDB file should also be
+ * updated to make the new entries visible to Xlib.
+ */
+
+/*
+ * ModeLock
+ *
+ * This one is old, and not really used any more since XKB offers this
+ * functionality.
+ */
+
+#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */
+
+/*
+ * Note, 0x1008FF07 - 0x1008FF0F are free and should be used for misc new
+ * keysyms that don't fit into any of the groups below.
+ *
+ * 0x1008FF64, 0x1008FF6F, 0x1008FF71, 0x1008FF83 are no longer used,
+ * and should be used first for new keysyms.
+ *
+ * Check in keysymdef.h for generic symbols before adding new XFree86-specific
+ * symbols here.
+ *
+ * X.Org will not be adding to the XF86 set of keysyms, though they have
+ * been adopted and are considered a "standard" part of X keysym definitions.
+ * XFree86 never properly commented these keysyms, so we have done our
+ * best to explain the semantic meaning of these keys.
+ *
+ * XFree86 has removed their mail archives of the period, that might have
+ * shed more light on some of these definitions. Until/unless we resurrect
+ * these archives, these are from memory and usage.
+ */
+
+
+/* Backlight controls. */
+#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
+#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
+#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
+#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
+#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
+
+/*
+ * Keys found on some "Internet" keyboards.
+ */
+#define XF86XK_Standby 0x1008FF10 /* System into standby mode */
+#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */
+#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
+#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */
+#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */
+#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */
+#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */
+#define XF86XK_AudioNext 0x1008FF17 /* Next track */
+#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */
+#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */
+#define XF86XK_Start 0x1008FF1A /* Start application */
+#define XF86XK_Search 0x1008FF1B /* Search */
+#define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */
+
+/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
+#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */
+#define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */
+#define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */
+#define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */
+#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
+#define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
+#define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */
+#define XF86XK_RockerDown 0x1008FF24 /* and down */
+#define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */
+
+/* Some more "Internet" keyboard symbols */
+#define XF86XK_Back 0x1008FF26 /* Like back on a browser */
+#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */
+#define XF86XK_Stop 0x1008FF28 /* Stop current operation */
+#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */
+#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
+#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */
+#define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */
+#define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */
+#define XF86XK_WWW 0x1008FF2E /* Invoke web browser */
+#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */
+#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */
+#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */
+#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */
+#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */
+#define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */
+#define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */
+#define XF86XK_Shop 0x1008FF36 /* Display shopping web site */
+#define XF86XK_History 0x1008FF37 /* Show history of web surfing */
+#define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */
+#define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */
+#define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */
+#define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
+#define XF86XK_Finance 0x1008FF3C /* Display financial site */
+#define XF86XK_Community 0x1008FF3D /* Display user's community */
+#define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */
+#define XF86XK_BackForward 0x1008FF3F /* ??? */
+#define XF86XK_Launch0 0x1008FF40 /* Launch Application */
+#define XF86XK_Launch1 0x1008FF41 /* Launch Application */
+#define XF86XK_Launch2 0x1008FF42 /* Launch Application */
+#define XF86XK_Launch3 0x1008FF43 /* Launch Application */
+#define XF86XK_Launch4 0x1008FF44 /* Launch Application */
+#define XF86XK_Launch5 0x1008FF45 /* Launch Application */
+#define XF86XK_Launch6 0x1008FF46 /* Launch Application */
+#define XF86XK_Launch7 0x1008FF47 /* Launch Application */
+#define XF86XK_Launch8 0x1008FF48 /* Launch Application */
+#define XF86XK_Launch9 0x1008FF49 /* Launch Application */
+#define XF86XK_LaunchA 0x1008FF4A /* Launch Application */
+#define XF86XK_LaunchB 0x1008FF4B /* Launch Application */
+#define XF86XK_LaunchC 0x1008FF4C /* Launch Application */
+#define XF86XK_LaunchD 0x1008FF4D /* Launch Application */
+#define XF86XK_LaunchE 0x1008FF4E /* Launch Application */
+#define XF86XK_LaunchF 0x1008FF4F /* Launch Application */
+
+#define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */
+#define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/
+#define XF86XK_Book 0x1008FF52 /* Launch bookreader */
+#define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */
+#define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */
+#define XF86XK_Clear 0x1008FF55 /* Clear window, screen */
+#define XF86XK_Close 0x1008FF56 /* Close window */
+#define XF86XK_Copy 0x1008FF57 /* Copy selection */
+#define XF86XK_Cut 0x1008FF58 /* Cut selection */
+#define XF86XK_Display 0x1008FF59 /* Output switch key */
+#define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */
+#define XF86XK_Documents 0x1008FF5B /* Open documents window */
+#define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */
+#define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */
+#define XF86XK_Game 0x1008FF5E /* Launch game */
+#define XF86XK_Go 0x1008FF5F /* Go to URL */
+#define XF86XK_iTouch 0x1008FF60 /* Logitch iTouch- don't use */
+#define XF86XK_LogOff 0x1008FF61 /* Log off system */
+#define XF86XK_Market 0x1008FF62 /* ?? */
+#define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */
+#define XF86XK_MenuKB 0x1008FF65 /* distingush keyboard from PB */
+#define XF86XK_MenuPB 0x1008FF66 /* distinuish PB from keyboard */
+#define XF86XK_MySites 0x1008FF67 /* Favourites */
+#define XF86XK_New 0x1008FF68 /* New (folder, document... */
+#define XF86XK_News 0x1008FF69 /* News */
+#define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
+#define XF86XK_Open 0x1008FF6B /* Open */
+#define XF86XK_Option 0x1008FF6C /* ?? */
+#define XF86XK_Paste 0x1008FF6D /* Paste */
+#define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */
+#define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */
+#define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */
+#define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */
+#define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
+#define XF86XK_RotationPB 0x1008FF75 /* don't use */
+#define XF86XK_RotationKB 0x1008FF76 /* don't use */
+#define XF86XK_Save 0x1008FF77 /* Save (file, document, state */
+#define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */
+#define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */
+#define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
+#define XF86XK_Send 0x1008FF7B /* Send mail, file, object */
+#define XF86XK_Spell 0x1008FF7C /* Spell checker */
+#define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */
+#define XF86XK_Support 0x1008FF7E /* Get support (??) */
+#define XF86XK_TaskPane 0x1008FF7F /* Show tasks */
+#define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */
+#define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */
+#define XF86XK_Travel 0x1008FF82 /* ?? */
+#define XF86XK_UserPB 0x1008FF84 /* ?? */
+#define XF86XK_User1KB 0x1008FF85 /* ?? */
+#define XF86XK_User2KB 0x1008FF86 /* ?? */
+#define XF86XK_Video 0x1008FF87 /* Launch video player */
+#define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */
+#define XF86XK_Word 0x1008FF89 /* Launch word processor */
+#define XF86XK_Xfer 0x1008FF8A
+#define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
+#define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
+
+#define XF86XK_Away 0x1008FF8D /* mark yourself as away */
+#define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */
+#define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */
+#define XF86XK_MailForward 0x1008FF90 /* Forward in mail */
+#define XF86XK_Pictures 0x1008FF91 /* Show pictures */
+#define XF86XK_Music 0x1008FF92 /* Launch music application */
+
+#define XF86XK_Battery 0x1008FF93 /* Display battery information */
+#define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
+#define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */
+#define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */
+
+#define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */
+#define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */
+#define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
+#define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */
+#define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
+#define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */
+#define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */
+#define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */
+#define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */
+#define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */
+#define XF86XK_View 0x1008FFA1 /* Show a view options/properties */
+#define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
+
+#define XF86XK_Red 0x1008FFA3 /* Red button */
+#define XF86XK_Green 0x1008FFA4 /* Green button */
+#define XF86XK_Yellow 0x1008FFA5 /* Yellow button */
+#define XF86XK_Blue 0x1008FFA6 /* Blue button */
+
+/* Keys for special action keys (hot keys) */
+/* Virtual terminals on some operating systems */
+#define XF86XK_Switch_VT_1 0x1008FE01
+#define XF86XK_Switch_VT_2 0x1008FE02
+#define XF86XK_Switch_VT_3 0x1008FE03
+#define XF86XK_Switch_VT_4 0x1008FE04
+#define XF86XK_Switch_VT_5 0x1008FE05
+#define XF86XK_Switch_VT_6 0x1008FE06
+#define XF86XK_Switch_VT_7 0x1008FE07
+#define XF86XK_Switch_VT_8 0x1008FE08
+#define XF86XK_Switch_VT_9 0x1008FE09
+#define XF86XK_Switch_VT_10 0x1008FE0A
+#define XF86XK_Switch_VT_11 0x1008FE0B
+#define XF86XK_Switch_VT_12 0x1008FE0C
+
+#define XF86XK_Ungrab 0x1008FE20 /* force ungrab */
+#define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */
+#define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */
+#define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */
+
diff --git a/X11/XWDFile.h b/X11/XWDFile.h
new file mode 100644
index 000000000..0ce22e1a8
--- /dev/null
+++ b/X11/XWDFile.h
@@ -0,0 +1,114 @@
+/* $Xorg: XWDFile.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+/*
+
+Copyright 1985, 1986, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/*
+ * XWDFile.h MIT Project Athena, X Window system window raster
+ * image dumper, dump file format header file.
+ *
+ * Author: Tony Della Fera, DEC
+ * 27-Jun-85
+ *
+ * Modifier: William F. Wyatt, SAO
+ * 18-Nov-86 - version 6 for saving/restoring color maps
+ */
+
+#ifndef XWDFILE_H
+#define XWDFILE_H
+
+#include <X11/Xmd.h>
+
+#define XWD_FILE_VERSION 7
+#define sz_XWDheader 100
+#define sz_XWDColor 12
+
+typedef CARD32 xwdval; /* for old broken programs */
+
+/* Values in the file are most significant byte first. */
+
+typedef struct _xwd_file_header {
+ /* header_size = SIZEOF(XWDheader) + length of null-terminated
+ * window name. */
+ CARD32 header_size B32;
+
+ CARD32 file_version B32; /* = XWD_FILE_VERSION above */
+ CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */
+ CARD32 pixmap_depth B32; /* Pixmap depth */
+ CARD32 pixmap_width B32; /* Pixmap width */
+ CARD32 pixmap_height B32; /* Pixmap height */
+ CARD32 xoffset B32; /* Bitmap x offset, normally 0 */
+ CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */
+
+ /* bitmap_unit applies to bitmaps (depth 1 format XY) only.
+ * It is the number of bits that each scanline is padded to. */
+ CARD32 bitmap_unit B32;
+
+ CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */
+
+ /* bitmap_pad applies to pixmaps (non-bitmaps) only.
+ * It is the number of bits that each scanline is padded to. */
+ CARD32 bitmap_pad B32;
+
+ CARD32 bits_per_pixel B32; /* Bits per pixel */
+
+ /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
+ * or bitmap_pad (pixmaps). It is the delta (in bytes) to get
+ * to the same x position on an adjacent row. */
+ CARD32 bytes_per_line B32;
+ CARD32 visual_class B32; /* Class of colormap */
+ CARD32 red_mask B32; /* Z red mask */
+ CARD32 green_mask B32; /* Z green mask */
+ CARD32 blue_mask B32; /* Z blue mask */
+ CARD32 bits_per_rgb B32; /* Log2 of distinct color values */
+ CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */
+ CARD32 ncolors B32; /* Number of XWDColor structures */
+ CARD32 window_width B32; /* Window width */
+ CARD32 window_height B32; /* Window height */
+ CARD32 window_x B32; /* Window upper left X coordinate */
+ CARD32 window_y B32; /* Window upper left Y coordinate */
+ CARD32 window_bdrwidth B32; /* Window border width */
+} XWDFileHeader;
+
+/* Null-terminated window name follows the above structure. */
+
+/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
+ * the file. XWDFileHeader.ncolors tells how many XWDColor structures
+ * there are.
+ */
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16;
+ CARD16 green B16;
+ CARD16 blue B16;
+ CARD8 flags;
+ CARD8 pad;
+} XWDColor;
+
+/* Last comes the image data in the format described by XWDFileHeader. */
+
+#endif /* XWDFILE_H */
+
diff --git a/X11/Xalloca.h b/X11/Xalloca.h
new file mode 100644
index 000000000..c5617188a
--- /dev/null
+++ b/X11/Xalloca.h
@@ -0,0 +1,144 @@
+/* $Xorg: Xalloca.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+
+/*
+
+Copyright 1995, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86: xc/include/Xalloca.h,v 3.10 2001/12/14 19:53:25 dawes Exp $ */
+
+/*
+ * The purpose of this header is to define the macros ALLOCATE_LOCAL and
+ * DEALLOCATE_LOCAL appropriately for the platform being compiled on.
+ * These macros are used to make fast, function-local memory allocations.
+ * Their characteristics are as follows:
+ *
+ * void *ALLOCATE_LOCAL(int size)
+ * Returns a pointer to size bytes of memory, or NULL if the allocation
+ * failed. The memory must be freed with DEALLOCATE_LOCAL before the
+ * function that made the allocation returns. You should not ask for
+ * large blocks of memory with this function, since on many platforms
+ * the memory comes from the stack, which may have limited size.
+ *
+ * void DEALLOCATE_LOCAL(void *)
+ * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
+ * step may be harmless on some platforms, but will result in
+ * memory leaks or worse on others.
+ *
+ * Before including this file, you should define two macros,
+ * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
+ * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
+ * header uses the fallbacks if it doesn't know a "better" way to define
+ * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
+ *
+ * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
+ * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
+ * #include "Xalloca.h"
+ */
+
+#ifndef XALLOCA_H
+#define XALLOCA_H 1
+
+#ifndef INCLUDE_ALLOCA_H
+/* Need to add more here to match Imake *.cf's */
+# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+# define INCLUDE_ALLOCA_H
+# endif
+#endif
+
+#ifdef INCLUDE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#ifndef NO_ALLOCA
+/*
+ * os-dependent definition of local allocation and deallocation
+ * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
+ * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
+ */
+# if defined(__HIGHC__)
+# ifndef NCR
+ extern char *alloca();
+# if HCVERSION < 21003
+# define ALLOCATE_LOCAL(size) alloca((int)(size))
+ pragma on(alloca);
+# else /* HCVERSION >= 21003 */
+# define ALLOCATE_LOCAL(size) _Alloca((int)(size))
+# endif /* HCVERSION < 21003 */
+# else /* NCR */
+# define ALLOCATE_LOCAL(size) alloca(size)
+# endif
+# endif /* defined(__HIGHC__) */
+
+
+# ifdef __GNUC__
+# ifndef alloca
+# define alloca __builtin_alloca
+# endif /* !alloca */
+# define ALLOCATE_LOCAL(size) alloca((int)(size))
+# else /* ! __GNUC__ */
+
+/*
+ * warning: old mips alloca (pre 2.10) is unusable, new one is built in
+ * Test is easy, the new one is named __builtin_alloca and comes
+ * from alloca.h which #defines alloca.
+ */
+# ifndef NCR
+# if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) || defined(alloca)
+/*
+ * Some System V boxes extract alloca.o from /lib/libPW.a; if you
+ * decide that you don't want to use alloca, you might want to fix it here.
+ */
+/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
+# if !defined(__sgi) && !defined(__QNX__) && !defined(__cplusplus)
+# define __Xnullarg /* as nothing */
+# ifndef X_NOT_STDC_ENV
+ extern void *alloca(__Xnullarg);
+# else
+ extern char *alloca(__Xnullarg);
+# endif
+# endif /* !__sgi && !__QNX && !__cplusplus */
+# define ALLOCATE_LOCAL(size) alloca((int)(size))
+# endif /* who does alloca */
+# endif /* NCR */
+# endif /* __GNUC__ */
+
+#endif /* NO_ALLOCA */
+
+#if !defined(ALLOCATE_LOCAL)
+# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
+# else /* no fallbacks supplied; error */
+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
+# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
+#else
+# if !defined(DEALLOCATE_LOCAL)
+# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
+# endif
+#endif /* defined(ALLOCATE_LOCAL) */
+
+#endif /* XALLOCA_H */
diff --git a/X11/Xarch.h b/X11/Xarch.h
new file mode 100644
index 000000000..6e04e53f6
--- /dev/null
+++ b/X11/Xarch.h
@@ -0,0 +1,126 @@
+#ifndef _XARCH_H_
+#define _XARCH_H_
+
+/*
+ * Copyright 1997 Metro Link Incorporated
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holder(s)
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. The above listed
+ * copyright holder(s) make(s) no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/* $XFree86: xc/include/Xarch.h,v 1.10tsi Exp $ */
+
+
+/*
+ * Determine the machine's byte order.
+ */
+
+/* See if it is set in the imake config first */
+#ifdef X_BYTE_ORDER
+
+#define X_BIG_ENDIAN 4321
+#define X_LITTLE_ENDIAN 1234
+
+#else
+
+#ifdef SVR4
+#if defined(NCR) || defined(Mips) || defined(__sgi)
+#include <sys/endian.h>
+#else
+#if !defined(sun)
+#include <sys/byteorder.h>
+#endif
+#endif
+#elif defined(CSRG_BASED)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/types.h>
+#endif
+#include <machine/endian.h>
+#elif defined(linux)
+#if defined __STRICT_ANSI__
+#undef __STRICT_ANSI__
+#include <endian.h>
+#define __STRICT_ANSI__
+#else
+#include <endian.h>
+#endif
+/* 'endian.h' might have been included before 'Xarch.h' */
+#if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#endif
+#if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
+#define BIG_ENDIAN __BIG_ENDIAN
+#endif
+#if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
+#define PDP_ENDIAN __PDP_ENDIAN
+#endif
+#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
+#define BYTE_ORDER __BYTE_ORDER
+#endif
+#elif defined(Lynx)
+#if 0
+/* LynxOS 2.4.0 has wrong defines in bsd/ip.h */
+#include <bsd/in.h>
+#include <bsd/in_systm.h>
+#include <bsd/ip.h>
+#endif
+#endif
+
+#ifndef BYTE_ORDER
+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+
+#if defined(__QNX__) && !defined(__QNXNTO__)
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
+
+#if defined(__QNXNTO__)
+#if defined(i386) || defined(__i386__) || defined(__x86__)
+#define BYTE_ORDER LITTLE_ENDIAN
+#else
+#define BYTE_ORDER BIG_ENDIAN
+#endif
+#endif
+
+#ifdef Lynx
+#if defined(i386) || defined(__i386__) || defined(__x86__)
+#define BYTE_ORDER LITTLE_ENDIAN
+#else
+#define BYTE_ORDER BIG_ENDIAN
+#endif
+#endif
+#if (defined(sun) && defined(SVR4)) && !defined(Lynx)
+#include <sys/isa_defs.h>
+#ifdef _LITTLE_ENDIAN
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
+#ifdef _BIG_ENDIAN
+#define BYTE_ORDER BIG_ENDIAN
+#endif
+#endif /* sun */
+#endif /* BYTE_ORDER */
+
+#define X_BYTE_ORDER BYTE_ORDER
+#define X_BIG_ENDIAN BIG_ENDIAN
+#define X_LITTLE_ENDIAN LITTLE_ENDIAN
+
+#endif /* not in imake config */
+
+#endif /* _XARCH_H_ */
diff --git a/X11/Xatom.h b/X11/Xatom.h
new file mode 100644
index 000000000..485a4236d
--- /dev/null
+++ b/X11/Xatom.h
@@ -0,0 +1,79 @@
+#ifndef XATOM_H
+#define XATOM_H 1
+
+/* THIS IS A GENERATED FILE
+ *
+ * Do not change! Changing this file implies a protocol change!
+ */
+
+#define XA_PRIMARY ((Atom) 1)
+#define XA_SECONDARY ((Atom) 2)
+#define XA_ARC ((Atom) 3)
+#define XA_ATOM ((Atom) 4)
+#define XA_BITMAP ((Atom) 5)
+#define XA_CARDINAL ((Atom) 6)
+#define XA_COLORMAP ((Atom) 7)
+#define XA_CURSOR ((Atom) 8)
+#define XA_CUT_BUFFER0 ((Atom) 9)
+#define XA_CUT_BUFFER1 ((Atom) 10)
+#define XA_CUT_BUFFER2 ((Atom) 11)
+#define XA_CUT_BUFFER3 ((Atom) 12)
+#define XA_CUT_BUFFER4 ((Atom) 13)
+#define XA_CUT_BUFFER5 ((Atom) 14)
+#define XA_CUT_BUFFER6 ((Atom) 15)
+#define XA_CUT_BUFFER7 ((Atom) 16)
+#define XA_DRAWABLE ((Atom) 17)
+#define XA_FONT ((Atom) 18)
+#define XA_INTEGER ((Atom) 19)
+#define XA_PIXMAP ((Atom) 20)
+#define XA_POINT ((Atom) 21)
+#define XA_RECTANGLE ((Atom) 22)
+#define XA_RESOURCE_MANAGER ((Atom) 23)
+#define XA_RGB_COLOR_MAP ((Atom) 24)
+#define XA_RGB_BEST_MAP ((Atom) 25)
+#define XA_RGB_BLUE_MAP ((Atom) 26)
+#define XA_RGB_DEFAULT_MAP ((Atom) 27)
+#define XA_RGB_GRAY_MAP ((Atom) 28)
+#define XA_RGB_GREEN_MAP ((Atom) 29)
+#define XA_RGB_RED_MAP ((Atom) 30)
+#define XA_STRING ((Atom) 31)
+#define XA_VISUALID ((Atom) 32)
+#define XA_WINDOW ((Atom) 33)
+#define XA_WM_COMMAND ((Atom) 34)
+#define XA_WM_HINTS ((Atom) 35)
+#define XA_WM_CLIENT_MACHINE ((Atom) 36)
+#define XA_WM_ICON_NAME ((Atom) 37)
+#define XA_WM_ICON_SIZE ((Atom) 38)
+#define XA_WM_NAME ((Atom) 39)
+#define XA_WM_NORMAL_HINTS ((Atom) 40)
+#define XA_WM_SIZE_HINTS ((Atom) 41)
+#define XA_WM_ZOOM_HINTS ((Atom) 42)
+#define XA_MIN_SPACE ((Atom) 43)
+#define XA_NORM_SPACE ((Atom) 44)
+#define XA_MAX_SPACE ((Atom) 45)
+#define XA_END_SPACE ((Atom) 46)
+#define XA_SUPERSCRIPT_X ((Atom) 47)
+#define XA_SUPERSCRIPT_Y ((Atom) 48)
+#define XA_SUBSCRIPT_X ((Atom) 49)
+#define XA_SUBSCRIPT_Y ((Atom) 50)
+#define XA_UNDERLINE_POSITION ((Atom) 51)
+#define XA_UNDERLINE_THICKNESS ((Atom) 52)
+#define XA_STRIKEOUT_ASCENT ((Atom) 53)
+#define XA_STRIKEOUT_DESCENT ((Atom) 54)
+#define XA_ITALIC_ANGLE ((Atom) 55)
+#define XA_X_HEIGHT ((Atom) 56)
+#define XA_QUAD_WIDTH ((Atom) 57)
+#define XA_WEIGHT ((Atom) 58)
+#define XA_POINT_SIZE ((Atom) 59)
+#define XA_RESOLUTION ((Atom) 60)
+#define XA_COPYRIGHT ((Atom) 61)
+#define XA_NOTICE ((Atom) 62)
+#define XA_FONT_NAME ((Atom) 63)
+#define XA_FAMILY_NAME ((Atom) 64)
+#define XA_FULL_NAME ((Atom) 65)
+#define XA_CAP_HEIGHT ((Atom) 66)
+#define XA_WM_CLASS ((Atom) 67)
+#define XA_WM_TRANSIENT_FOR ((Atom) 68)
+
+#define XA_LAST_PREDEFINED ((Atom) 68)
+#endif /* XATOM_H */
diff --git a/X11/Xdefs.h b/X11/Xdefs.h
new file mode 100644
index 000000000..5ee2d8949
--- /dev/null
+++ b/X11/Xdefs.h
@@ -0,0 +1,110 @@
+/* $XFree86: xc/include/Xdefs.h,v 1.2 1999/08/22 06:21:20 dawes Exp $ */
+
+/***********************************************************
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
+
+*/
+
+/**
+ ** Types definitions shared between server and clients
+ **/
+
+#ifndef _XDEFS_H
+#define _XDEFS_H
+
+#ifdef _XSERVER64
+#include <X11/Xmd.h>
+#endif
+
+#ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+# ifndef _XSERVER64
+typedef unsigned long Atom;
+# else
+typedef CARD32 Atom;
+# endif
+#endif
+
+#ifndef Bool
+# ifndef _XTYPEDEF_BOOL
+# define _XTYPEDEF_BOOL
+typedef int Bool;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_POINTER
+# define _XTYPEDEF_POINTER
+typedef void *pointer;
+#endif
+
+#ifndef _XTYPEDEF_CLIENTPTR
+typedef struct _Client *ClientPtr;
+# define _XTYPEDEF_CLIENTPTR
+#endif
+
+#ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+# ifndef _XSERVER64
+typedef unsigned long XID;
+# else
+typedef CARD32 XID;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+# ifndef _XSERVER64
+typedef unsigned long Mask;
+# else
+typedef CARD32 Mask;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_FONTPTR
+# define _XTYPEDEF_FONTPTR
+typedef struct _Font *FontPtr; /* also in fonts/include/font.h */
+#endif
+
+#ifndef _XTYPEDEF_FONT
+# define _XTYPEDEF_FONT
+typedef XID Font;
+#endif
+
+#ifndef _XTYPEDEF_FSID
+# ifndef _XSERVER64
+typedef unsigned long FSID;
+# else
+typedef CARD32 FSID;
+# endif
+#endif
+
+typedef FSID AccContext;
+
+/* OS independent time value
+ XXX Should probably go in Xos.h */
+typedef struct timeval **OSTimePtr;
+
+
+typedef void (* BlockHandlerProcPtr)(pointer /* blockData */,
+ OSTimePtr /* pTimeout */,
+ pointer /* pReadmask */);
+
+#endif
diff --git a/X11/Xfuncproto.h.in b/X11/Xfuncproto.h.in
new file mode 100644
index 000000000..2421ae4d2
--- /dev/null
+++ b/X11/Xfuncproto.h.in
@@ -0,0 +1,122 @@
+/* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+/*
+ *
+Copyright 1989, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+/* $XFree86: xc/include/Xfuncproto.h,v 3.4 2001/12/14 19:53:25 dawes Exp $ */
+
+/* Definitions to make function prototypes manageable */
+
+#ifndef _XFUNCPROTO_H_
+#define _XFUNCPROTO_H_
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 1
+#endif /* NeedFunctionPrototypes */
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes 1
+#endif /* NeedVarargsPrototypes */
+
+#if NeedFunctionPrototypes
+
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes 1
+#endif /* NeedNestedPrototypes */
+
+#ifndef _Xconst
+#define _Xconst const
+#endif /* _Xconst */
+
+/* Function prototype configuration (see configure for more info) */
+#ifndef NARROWPROTO
+#undef NARROWPROTO
+#endif
+#ifndef FUNCPROTO
+#undef FUNCPROTO
+#endif
+
+#ifndef NeedWidePrototypes
+#ifdef NARROWPROTO
+#define NeedWidePrototypes 0
+#else
+#define NeedWidePrototypes 1 /* default to make interropt. easier */
+#endif
+#endif /* NeedWidePrototypes */
+
+#endif /* NeedFunctionPrototypes */
+
+#ifndef _XFUNCPROTOBEGIN
+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
+#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
+#define _XFUNCPROTOEND }
+#else
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif
+#endif /* _XFUNCPROTOBEGIN */
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
+#else
+# define _X_SENTINEL(x)
+# define _X_ATTRIBUTE_PRINTF(x,y)
+#endif /* GNUC >= 4 */
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _X_EXPORT __attribute__((visibility("default")))
+# define _X_HIDDEN __attribute__((visibility("hidden")))
+# define _X_INTERNAL __attribute__((visibility("internal")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_EXPORT __global
+# define _X_HIDDEN __hidden
+# define _X_INTERNAL __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _X_EXPORT
+# define _X_HIDDEN
+# define _X_INTERNAL
+#endif /* GNUC >= 4 */
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
+# define _X_INLINE inline
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_LIKELY(x) (x)
+# define _X_UNLIKELY(x) (x)
+# define _X_INLINE inline
+#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
+# define _X_LIKELY(x) (x)
+# define _X_UNLIKELY(x) (x)
+# define _X_INLINE
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
+# define _X_DEPRECATED __attribute__((deprecated))
+#else /* not gcc >= 3.1 */
+# define _X_DEPRECATED
+#endif
+
+#endif /* _XFUNCPROTO_H_ */
diff --git a/X11/Xfuncs.h b/X11/Xfuncs.h
new file mode 100644
index 000000000..2469b69a9
--- /dev/null
+++ b/X11/Xfuncs.h
@@ -0,0 +1,98 @@
+/*
+ * $XdotOrg: xc/include/Xfuncs.h,v 1.2 2004/04/23 18:43:05 eich Exp $
+ * $Xorg: Xfuncs.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
+ *
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+/* $XFree86: xc/include/Xfuncs.h,v 3.10 2002/05/31 18:45:38 dawes Exp $ */
+
+#ifndef _XFUNCS_H_
+#define _XFUNCS_H_
+
+#include <X11/Xosdefs.h>
+
+/* the old Xfuncs.h, for pre-R6 */
+#if !(defined(XFree86LOADER) && defined(IN_MODULE))
+
+#ifdef X_USEBFUNCS
+void bcopy();
+void bzero();
+int bcmp();
+#else
+#if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
+#include <memory.h>
+void bcopy();
+#define bzero(b,len) memset(b, 0, len)
+#define bcmp(b1,b2,len) memcmp(b1, b2, len)
+#else
+#include <string.h>
+#if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
+#include <strings.h>
+#endif
+#define _XFUNCS_H_INCLUDED_STRING_H
+#if defined(sun)
+#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+#define bzero(b,len) memset(b, 0, (size_t)(len))
+#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
+#endif
+#endif
+#endif /* X_USEBFUNCS */
+
+/* the new Xfuncs.h */
+
+#if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4))
+/* the ANSI C way */
+#ifndef _XFUNCS_H_INCLUDED_STRING_H
+#include <string.h>
+#endif
+#undef bzero
+#define bzero(b,len) memset(b,0,len)
+#else /* else X_NOT_STDC_ENV or SunOS 4 */
+#if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
+#include <memory.h>
+#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#if defined(SYSV) && defined(_XBCOPYFUNC)
+#undef memmove
+#define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
+#define _XNEEDBCOPYFUNC
+#endif
+#else /* else vanilla BSD */
+#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
+#endif /* SYSV else */
+#endif /* ! X_NOT_STDC_ENV else */
+
+#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4))
+#define atexit(f) on_exit(f, 0)
+#endif
+
+#if defined WIN32 && defined __MINGW32__
+#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+#endif
+
+#endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
+
+#endif /* _XFUNCS_H_ */
diff --git a/X11/Xmd.h b/X11/Xmd.h
new file mode 100644
index 000000000..80fbe7c42
--- /dev/null
+++ b/X11/Xmd.h
@@ -0,0 +1,211 @@
+/* $XdotOrg: $ */
+/* $XFree86: xc/include/Xmd.h,v 3.18tsi Exp $ */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#ifndef XMD_H
+#define XMD_H 1
+/* $Xorg: Xmd.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+/*
+ * Xmd.h: MACHINE DEPENDENT DECLARATIONS.
+ */
+
+/*
+ * Special per-machine configuration flags.
+ */
+#if defined(sun) && defined(__SVR4)
+# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
+#endif
+
+#ifdef CRAY
+#define WORD64 /* 64-bit architecture */
+#endif
+#if defined (_LP64) || \
+ defined(__alpha) || defined(__alpha__) || \
+ defined(__ia64__) || defined(ia64) || \
+ defined(__sparc64__) || \
+ defined(__s390x__) || \
+ (defined(__hppa__) && defined(__LP64__)) || \
+ defined(__amd64__) || defined(amd64) || \
+ defined(__powerpc64__) || \
+ (defined(sgi) && (_MIPS_SZLONG == 64))
+#define LONG64 /* 32/64-bit architecture */
+#endif
+
+/*
+ * Stuff to handle large architecture machines; the constants were generated
+ * on a 32-bit machine and must correspond to the protocol.
+ */
+#ifdef WORD64
+#define MUSTCOPY
+#endif /* WORD64 */
+
+
+/*
+ * Definition of macro used to set constants for size of network structures;
+ * machines with preprocessors that can't handle all of the sz_ symbols
+ * can define this macro to be sizeof(x) if and only if their compiler doesn't
+ * pad out structures (esp. the xTextElt structure which contains only two
+ * one-byte fields). Network structures should always define sz_symbols.
+ *
+ * The sz_ prefix is used instead of something more descriptive so that the
+ * symbols are no more than 32 characters long (which causes problems for some
+ * compilers and preprocessors).
+ *
+ * The extra indirection in the __STDC__ case is to get macro arguments to
+ * expand correctly before the concatenation, rather than afterward.
+ */
+#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define _SIZEOF(x) sz_##x
+#define SIZEOF(x) _SIZEOF(x)
+#else
+#define SIZEOF(x) sz_/**/x
+#endif /* if ANSI C compiler else not */
+
+/*
+ * Bitfield suffixes for the protocol structure elements, if you
+ * need them. Note that bitfields are not guaranteed to be signed
+ * (or even unsigned) according to ANSI C.
+ */
+#ifdef WORD64
+typedef long INT64;
+typedef unsigned long CARD64;
+#define B32 :32
+#define B16 :16
+#ifdef UNSIGNEDBITFIELDS
+typedef unsigned int INT32;
+typedef unsigned int INT16;
+#else
+#ifdef __STDC__
+typedef signed int INT32;
+typedef signed int INT16;
+#else
+typedef int INT32;
+typedef int INT16;
+#endif
+#endif
+#else
+#define B32
+#define B16
+#ifdef LONG64
+typedef long INT64;
+typedef int INT32;
+#else
+typedef long INT32;
+#endif
+typedef short INT16;
+#endif
+
+#if defined(__STDC__) || defined(sgi) || defined(_AIX)
+typedef signed char INT8;
+#else
+typedef char INT8;
+#endif
+
+#ifdef LONG64
+typedef unsigned long CARD64;
+typedef unsigned int CARD32;
+#else
+typedef unsigned long CARD32;
+#endif
+#if !defined(WORD64) && !defined(LONG64)
+typedef unsigned long long CARD64;
+#endif
+typedef unsigned short CARD16;
+typedef unsigned char CARD8;
+
+typedef CARD32 BITS32;
+typedef CARD16 BITS16;
+
+#ifndef I_NEED_OS2_H
+typedef CARD8 BYTE;
+typedef CARD8 BOOL;
+#else
+#define BYTE CARD8
+#define BOOL CARD8
+#endif
+
+/*
+ * definitions for sign-extending bitfields on 64-bit architectures
+ */
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
+#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
+#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
+#define cvtINT8toShort(val) cvtINT8toInt(val)
+#define cvtINT16toShort(val) cvtINT16toInt(val)
+#define cvtINT32toShort(val) cvtINT32toInt(val)
+#define cvtINT8toLong(val) cvtINT8toInt(val)
+#define cvtINT16toLong(val) cvtINT16toInt(val)
+#define cvtINT32toLong(val) cvtINT32toInt(val)
+#else
+#define cvtINT8toInt(val) (val)
+#define cvtINT16toInt(val) (val)
+#define cvtINT32toInt(val) (val)
+#define cvtINT8toShort(val) (val)
+#define cvtINT16toShort(val) (val)
+#define cvtINT32toShort(val) (val)
+#define cvtINT8toLong(val) (val)
+#define cvtINT16toLong(val) (val)
+#define cvtINT32toLong(val) (val)
+#endif /* WORD64 and UNSIGNEDBITFIELDS */
+
+
+
+#ifdef MUSTCOPY
+/*
+ * This macro must not cast or else pointers will get aligned and be wrong
+ */
+#define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
+#else /* else not MUSTCOPY, this is used for 32-bit machines */
+/*
+ * this version should leave result of type (t *), but that should only be
+ * used when not in MUSTCOPY
+ */
+#define NEXTPTR(p,t) (((t *)(p)) + 1)
+#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
+
+#endif /* XMD_H */
diff --git a/X11/Xos.h b/X11/Xos.h
new file mode 100644
index 000000000..67bf67924
--- /dev/null
+++ b/X11/Xos.h
@@ -0,0 +1,296 @@
+/*
+ * $XdotOrg: proto/X11/Xos.h,v 1.8 2005/11/08 06:33:25 jkj Exp $
+ * $Xorg: Xos.h,v 1.6 2001/02/09 02:03:22 xorgcvs Exp $
+ *
+ *
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * The X Window System is a Trademark of The Open Group.
+ *
+ */
+/* $XFree86: xc/include/Xos.h,v 3.41tsi Exp $ */
+
+/* This is a collection of things to try and minimize system dependencies
+ * in a "significant" number of source files.
+ */
+
+#ifndef _XOS_H_
+#define _XOS_H_
+
+#include <X11/Xosdefs.h>
+
+/*
+ * Get major data types (esp. caddr_t)
+ */
+
+#ifdef USG
+#ifndef __TYPES__
+#ifdef CRAY
+#define word word_t
+#endif /* CRAY */
+#include <sys/types.h> /* forgot to protect it... */
+#define __TYPES__
+#endif /* __TYPES__ */
+#else /* USG */
+#if defined(_POSIX_SOURCE) && defined(MOTOROLA)
+#undef _POSIX_SOURCE
+#include <sys/types.h>
+#define _POSIX_SOURCE
+#else
+# include <sys/types.h>
+#endif
+#endif /* USG */
+
+#ifndef sgi
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <stdint.h>
+#endif
+#endif
+
+#ifdef _SEQUENT_
+/*
+ * in_systm.h compatibility between SysV and BSD types u_char u_short u_long
+ * select.h for typedef of args to select, fd_set, may use SVR4 later
+ */
+#include <netinet/in_systm.h>
+#include <sys/select.h>
+#endif /* _SEQUENT_ */
+
+/*
+ * Just about everyone needs the strings routines. We provide both forms here,
+ * index/rindex and strchr/strrchr, so any systems that don't provide them all
+ * need to have #defines here.
+ *
+ * These macros are defined this way, rather than, e.g.:
+ * #defined index(s,c) strchr(s,c)
+ * because someone might be using them as function pointers, and such
+ * a change would break compatibility for anyone who's relying on them
+ * being the way they currently are. So we're stuck with them this way,
+ * which can be really inconvenient. :-(
+ */
+
+#ifndef X_NOT_STDC_ENV
+
+#include <string.h>
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <strings.h>
+#else
+#if (defined(sun) && defined(__SVR4))
+#include <strings.h>
+#endif
+#ifdef __STDC__
+#ifndef index
+#define index(s,c) (strchr((s),(c)))
+#endif
+#ifndef rindex
+#define rindex(s,c) (strrchr((s),(c)))
+#endif
+#else
+#ifndef index
+#define index strchr
+#endif
+#ifndef rindex
+#define rindex strrchr
+#endif
+#endif
+#endif
+
+#else
+
+#ifdef SYSV
+#if defined(clipper) || defined(__clipper__)
+#include <malloc.h>
+#endif
+#include <string.h>
+#define index strchr
+#define rindex strrchr
+#else
+#include <strings.h>
+#define strchr index
+#define strrchr rindex
+#endif
+
+#endif /* X_NOT_STDC_ENV */
+
+/*
+ * strerror()
+ */
+#if (defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) || defined(macII)) && !defined(__GLIBC__)
+#ifndef strerror
+extern char *sys_errlist[];
+extern int sys_nerr;
+#define strerror(n) \
+ (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
+#endif
+#endif
+
+/*
+ * Get open(2) constants
+ */
+#if defined(X_NOT_POSIX)
+#include <fcntl.h>
+#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(__i386__) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
+#include <unistd.h>
+#endif
+#ifdef WIN32
+#include <X11/Xw32defs.h>
+#else
+#include <sys/file.h>
+#endif
+#else /* X_NOT_POSIX */
+#if !defined(_POSIX_SOURCE) && defined(macII)
+#define _POSIX_SOURCE
+#include <fcntl.h>
+#include <unistd.h>
+#undef _POSIX_SOURCE
+#else
+#include <fcntl.h>
+#include <unistd.h>
+#endif
+#endif /* X_NOT_POSIX else */
+
+/*
+ * Get struct timeval and struct tm
+ */
+
+#if defined(SYSV) && !defined(_SEQUENT_)
+
+#ifndef USL
+#include <sys/time.h>
+#endif
+#include <time.h>
+#ifdef CRAY
+#undef word
+#endif /* CRAY */
+#if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__) && !defined(clipper) && !defined(__clipper__)
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#ifndef USL_SHARELIB
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif /* USL_SHARELIB */
+#endif /* USG */
+
+#ifdef _SEQUENT_
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif /* _SEQUENT_ */
+
+#else /* not SYSV */
+
+#if defined(_POSIX_SOURCE) && defined(SVR4)
+/* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */
+#undef _POSIX_SOURCE
+#include <sys/time.h>
+#define _POSIX_SOURCE
+#elif defined(WIN32)
+#include <time.h>
+#if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
+struct timeval {
+ long tv_sec; /* seconds */
+ long tv_usec; /* and microseconds */
+};
+#define _TIMEVAL_DEFINED
+#endif
+#include <sys/timeb.h>
+#define gettimeofday(t) \
+{ \
+ struct _timeb _gtodtmp; \
+ _ftime (&_gtodtmp); \
+ (t)->tv_sec = _gtodtmp.time; \
+ (t)->tv_usec = _gtodtmp.millitm * 1000; \
+}
+#elif defined(_SEQUENT_) || defined(Lynx)
+#include <time.h>
+#elif defined (__QNX__)
+typedef unsigned long fd_mask;
+/* Make sure we get 256 bit select masks */
+#define FD_SETSIZE 256
+#include <sys/select.h>
+#include <sys/time.h>
+#include <time.h>
+#else
+#include <sys/time.h>
+#include <time.h>
+#endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
+
+#endif /* SYSV */
+
+/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
+#if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
+#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
+#else
+#if defined(SVR4) || defined(VMS) || defined(WIN32)
+#define X_GETTIMEOFDAY(t) gettimeofday(t)
+#else
+#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
+#endif
+#endif /* XPG4 else */
+
+#ifdef __UNIXOS2__
+typedef unsigned long fd_mask;
+#include <limits.h>
+#define MAX_PATH _POSIX_PATH_MAX
+#endif
+
+#ifdef __GNU__
+#define PATH_MAX 4096
+#define MAXPATHLEN 4096
+#define OPEN_MAX 256 /* We define a reasonable limit. */
+#endif
+
+/* use POSIX name for signal */
+#if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD) && !defined(ISC)
+#define SIGCHLD SIGCLD
+#endif
+
+#ifdef ISC
+#include <sys/bsdtypes.h>
+#include <sys/limits.h>
+#define NGROUPS 16
+#endif
+
+#if defined(ISC) || defined(__UNIXOS2__) || \
+ (defined(__linux__) && !defined(__GLIBC__)) || \
+ (defined(__QNX__) && !defined(UNIXCONN))
+/*
+ * Some OS's may not have this
+ */
+
+#define X_NO_SYS_UN 1
+
+struct sockaddr_un {
+ short sun_family;
+ char sun_path[108];
+};
+#endif
+
+#include <X11/Xarch.h>
+
+#endif /* _XOS_H_ */
diff --git a/X11/Xos_r.h b/X11/Xos_r.h
new file mode 100644
index 000000000..7ce72ac13
--- /dev/null
+++ b/X11/Xos_r.h
@@ -0,0 +1,1160 @@
+/* $Xorg: Xos_r.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+/* $XdotOrg: proto/X11/Xos_r.h,v 1.5 2005/07/13 07:23:56 keithp Exp $ */
+/*
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+/* $XFree86: xc/include/Xos_r.h,v 1.18tsi Exp $ */
+
+/*
+ * Various and sundry Thread-Safe functions used by X11, Motif, and CDE.
+ *
+ * Use this file in MT-safe code where you would have included
+ * <dirent.h> for readdir()
+ * <grp.h> for getgrgid() or getgrnam()
+ * <netdb.h> for gethostbyname(), gethostbyaddr(), or getservbyname()
+ * <pwd.h> for getpwnam() or getpwuid()
+ * <string.h> for strtok()
+ * <time.h> for asctime(), ctime(), localtime(), or gmtime()
+ * <unistd.h> for getlogin() or ttyname()
+ * or their thread-safe analogs.
+ *
+ * If you are on a platform that defines XTHREADS but does not have
+ * MT-safe system API (e.g. UnixWare) you must define _Xos_processLock
+ * and _Xos_processUnlock macros before including this header. If
+ * you are on OSF/1 V3.2 and plan to use readdir(), you must also define
+ * _Xos_isThreadInitialized. For convenience XOS_USE_XLIB_LOCKING or
+ * XOS_USE_XT_LOCKING may be defined to obtain either Xlib-only or
+ * Xt-based versions of these macros. These macros won't result in
+ * truly thread-safe calls, but they are better than nothing. If you
+ * do not want locking in this situation define XOS_USE_NO_LOCKING.
+ *
+ * NOTE: On systems lacking appropriate _r functions Gethostbyname(),
+ * Gethostbyaddr(), and Getservbyname() do NOT copy the host or
+ * protocol lists!
+ *
+ * NOTE: On systems lacking appropriate _r functions Getgrgid() and
+ * Getgrnam() do NOT copy the list of group members!
+ *
+ * This header is nominally intended to simplify porting X11, Motif, and
+ * CDE; it may be useful to other people too. The structure below is
+ * complicated, mostly because P1003.1c (the IEEE POSIX Threads spec)
+ * went through lots of drafts, and some vendors shipped systems based
+ * on draft API that were changed later. Unfortunately POSIX did not
+ * provide a feature-test macro for distinguishing each of the drafts.
+ */
+
+/*
+ * This header has several parts. Search for "Effective prototypes"
+ * to locate the beginning of a section.
+ */
+
+/* This header can be included multiple times with different defines! */
+#ifndef _XOS_R_H_
+# define _XOS_R_H_
+
+# include <X11/Xos.h>
+# include <X11/Xfuncs.h>
+
+# ifndef X_NOT_POSIX
+# ifdef _POSIX_SOURCE
+# include <limits.h>
+# else
+# define _POSIX_SOURCE
+# include <limits.h>
+# undef _POSIX_SOURCE
+# endif
+# ifndef LINE_MAX
+# define X_LINE_MAX 2048
+# else
+# define X_LINE_MAX LINE_MAX
+# endif
+# endif
+#endif /* _XOS_R_H */
+
+#ifndef WIN32
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if defined(XOS_USE_XLIB_LOCKING)
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+typedef struct _LockInfoRec *LockInfoPtr;
+extern LockInfoPtr _Xglobal_lock;
+# endif
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized (_Xglobal_lock)
+# endif
+# if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void (*_XLockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */, char * /* file */, int /* line */
+# endif
+);
+extern void (*_XUnlockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */, char * /* file */, int /* line */
+# endif
+);
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock \
+ (_XLockMutex_fn ? (*_XLockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock \
+ (_XUnlockMutex_fn ? (*_XUnlockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)
+# endif
+# else
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void (*_XLockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+# endif
+);
+extern void (*_XUnlockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+# endif
+);
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock \
+ (_XLockMutex_fn ? ((*_XLockMutex_fn)(_Xglobal_lock), 0) : 0)
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock \
+ (_XUnlockMutex_fn ? ((*_XUnlockMutex_fn)(_Xglobal_lock), 0) : 0)
+# endif
+# endif
+# elif defined(XOS_USE_XT_LOCKING)
+# ifndef _XtThreadsI_h
+extern void (*_XtProcessLock)(void);
+# endif
+# ifndef _XtintrinsicP_h
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void XtProcessLock(
+# if NeedFunctionPrototypes
+ void
+# endif
+);
+extern void XtProcessUnlock(
+# if NeedFunctionPrototypes
+ void
+# endif
+);
+# endif
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized _XtProcessLock
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock XtProcessLock()
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock XtProcessUnlock()
+# endif
+# elif defined(XOS_USE_NO_LOCKING)
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized 0
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock 0
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock 0
+# endif
+# endif
+
+#endif /* !defined WIN32 */
+
+/*
+ * Solaris defines the POSIX thread-safe feature test macro, but
+ * uses the older SVR4 thread-safe functions unless the POSIX ones
+ * are specifically requested. Fix the feature test macro.
+ */
+#if defined(sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
+ (_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS)
+# undef _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+
+/*
+ * LynxOS 3.1 defines _POSIX_THREAD_SAFE_FUNCTIONS but
+ * getpwuid_r has different semantics than defined by POSIX
+ */
+#if defined(Lynx) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+# undef _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+
+
+/***** <pwd.h> wrappers *****/
+
+/*
+ * Effective prototypes for <pwd.h> wrappers:
+ *
+ * #define X_INCLUDE_PWD_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetpwparams;
+ *
+ * struct passwd* _XGetpwnam(const char *name, _Xgetpwparams);
+ * struct passwd* _XGetpwuid(uid_t uid, _Xgetpwparams);
+ */
+
+#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)
+# include <pwd.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_PWDAPI)
+# define XOS_USE_MTSAFE_PWDAPI 1
+# endif
+#endif
+
+#undef X_NEEDS_PWPARAMS
+#if !defined(X_INCLUDE_PWD_H) || defined(_XOS_INCLUDED_PWD_H)
+/* Do nothing */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+# if defined(X_NOT_POSIX) && !defined(__i386__) && !defined(SYSV)
+extern struct passwd *getpwuid(), *getpwnam();
+# endif
+typedef int _Xgetpwparams; /* dummy */
+# define _XGetpwuid(u,p) getpwuid((u))
+# define _XGetpwnam(u,p) getpwnam((u))
+
+#elif !defined(XOS_USE_MTSAFE_PWDAPI) || defined(XNO_MTSAFE_PWDAPI)
+/* UnixWare 2.0, or other systems with thread support but no _r API. */
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[1024];
+ struct passwd* pwp;
+ size_t len;
+} _Xgetpwparams;
+
+/*
+ * NetBSD and FreeBSD, at least, are missing several of the unixware passwd
+ * fields.
+ */
+
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+ defined(__APPLE__) || defined(__DragonFly__)
+static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
+{
+ memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
+
+ (p).pws.pw_name = (p).pwbuf;
+ (p).len = strlen((p).pwp->pw_name);
+ strcpy((p).pws.pw_name, (p).pwp->pw_name);
+
+ (p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_passwd);
+ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd);
+
+ (p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_class);
+ strcpy((p).pws.pw_class, (p).pwp->pw_class);
+
+ (p).pws.pw_gecos = (p).pws.pw_class + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_gecos);
+ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos);
+
+ (p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_dir);
+ strcpy((p).pws.pw_dir, (p).pwp->pw_dir);
+
+ (p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_shell);
+ strcpy((p).pws.pw_shell, (p).pwp->pw_shell);
+
+ (p).pwp = &(p).pws;
+}
+
+#else
+# define _Xpw_copyPasswd(p) \
+ (memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)), \
+ ((p).pws.pw_name = (p).pwbuf), \
+ ((p).len = strlen((p).pwp->pw_name)), \
+ strcpy((p).pws.pw_name, (p).pwp->pw_name), \
+ ((p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_passwd)), \
+ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd), \
+ ((p).pws.pw_age = (p).pws.pw_passwd + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_age)), \
+ strcpy((p).pws.pw_age, (p).pwp->pw_age), \
+ ((p).pws.pw_comment = (p).pws.pw_age + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_comment)), \
+ strcpy((p).pws.pw_comment, (p).pwp->pw_comment), \
+ ((p).pws.pw_gecos = (p).pws.pw_comment + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_gecos)), \
+ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \
+ ((p).pws.pw_dir = (p).pws.pw_comment + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_dir)), \
+ strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \
+ ((p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_shell)), \
+ strcpy((p).pws.pw_shell, (p).pwp->pw_shell), \
+ ((p).pwp = &(p).pws), \
+ 0 )
+#endif
+# define _XGetpwuid(u,p) \
+( (_Xos_processLock), \
+ (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p), 0 : 0), \
+ (_Xos_processUnlock), \
+ (p).pwp )
+# define _XGetpwnam(u,p) \
+( (_Xos_processLock), \
+ (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p), 0 : 0), \
+ (_Xos_processUnlock), \
+ (p).pwp )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__)
+/* SVR4 threads, AIX 4.2.0 and earlier and OSF/1 3.2 and earlier pthreads */
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[X_LINE_MAX];
+} _Xgetpwparams;
+# if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4) || defined(Lynx)
+# ifndef Lynx
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# else /* Lynx */
+# define _XGetpwuid(u,p) \
+((getpwuid_r(&(p).pws,(u),(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# define _XGetpwnam(u,p) \
+((getpwnam_r(&(p).pws,(u),(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# endif
+# else /* SVR4 */
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)
+# endif /* SVR4 */
+
+#else /* _POSIX_THREAD_SAFE_FUNCTIONS */
+/* Digital UNIX 4.0, but not (beta) T4.0-1 */
+# if defined(__osf__)
+/* OSF/1 V4.0 <pwd.h> doesn't declare the _P routines, breaking under C++. */
+extern int _Pgetpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
+extern int _Pgetpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
+# endif
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[X_LINE_MAX];
+ struct passwd* pwp;
+} _Xgetpwparams;
+typedef int _Xgetpwret;
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \
+ (p).pwp : NULL)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \
+ (p).pwp : NULL)
+#endif /* X_INCLUDE_PWD_H */
+
+#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)
+# define _XOS_INCLUDED_PWD_H
+#endif
+
+
+/***** <netdb.h> wrappers *****/
+
+/*
+ * Effective prototypes for <netdb.h> wrappers:
+ *
+ * NOTE: On systems lacking the appropriate _r functions Gethostbyname(),
+ * Gethostbyaddr(), and Getservbyname() do NOT copy the host or
+ * protocol lists!
+ *
+ * #define X_INCLUDE_NETDB_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgethostbynameparams;
+ * typedef ... _Xgetservbynameparams;
+ *
+ * struct hostent* _XGethostbyname(const char* name,_Xgethostbynameparams);
+ * struct hostent* _XGethostbyaddr(const char* addr, int len, int type,
+ * _Xgethostbynameparams);
+ * struct servent* _XGetservbyname(const char* name, const char* proto,
+ * _Xgetservbynameparams);
+ */
+
+#undef XTHREADS_NEEDS_BYNAMEPARAMS
+#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \
+ && !defined(WIN32)
+# include <netdb.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_NETDBAPI)
+# define XOS_USE_MTSAFE_NETDBAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_NETDB_H) || defined(_XOS_INCLUDED_NETDB_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgethostbynameparams; /* dummy */
+typedef int _Xgetservbynameparams; /* dummy */
+# define _XGethostbyname(h,hp) gethostbyname((h))
+# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))
+# define _XGetservbyname(s,p,sp) getservbyname((s),(p))
+
+#elif !defined(XOS_USE_MTSAFE_NETDBAPI) || defined(XNO_MTSAFE_NETDBAPI)
+/* UnixWare 2.0, or other systems with thread support but no _r API. */
+/* WARNING: The h_addr_list and s_aliases values are *not* copied! */
+
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/param.h>
+#endif
+
+typedef struct {
+ struct hostent hent;
+ char h_name[MAXHOSTNAMELEN];
+ struct hostent *hptr;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ char s_name[255];
+ char s_proto[255];
+ struct servent *sptr;
+} _Xgetservbynameparams;
+
+# define XTHREADS_NEEDS_BYNAMEPARAMS
+
+# define _Xg_copyHostent(hp) \
+ (memcpy(&(hp).hent, (hp).hptr, sizeof(struct hostent)), \
+ strcpy((hp).h_name, (hp).hptr->h_name), \
+ ((hp).hent.h_name = (hp).h_name), \
+ ((hp).hptr = &(hp).hent), \
+ 0 )
+# define _Xg_copyServent(sp) \
+ (memcpy(&(sp).sent, (sp).sptr, sizeof(struct servent)), \
+ strcpy((sp).s_name, (sp).sptr->s_name), \
+ ((sp).sent.s_name = (sp).s_name), \
+ strcpy((sp).s_proto, (sp).sptr->s_proto), \
+ ((sp).sent.s_proto = (sp).s_proto), \
+ ((sp).sptr = &(sp).sent), \
+ 0 )
+# define _XGethostbyname(h,hp) \
+ ((_Xos_processLock), \
+ (((hp).hptr = gethostbyname((h))) ? _Xg_copyHostent(hp) : 0), \
+ (_Xos_processUnlock), \
+ (hp).hptr )
+# define _XGethostbyaddr(a,al,t,hp) \
+ ((_Xos_processLock), \
+ (((hp).hptr = gethostbyaddr((a),(al),(t))) ? _Xg_copyHostent(hp) : 0), \
+ (_Xos_processUnlock), \
+ (hp).hptr )
+# define _XGetservbyname(s,p,sp) \
+ ((_Xos_processLock), \
+ (((sp).sptr = getservbyname((s),(p))) ? _Xg_copyServent(sp) : 0), \
+ (_Xos_processUnlock), \
+ (sp).sptr )
+
+#elif defined(XUSE_NETDB_R_API)
+/*
+ * POSIX does not specify _r equivalents for <netdb.h> API, but some
+ * vendors provide them anyway. Use them only when explicitly asked.
+ */
+# ifdef _POSIX_REENTRANT_FUNCTIONS
+# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# if defined(AIXV3) || defined(AIXV4) || defined(__osf__)
+# define X_POSIX_THREAD_SAFE_FUNCTIONS 1
+# endif
+# endif
+# endif
+# ifdef _POSIX_THREAD_SAFE_FUNCTIONS
+# define X_POSIX_THREAD_SAFE_FUNCTIONS 1
+# endif
+
+# define XTHREADS_NEEDS_BYNAMEPARAMS
+
+# ifndef X_POSIX_THREAD_SAFE_FUNCTIONS
+typedef struct {
+ struct hostent hent;
+ char hbuf[X_LINE_MAX];
+ int herr;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ char sbuf[X_LINE_MAX];
+} _Xgetservbynameparams;
+# define _XGethostbyname(h,hp) \
+ gethostbyname_r((h),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)
+# define _XGethostbyaddr(a,al,t,hp) \
+ gethostbyaddr_r((a),(al),(t),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)
+# define _XGetservbyname(s,p,sp) \
+ getservbyname_r((s),(p),&(sp).sent,(sp).sbuf,sizeof((sp).sbuf))
+# else
+typedef struct {
+ struct hostent hent;
+ struct hostent_data hdata;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ struct servent_data sdata;
+} _Xgetservbynameparams;
+# define _XGethostbyname(h,hp) \
+ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \
+ ((gethostbyname_r((h),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
+# define _XGethostbyaddr(a,al,t,hp) \
+ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \
+ ((gethostbyaddr_r((a),(al),(t),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
+# define _XGetservbyname(s,p,sp) \
+ (bzero((char*)&(sp).sdata,sizeof((sp).sdata)), \
+ ((getservbyname_r((s),(p),&(sp).sent,&(sp).sdata) == -1) ? NULL : &(sp).sent) )
+# endif
+# ifdef X_POSIX_THREAD_SAFE_FUNCTIONS
+# undef X_POSIX_THREAD_SAFE_FUNCTIONS
+# endif
+
+#else
+/* The regular API is assumed to be MT-safe under POSIX. */
+typedef int _Xgethostbynameparams; /* dummy */
+typedef int _Xgetservbynameparams; /* dummy */
+# define _XGethostbyname(h,hp) gethostbyname((h))
+# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))
+# define _XGetservbyname(s,p,sp) getservbyname((s),(p))
+#endif /* X_INCLUDE_NETDB_H */
+
+#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H)
+# define _XOS_INCLUDED_NETDB_H
+#endif
+
+
+/***** <dirent.h> wrappers *****/
+
+/*
+ * Effective prototypes for <dirent.h> wrappers:
+ *
+ * #define X_INCLUDE_DIRENT_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xreaddirparams;
+ *
+ * struct dirent *_XReaddir(DIR *dir_pointer, _Xreaddirparams);
+ */
+
+#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)
+# include <sys/types.h>
+# if !defined(X_NOT_POSIX) || defined(SYSV) || defined(USG)
+# include <dirent.h>
+# else
+# include <sys/dir.h>
+# ifndef dirent
+# define dirent direct
+# endif
+# endif
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_DIRENTAPI)
+# define XOS_USE_MTSAFE_DIRENTAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_DIRENT_H) || defined(_XOS_INCLUDED_DIRENT_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xreaddirparams; /* dummy */
+# define _XReaddir(d,p) readdir(d)
+
+#elif !defined(XOS_USE_MTSAFE_DIRENTAPI) || defined(XNO_MTSAFE_DIRENTAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+ struct dirent *result;
+ struct dirent dir_entry;
+# ifdef _POSIX_PATH_MAX
+ char buf[_POSIX_PATH_MAX];
+# elif defined(NAME_MAX)
+ char buf[NAME_MAX];
+# else
+ char buf[255];
+# endif
+} _Xreaddirparams;
+
+# define _XReaddir(d,p) \
+ ( (_Xos_processLock), \
+ (((p).result = readdir((d))) ? \
+ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
+ ((p).result = &(p).dir_entry), 0) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#else
+typedef struct {
+ struct dirent *result;
+ struct dirent dir_entry;
+# ifdef _POSIX_PATH_MAX
+ char buf[_POSIX_PATH_MAX];
+# elif defined(NAME_MAX)
+ char buf[NAME_MAX];
+# else
+ char buf[255];
+# endif
+} _Xreaddirparams;
+
+# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(AIXV3) || \
+ defined(AIXV4) || defined(__APPLE__)
+/* AIX defines the draft POSIX symbol, but uses the final API. */
+/* POSIX final API, returns (int)0 on success. */
+# if defined(__osf__)
+/* OSF/1 V4.0 <dirent.h> doesn't declare _Preaddir_r, breaking under C++. */
+extern int _Preaddir_r(DIR *, struct dirent *, struct dirent **);
+# endif
+# define _XReaddir(d,p) \
+ (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result)
+# elif defined(_POSIX_REENTRANT_FUNCTIONS) && defined(__osf__)
+/*
+ * OSF/1 V3.2 readdir_r() will SEGV if the main program is not
+ * explicitly linked with -lc_r. The library REQUIREDLIBS don't help.
+ * Assume that if threads have been initialized we're linked properly.
+ */
+# define _XReaddir(d,p) \
+ ( (_Xos_isThreadInitialized) ? \
+ (readdir_r((d), &((p).dir_entry)) ? NULL : &((p).dir_entry)) : \
+ ((_Xos_processLock), \
+ (((p).result = readdir((d))) ? \
+ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
+ ((p).result = &(p).dir_entry), 0) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result) )
+# elif defined(_POSIX_REENTRANT_FUNCTIONS)
+/* POSIX draft API, returns (int)0 on success. */
+# define _XReaddir(d,p) \
+ (readdir_r((d),&((p).dir_entry)) ? NULL : &((p).dir_entry))
+# elif defined(SVR4)
+/* Pre-POSIX API, returns non-NULL on success. */
+# define _XReaddir(d,p) (readdir_r((d), &(p).dir_entry))
+# else
+/* We have no idea what is going on. Fake it all using process locks. */
+# define _XReaddir(d,p) \
+ ( (_Xos_processLock), \
+ (((p).result = readdir((d))) ? \
+ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
+ ((p).result = &(p).dir_entry), 0) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# endif
+#endif /* X_INCLUDE_DIRENT_H */
+
+#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)
+# define _XOS_INCLUDED_DIRENT_H
+#endif
+
+
+/***** <unistd.h> wrappers *****/
+
+/*
+ * Effective prototypes for <unistd.h> wrappers:
+ *
+ * #define X_INCLUDE_UNISTD_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetloginparams;
+ * typedef ... _Xttynameparams;
+ *
+ * char *_XGetlogin(_Xgetloginparams);
+ * char *_XTtyname(int, _Xttynameparams);
+ */
+
+#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)
+/* <unistd.h> already included by <X11/Xos.h> */
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_UNISTDAPI)
+# define XOS_USE_MTSAFE_UNISTDAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_UNISTD_H) || defined(_XOS_INCLUDED_UNISTD_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgetloginparams; /* dummy */
+typedef int _Xttynameparams; /* dummy */
+# define _XGetlogin(p) getlogin()
+# define _XTtyname(f) ttyname((f))
+
+#elif !defined(XOS_USE_MTSAFE_UNISTDAPI) || defined(XNO_MTSAFE_UNISTDAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+ char *result;
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+ char *result;
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) \
+ ( (_Xos_processLock), \
+ (((p).result = getlogin()) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), \
+ ((p).buf[sizeof((p).buf)-1] = '\0'), \
+ ((p).result = (p).buf), 0) : 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+#define _XTtyname(f,p) \
+ ( (_Xos_processLock), \
+ (((p).result = ttyname(f)) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), \
+ ((p).buf[sizeof((p).buf)-1] = '\0'), \
+ ((p).result = (p).buf), 0) : 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_POSIX_REENTRANT_FUNCTIONS)
+/* POSIX API.
+ *
+ * extern int getlogin_r(char *, size_t);
+ * extern int ttyname_r(int, char *, size_t);
+ */
+typedef struct {
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) (getlogin_r((p).buf, sizeof((p).buf)) ? NULL : (p).buf)
+# define _XTtyname(f,p) \
+ (ttyname_r((f), (p).buf, sizeof((p).buf)) ? NULL : (p).buf)
+
+#else
+/* Pre-POSIX API.
+ *
+ * extern char *getlogin_r(char *, size_t);
+ * extern char *ttyname_r(int, char *, size_t);
+ */
+typedef struct {
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) getlogin_r((p).buf, sizeof((p).buf))
+# define _XTtyname(f,p) ttyname_r((f), (p).buf, sizeof((p).buf))
+#endif /* X_INCLUDE_UNISTD_H */
+
+#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)
+# define _XOS_INCLUDED_UNISTD_H
+#endif
+
+
+/***** <string.h> wrappers *****/
+
+/*
+ * Effective prototypes for <string.h> wrappers:
+ *
+ * #define X_INCLUDE_STRING_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xstrtokparams;
+ *
+ * char *_XStrtok(char *, const char*, _Xstrtokparams);
+ */
+
+#if defined(X_INCLUDE_STRING_H) && !defined(_XOS_INCLUDED_STRING_H)
+/* <string.h> has already been included by <X11/Xos.h> */
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_STRINGAPI)
+# define XOS_USE_MTSAFE_STRINGAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_STRING_H) || defined(_XOS_INCLUDED_STRING_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xstrtokparams; /* dummy */
+# define _XStrtok(s1,s2,p) \
+ ( p = 0, (void)p, strtok((s1),(s2)) )
+
+#elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI)
+/* Systems with thread support but no _r API. */
+typedef char *_Xstrtokparams;
+# define _XStrtok(s1,s2,p) \
+ ( (_Xos_processLock), \
+ ((p) = strtok((s1),(s2))), \
+ (_Xos_processUnlock), \
+ (p) )
+
+#else
+/* POSIX or pre-POSIX API. */
+typedef char * _Xstrtokparams;
+# define _XStrtok(s1,s2,p) strtok_r((s1),(s2),&(p))
+#endif /* X_INCLUDE_STRING_H */
+
+
+/***** <time.h> wrappers *****/
+
+/*
+ * Effective prototypes for <time.h> wrappers:
+ *
+ * #define X_INCLUDE_TIME_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xatimeparams;
+ * typedef ... _Xctimeparams;
+ * typedef ... _Xgtimeparams;
+ * typedef ... _Xltimeparams;
+ *
+ * char *_XAsctime(const struct tm *, _Xatimeparams);
+ * char *_XCtime(const time_t *, _Xctimeparams);
+ * struct tm *_XGmtime(const time_t *, _Xgtimeparams);
+ * struct tm *_XLocaltime(const time_t *, _Xltimeparams);
+ */
+
+#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)
+# include <time.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_TIMEAPI)
+# define XOS_USE_MTSAFE_TIMEAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_TIME_H) || defined(_XOS_INCLUDED_TIME_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xatimeparams; /* dummy */
+# define _XAsctime(t,p) asctime((t))
+typedef int _Xctimeparams; /* dummy */
+# define _XCtime(t,p) ctime((t))
+typedef int _Xgtimeparams; /* dummy */
+# define _XGmtime(t,p) gmtime((t))
+typedef int _Xltimeparams; /* dummy */
+# define _XLocaltime(t,p) localtime((t))
+
+#elif !defined(XOS_USE_MTSAFE_TIMEAPI) || defined(XNO_MTSAFE_TIMEAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+# ifdef TIMELEN
+ char buf[TIMELEN];
+# else
+ char buf[26];
+# endif
+ char *result;
+} _Xctimeparams, _Xatimeparams;
+typedef struct {
+ struct tm buf;
+ struct tm *result;
+} _Xgtimeparams, _Xltimeparams;
+# define _XAsctime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = asctime((t))) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XCtime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = ctime((t))) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XGmtime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = gmtime(t)) ? \
+ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XLocaltime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = localtime(t)) ? \
+ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (defined(__osf__) || defined(hpV4))
+/* Returns (int)0 on success. OSF/1 v3.2, HP/UX 10
+ *
+ * extern int asctime_r(const struct tm *timeptr, char *buffer, int buflen);
+ * extern int ctime_r(const time_t *timer, char *buffer, int buflen);
+ * extern int gmtime_r(const time_t *timer, struct tm *result);
+ * extern int localtime_r(const time_t *timer, struct tm *result);
+ */
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) (asctime_r((t),(p),sizeof((p))) ? NULL : (p))
+# define _XCtime(t,p) (ctime_r((t),(p),sizeof((p))) ? NULL : (p))
+# define _XGmtime(t,p) (gmtime_r((t),&(p)) ? NULL : &(p))
+# define _XLocaltime(t,p) (localtime_r((t),&(p)) ? NULL : &(p))
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun)
+/* Returns NULL on failure. Solaris 2.5
+ *
+ * extern char *asctime_r(const struct tm *tm,char *buf, int buflen);
+ * extern char *ctime_r(const time_t *clock, char *buf, int buflen);
+ * extern struct tm *gmtime_r(const time_t *clock, struct tm *res);
+ * extern struct tm *localtime_r(const time_t *clock, struct tm *res);
+ */
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) asctime_r((t),(p),sizeof((p)))
+# define _XCtime(t,p) ctime_r((t),(p),sizeof((p)))
+# define _XGmtime(t,p) gmtime_r((t),&(p))
+# define _XLocaltime(t,p) localtime_r((t),&(p))
+
+#else /* defined(_POSIX_THREAD_SAFE_FUNCTIONS) */
+/* POSIX final API. OSF/1 v4.0, AIX, etc.
+ *
+ * extern char *asctime_r(const struct tm *timeptr, char *buffer);
+ * extern char *ctime_r(const time_t *timer, char *buffer);
+ * extern struct tm *gmtime_r(const time_t *timer, struct tm *result);
+ * extern struct tm *localtime_r(const time_t *timer, struct tm *result);
+ */
+# if defined(__osf__)
+/* OSF/1 V4.0 <time.h> doesn't declare the _P routines, breaking under C++. */
+extern char *_Pasctime_r(const struct tm *, char *);
+extern char *_Pctime_r(const time_t *, char *);
+extern struct tm *_Plocaltime_r(const time_t *, struct tm *);
+# endif
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) asctime_r((t),(p))
+# define _XCtime(t,p) ctime_r((t),(p))
+# define _XGmtime(t,p) gmtime_r((t),&(p))
+# define _XLocaltime(t,p) localtime_r((t),&(p))
+#endif /* X_INCLUDE_TIME_H */
+
+#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)
+# define _XOS_INCLUDED_TIME_H
+#endif
+
+
+/***** <grp.h> wrappers *****/
+
+/*
+ * Effective prototypes for <grp.h> wrappers:
+ *
+ * NOTE: On systems lacking appropriate _r functions Getgrgid() and
+ * Getgrnam() do NOT copy the list of group members!
+ *
+ * Remember that fgetgrent(), setgrent(), getgrent(), and endgrent()
+ * are not included in POSIX.
+ *
+ * #define X_INCLUDE_GRP_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetgrparams;
+ *
+ * struct group *_XGetgrgid(gid_t, _Xgetgrparams);
+ * struct group *_XGetgrnam(const char *, _Xgetgrparams);
+ */
+
+#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)
+# include <grp.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_GRPAPI)
+# define XOS_USE_MTSAFE_GRPAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_GRP_H) || defined(_XOS_INCLUDED_GRP_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgetgrparams; /* dummy */
+#define _XGetgrgid(g,p) getgrgid((g))
+#define _XGetgrnam(n,p) getgrnam((n))
+
+#elif !defined(XOS_USE_MTSAFE_GRPAPI) || defined(XNO_MTSAFE_GRPAPI)
+/* Systems with thread support but no _r API. UnixWare 2.0. */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+ struct group *pgrp;
+ size_t len;
+} _Xgetgrparams;
+#ifdef SVR4
+/* Copy the gr_passwd field too. */
+# define _Xgrp_copyGroup(p) \
+ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \
+ ((p).grp.gr_name = (p).buf), \
+ ((p).len = strlen((p).pgrp->gr_name)), \
+ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \
+ ((p).grp.gr_passwd = (p).grp.gr_name + (p).len + 1), \
+ ((p).pgrp = &(p).grp), \
+ 0 )
+#else
+# define _Xgrp_copyGroup(p) \
+ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \
+ ((p).grp.gr_name = (p).buf), \
+ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \
+ ((p).pgrp = &(p).grp), \
+ 0 )
+#endif
+#define _XGetgrgid(g,p) \
+ ( (_Xos_processLock), \
+ (((p).pgrp = getgrgid((g))) ? _Xgrp_copyGroup(p) : 0), \
+ (_Xos_processUnlock), \
+ (p).pgrp )
+#define _XGetgrnam(n,p) \
+ ( (_Xos_processLock), \
+ (((p).pgrp = getgrnam((n))) ? _Xgrp_copyGroup(p) : 0), \
+ (_Xos_processUnlock), \
+ (p).pgrp )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (defined(sun) || defined(__osf__))
+/* Non-POSIX API. Solaris, DEC v3.2.
+ *
+ * extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
+ * extern struct group *getgrnam_r(const char *, struct group *, char *, int);
+ */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+} _Xgetgrparams;
+#define _XGetgrgid(g,p) getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf))
+#define _XGetgrnam(n,p) getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf))
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+/* Non-POSIX API. HP/UX 10, AIX 4.
+ *
+ * extern int getgrgid_r(gid_t, struct group *, char *, int);
+ * extern int getgrnam_r(const char *, struct group *, char *, int);
+ */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+} _Xgetgrparams;
+#define _XGetgrgid(g,p) \
+ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))
+#define _XGetgrnam(n,p) \
+ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))
+
+#else
+/* POSIX final API. DEC v4.0, IRIX 6.2.
+ *
+ * int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
+ * int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
+ */
+# if defined(__osf__)
+/* OSF/1 V4.0 <grp.h> doesn't declare the _P routines, breaking under C++. */
+extern int _Pgetgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
+extern int _Pgetgrnam_r(const char *, struct group *, char *, size_t, struct group **);
+# endif
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+ struct group *result;
+} _Xgetgrparams;
+
+#define _XGetgrgid(g,p) \
+ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \
+ NULL : (p).result))
+#define _XGetgrnam(n,p) \
+ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \
+ NULL : (p).result))
+#endif
+
+#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)
+# define _XOS_INCLUDED_GRP_H
+#endif
+
+
+#ifdef __cplusplus
+} /* Close scope of 'extern "C"' declaration which encloses file. */
+#endif
diff --git a/X11/Xosdefs.h b/X11/Xosdefs.h
new file mode 100644
index 000000000..ee33a32f8
--- /dev/null
+++ b/X11/Xosdefs.h
@@ -0,0 +1,176 @@
+/*
+ * O/S-dependent (mis)feature macro definitions
+ *
+ * $XdotOrg: xc/include/Xosdefs.h,v 1.3 2005/04/28 22:04:12 alanc Exp $
+ * $Xorg: Xosdefs.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $
+ *
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+/* $XFree86: xc/include/Xosdefs.h,v 3.20 2002/05/31 18:45:39 dawes Exp $ */
+
+#ifndef _XOSDEFS_H_
+#define _XOSDEFS_H_
+
+/*
+ * X_NOT_STDC_ENV means does not have ANSI C header files. Lack of this
+ * symbol does NOT mean that the system has stdarg.h.
+ *
+ * X_NOT_POSIX means does not have POSIX header files. Lack of this
+ * symbol does NOT mean that the POSIX environment is the default.
+ * You may still have to define _POSIX_SOURCE to get it.
+ */
+
+#ifdef NOSTDHDRS
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+
+#ifdef sony
+#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV)
+#define X_NOT_POSIX
+#endif
+#endif
+
+#ifdef UTEK
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+
+#ifdef vax
+#ifndef ultrix /* assume vanilla BSD */
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+#endif
+
+#ifdef luna
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+
+#ifdef Mips
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+
+#ifdef USL
+#ifdef SYSV /* (release 3.2) */
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+#endif
+
+#ifdef _SCO_DS
+#ifndef __SCO__
+#define __SCO__
+#endif
+#endif
+
+#ifdef __i386__
+#ifdef SYSV
+#if !defined(ISC) && !defined(__SCO__) && !defined(_SEQUENT_) && \
+ !defined(__UNIXWARE__) && !defined(sun)
+#if !defined(_POSIX_SOURCE)
+#define X_NOT_POSIX
+#endif
+#define X_NOT_STDC_ENV
+#endif
+#endif
+#endif
+
+#ifdef MOTOROLA
+#ifdef SYSV
+#define X_NOT_STDC_ENV
+#endif
+#endif
+
+#ifdef sun
+/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
+ * This check allows non-Imake configured programs to build correctly.
+ */
+#if defined(__SVR4) && !defined(SVR4)
+#define SVR4 1
+#endif
+#ifdef SVR4
+/* define this to whatever it needs to be */
+#define X_POSIX_C_SOURCE 199300L
+#endif
+#endif
+
+#ifdef WIN32
+#ifndef _POSIX_
+#define X_NOT_POSIX
+#endif
+#endif
+
+#if defined(nec_ews_svr2) || defined(SX) || defined(PC_UX)
+#define X_NOT_POSIX
+#define X_NOT_STDC_ENV
+#endif
+
+#ifdef __UNIXOS2__
+#define USGISH
+#define NULL_NOT_ZERO
+#endif
+
+#ifdef __APPLE__
+#define NULL_NOT_ZERO
+
+/* Defining any of these will sanitize the namespace to JUST want is defined by
+ * that particular standard. If that happens, we don't get some expected
+ * prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to
+ * loosen our belts a tad.
+ */
+#if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
+#define _DARWIN_C_SOURCE
+#endif
+
+#endif
+
+#ifdef __GNU__
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+#endif
+
+#if defined(__SCO__) || defined(__UNIXWARE__)
+# ifndef PATH_MAX
+# define PATH_MAX 1024
+# endif
+# ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+# endif
+#endif
+
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
+ || defined(__APPLE__) || defined(__DragonFly__)
+# ifndef CSRG_BASED
+# define CSRG_BASED
+# endif
+#endif
+
+#endif /* _XOSDEFS_H_ */
+
diff --git a/X11/Xpoll.h.in b/X11/Xpoll.h.in
new file mode 100644
index 000000000..33fdad477
--- /dev/null
+++ b/X11/Xpoll.h.in
@@ -0,0 +1,255 @@
+/* $Xorg: Xpoll.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+
+/*
+
+Copyright 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+/*
+ * Copyright © 2005 Daniel Stone
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Daniel Stone not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. Daniel Stone makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DANIEL STONE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+/* $XFree86: xc/include/Xpoll.h,v 3.8 2001/01/17 17:53:11 dawes Exp $ */
+
+#ifndef _XPOLL_H_
+#define _XPOLL_H_
+
+#ifndef WIN32
+
+#ifndef USE_POLL
+
+#include <X11/Xos.h>
+
+/* Below is the monster branch from hell. Basically, most systems will drop to
+ * 'the branch below is the fallthrough for halfway modern systems', and include
+ * <sys/select.h>, so we get the FD_* macros. */
+#if !defined(DGUX)
+# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE)
+# include <sys/select.h>
+# ifdef luna
+# include <sysent.h>
+# endif
+# else /* not SVR4/CRAY/AIXv3 */
+# if defined(AIXV4) /* AIX 4.2 fubar-ed <sys/select.h>, so try really hard. */
+# if !defined(NFDBITS)
+# include <sys/select.h>
+# endif
+# else /* the branch below is the fallthrough for halfway modern systems */
+# ifdef __QNX__ /* Make sure we get 256 bit select masks */
+# define FD_SETSIZE 256
+# endif
+# include <sys/select.h>
+# endif
+# endif
+#else /* DGUX -- No sys/select in Intel DG/ux */
+# include <sys/time.h>
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#include <X11/Xmd.h>
+
+#ifdef CSRG_BASED
+#include <sys/param.h>
+# if BSD < 199103
+typedef long fd_mask;
+# endif
+#endif
+
+#define XFD_SETSIZE 256
+
+#ifndef FD_SETSIZE
+#define FD_SETSIZE XFD_SETSIZE
+#endif
+
+#ifndef NBBY
+#define NBBY 8 /* number of bits in a byte */
+#endif
+
+#ifndef NFDBITS
+#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
+#endif
+
+#ifndef howmany
+#define howmany(x,y) (((x)+((y)-1))/(y))
+#endif
+
+#if defined(BSD) && BSD < 198911 && !defined(luna)
+typedef struct fd_set {
+ fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
+} fd_set;
+#endif
+
+#ifndef hpux /* and perhaps old BSD ??? */
+# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
+#else
+# ifndef _XPG4_EXTENDED /* HPUX 9.x and earlier */
+# define Select(n,r,w,e,t) select(n,(int*)r,(int*)w,(int*)e,(struct timeval*)t)
+# else
+# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
+# endif
+#endif
+
+#define __X_FDS_BITS @USE_FDS_BITS@
+
+#ifndef __FDS_BITS
+# define __FDS_BITS(p) ((p)->__X_FDS_BITS)
+#endif
+
+#define __XFDS_BITS(p, n) (__FDS_BITS(p))[n]
+
+#ifndef FD_SET
+#define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_CLR
+#define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_ISSET
+#define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_ZERO
+#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
+#endif
+
+/*
+ * The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the
+ * array. before accessing an element in the array we check it exists.
+ * If it does not exist then the compiler discards the code to access it.
+ */
+#define XFD_ANYSET(p) \
+ ((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))))
+
+#define XFD_COPYSET(src,dst) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \
+ }
+#define XFD_ANDSET(dst,b1,b2) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \
+ }
+#define XFD_ORSET(dst,b1,b2) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \
+ }
+#define XFD_UNSET(dst,b1) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \
+ }
+
+#else /* USE_POLL */
+#include <sys/poll.h>
+#endif /* USE_POLL */
+
+#else /* WIN32 */
+
+#define XFD_SETSIZE 256
+#ifndef FD_SETSIZE
+#define FD_SETSIZE XFD_SETSIZE
+#endif
+#include <X11/Xwinsock.h>
+
+#define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
+
+#define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count)
+#define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i])
+#define XFD_ANYSET(p) XFD_SETCOUNT(p)
+
+#define XFD_COPYSET(src,dst) { \
+ u_int __i; \
+ FD_ZERO(dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \
+ XFD_FD(dst,__i) = XFD_FD(src,__i); \
+ } \
+ XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \
+}
+
+#define XFD_ANDSET(dst,b1,b2) { \
+ u_int __i; \
+ FD_ZERO(dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
+ if (FD_ISSET(XFD_FD(b1,__i), b2)) \
+ FD_SET(XFD_FD(b1,__i), dst); \
+ } \
+}
+
+#define XFD_ORSET(dst,b1,b2) { \
+ u_int __i; \
+ if (dst != b1) XFD_COPYSET(b1,dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \
+ if (!FD_ISSET(XFD_FD(b2,__i), dst)) \
+ FD_SET(XFD_FD(b2,__i), dst); \
+ } \
+}
+
+/* this one is really sub-optimal */
+#define XFD_UNSET(dst,b1) { \
+ u_int __i; \
+ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
+ FD_CLR(XFD_FD(b1,__i), dst); \
+ } \
+}
+
+/* we have to pay the price of having an array here, unlike with bitmasks
+ calling twice FD_SET with the same fd is not transparent, so be careful */
+#undef FD_SET
+#define FD_SET(fd,set) do { \
+ if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \
+ XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \
+} while(0)
+
+#define getdtablesize() FD_SETSIZE
+
+#endif /* WIN32 */
+
+#endif /* _XPOLL_H_ */
diff --git a/X11/Xproto.h b/X11/Xproto.h
new file mode 100644
index 000000000..4ec32b8c7
--- /dev/null
+++ b/X11/Xproto.h
@@ -0,0 +1,2161 @@
+/*
+ * $Xorg: Xproto.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $
+ */
+
+/* Definitions for the X window system used by server and c bindings */
+
+/*
+ * This packet-construction scheme makes the following assumptions:
+ *
+ * 1. The compiler is able
+ * to generate code which addresses one- and two-byte quantities.
+ * In the worst case, this would be done with bit-fields. If bit-fields
+ * are used it may be necessary to reorder the request fields in this file,
+ * depending on the order in which the machine assigns bit fields to
+ * machine words. There may also be a problem with sign extension,
+ * as K+R specify that bitfields are always unsigned.
+ *
+ * 2. 2- and 4-byte fields in packet structures must be ordered by hand
+ * such that they are naturally-aligned, so that no compiler will ever
+ * insert padding bytes.
+ *
+ * 3. All packets are hand-padded to a multiple of 4 bytes, for
+ * the same reason.
+ */
+
+#ifndef XPROTO_H
+#define XPROTO_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#include <X11/Xmd.h>
+#include <X11/Xprotostr.h>
+
+/*
+ * Define constants for the sizes of the network packets. The sz_ prefix is
+ * used instead of something more descriptive so that the symbols are no more
+ * than 32 characters in length (which causes problems for some compilers).
+ */
+#define sz_xSegment 8
+#define sz_xPoint 4
+#define sz_xRectangle 8
+#define sz_xArc 12
+#define sz_xConnClientPrefix 12
+#define sz_xConnSetupPrefix 8
+#define sz_xConnSetup 32
+#define sz_xPixmapFormat 8
+#define sz_xDepth 8
+#define sz_xVisualType 24
+#define sz_xWindowRoot 40
+#define sz_xTimecoord 8
+#define sz_xHostEntry 4
+#define sz_xCharInfo 12
+#define sz_xFontProp 8
+#define sz_xTextElt 2
+#define sz_xColorItem 12
+#define sz_xrgb 8
+#define sz_xGenericReply 32
+#define sz_xGetWindowAttributesReply 44
+#define sz_xGetGeometryReply 32
+#define sz_xQueryTreeReply 32
+#define sz_xInternAtomReply 32
+#define sz_xGetAtomNameReply 32
+#define sz_xGetPropertyReply 32
+#define sz_xListPropertiesReply 32
+#define sz_xGetSelectionOwnerReply 32
+#define sz_xGrabPointerReply 32
+#define sz_xQueryPointerReply 32
+#define sz_xGetMotionEventsReply 32
+#define sz_xTranslateCoordsReply 32
+#define sz_xGetInputFocusReply 32
+#define sz_xQueryKeymapReply 40
+#define sz_xQueryFontReply 60
+#define sz_xQueryTextExtentsReply 32
+#define sz_xListFontsReply 32
+#define sz_xGetFontPathReply 32
+#define sz_xGetImageReply 32
+#define sz_xListInstalledColormapsReply 32
+#define sz_xAllocColorReply 32
+#define sz_xAllocNamedColorReply 32
+#define sz_xAllocColorCellsReply 32
+#define sz_xAllocColorPlanesReply 32
+#define sz_xQueryColorsReply 32
+#define sz_xLookupColorReply 32
+#define sz_xQueryBestSizeReply 32
+#define sz_xQueryExtensionReply 32
+#define sz_xListExtensionsReply 32
+#define sz_xSetMappingReply 32
+#define sz_xGetKeyboardControlReply 52
+#define sz_xGetPointerControlReply 32
+#define sz_xGetScreenSaverReply 32
+#define sz_xListHostsReply 32
+#define sz_xSetModifierMappingReply 32
+#define sz_xError 32
+#define sz_xEvent 32
+#define sz_xKeymapEvent 32
+#define sz_xReq 4
+#define sz_xResourceReq 8
+#define sz_xCreateWindowReq 32
+#define sz_xChangeWindowAttributesReq 12
+#define sz_xChangeSaveSetReq 8
+#define sz_xReparentWindowReq 16
+#define sz_xConfigureWindowReq 12
+#define sz_xCirculateWindowReq 8
+#define sz_xInternAtomReq 8
+#define sz_xChangePropertyReq 24
+#define sz_xDeletePropertyReq 12
+#define sz_xGetPropertyReq 24
+#define sz_xSetSelectionOwnerReq 16
+#define sz_xConvertSelectionReq 24
+#define sz_xSendEventReq 44
+#define sz_xGrabPointerReq 24
+#define sz_xGrabButtonReq 24
+#define sz_xUngrabButtonReq 12
+#define sz_xChangeActivePointerGrabReq 16
+#define sz_xGrabKeyboardReq 16
+#define sz_xGrabKeyReq 16
+#define sz_xUngrabKeyReq 12
+#define sz_xAllowEventsReq 8
+#define sz_xGetMotionEventsReq 16
+#define sz_xTranslateCoordsReq 16
+#define sz_xWarpPointerReq 24
+#define sz_xSetInputFocusReq 12
+#define sz_xOpenFontReq 12
+#define sz_xQueryTextExtentsReq 8
+#define sz_xListFontsReq 8
+#define sz_xSetFontPathReq 8
+#define sz_xCreatePixmapReq 16
+#define sz_xCreateGCReq 16
+#define sz_xChangeGCReq 12
+#define sz_xCopyGCReq 16
+#define sz_xSetDashesReq 12
+#define sz_xSetClipRectanglesReq 12
+#define sz_xCopyAreaReq 28
+#define sz_xCopyPlaneReq 32
+#define sz_xPolyPointReq 12
+#define sz_xPolySegmentReq 12
+#define sz_xFillPolyReq 16
+#define sz_xPutImageReq 24
+#define sz_xGetImageReq 20
+#define sz_xPolyTextReq 16
+#define sz_xImageTextReq 16
+#define sz_xCreateColormapReq 16
+#define sz_xCopyColormapAndFreeReq 12
+#define sz_xAllocColorReq 16
+#define sz_xAllocNamedColorReq 12
+#define sz_xAllocColorCellsReq 12
+#define sz_xAllocColorPlanesReq 16
+#define sz_xFreeColorsReq 12
+#define sz_xStoreColorsReq 8
+#define sz_xStoreNamedColorReq 16
+#define sz_xQueryColorsReq 8
+#define sz_xLookupColorReq 12
+#define sz_xCreateCursorReq 32
+#define sz_xCreateGlyphCursorReq 32
+#define sz_xRecolorCursorReq 20
+#define sz_xQueryBestSizeReq 12
+#define sz_xQueryExtensionReq 8
+#define sz_xChangeKeyboardControlReq 8
+#define sz_xBellReq 4
+#define sz_xChangePointerControlReq 12
+#define sz_xSetScreenSaverReq 12
+#define sz_xChangeHostsReq 8
+#define sz_xListHostsReq 4
+#define sz_xChangeModeReq 4
+#define sz_xRotatePropertiesReq 12
+#define sz_xReply 32
+#define sz_xGrabKeyboardReply 32
+#define sz_xListFontsWithInfoReply 60
+#define sz_xSetPointerMappingReply 32
+#define sz_xGetKeyboardMappingReply 32
+#define sz_xGetPointerMappingReply 32
+#define sz_xGetModifierMappingReply 32
+#define sz_xListFontsWithInfoReq 8
+#define sz_xPolyLineReq 12
+#define sz_xPolyArcReq 12
+#define sz_xPolyRectangleReq 12
+#define sz_xPolyFillRectangleReq 12
+#define sz_xPolyFillArcReq 12
+#define sz_xPolyText8Req 16
+#define sz_xPolyText16Req 16
+#define sz_xImageText8Req 16
+#define sz_xImageText16Req 16
+#define sz_xSetPointerMappingReq 4
+#define sz_xForceScreenSaverReq 4
+#define sz_xSetCloseDownModeReq 4
+#define sz_xClearAreaReq 16
+#define sz_xSetAccessControlReq 4
+#define sz_xGetKeyboardMappingReq 8
+#define sz_xSetModifierMappingReq 4
+#define sz_xPropIconSize 24
+#define sz_xChangeKeyboardMappingReq 8
+
+
+/* For the purpose of the structure definitions in this file,
+we must redefine the following types in terms of Xmd.h's types, which may
+include bit fields. All of these are #undef'd at the end of this file,
+restoring the definitions in X.h. */
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define X_TCP_PORT 6000 /* add display number */
+
+#define xTrue 1
+#define xFalse 0
+
+
+typedef CARD16 KeyButMask;
+
+/*****************
+ connection setup structure. This is followed by
+ numRoots xWindowRoot structs.
+*****************/
+
+typedef struct {
+ CARD8 byteOrder;
+ BYTE pad;
+ CARD16 majorVersion B16, minorVersion B16;
+ CARD16 nbytesAuthProto B16; /* Authorization protocol */
+ CARD16 nbytesAuthString B16; /* Authorization string */
+ CARD16 pad2 B16;
+} xConnClientPrefix;
+
+typedef struct {
+ CARD8 success;
+ BYTE lengthReason; /*num bytes in string following if failure */
+ CARD16 majorVersion B16,
+ minorVersion B16;
+ CARD16 length B16; /* 1/4 additional bytes in setup info */
+} xConnSetupPrefix;
+
+
+typedef struct {
+ CARD32 release B32;
+ CARD32 ridBase B32,
+ ridMask B32;
+ CARD32 motionBufferSize B32;
+ CARD16 nbytesVendor B16; /* number of bytes in vendor string */
+ CARD16 maxRequestSize B16;
+ CARD8 numRoots; /* number of roots structs to follow */
+ CARD8 numFormats; /* number of pixmap formats */
+ CARD8 imageByteOrder; /* LSBFirst, MSBFirst */
+ CARD8 bitmapBitOrder; /* LeastSignificant, MostSign...*/
+ CARD8 bitmapScanlineUnit, /* 8, 16, 32 */
+ bitmapScanlinePad; /* 8, 16, 32 */
+ KeyCode minKeyCode, maxKeyCode;
+ CARD32 pad2 B32;
+} xConnSetup;
+
+typedef struct {
+ CARD8 depth;
+ CARD8 bitsPerPixel;
+ CARD8 scanLinePad;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+} xPixmapFormat;
+
+/* window root */
+
+typedef struct {
+ CARD8 depth;
+ CARD8 pad1;
+ CARD16 nVisuals B16; /* number of xVisualType structures following */
+ CARD32 pad2 B32;
+ } xDepth;
+
+typedef struct {
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 bitsPerRGB;
+ CARD16 colormapEntries B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad B32;
+ } xVisualType;
+
+typedef struct {
+ Window windowId B32;
+ Colormap defaultColormap B32;
+ CARD32 whitePixel B32, blackPixel B32;
+ CARD32 currentInputMask B32;
+ CARD16 pixWidth B16, pixHeight B16;
+ CARD16 mmWidth B16, mmHeight B16;
+ CARD16 minInstalledMaps B16, maxInstalledMaps B16;
+ VisualID rootVisualID B32;
+ CARD8 backingStore;
+ BOOL saveUnders;
+ CARD8 rootDepth;
+ CARD8 nDepths; /* number of xDepth structures following */
+} xWindowRoot;
+
+
+/*****************************************************************
+ * Structure Defns
+ * Structures needed for replies
+ *****************************************************************/
+
+/* Used in GetMotionEvents */
+
+typedef struct {
+ CARD32 time B32;
+ INT16 x B16, y B16;
+} xTimecoord;
+
+typedef struct {
+ CARD8 family;
+ BYTE pad;
+ CARD16 length B16;
+} xHostEntry;
+
+typedef struct {
+ INT16 leftSideBearing B16,
+ rightSideBearing B16,
+ characterWidth B16,
+ ascent B16,
+ descent B16;
+ CARD16 attributes B16;
+} xCharInfo;
+
+typedef struct {
+ Atom name B32;
+ CARD32 value B32;
+} xFontProp;
+
+/*
+ * non-aligned big-endian font ID follows this struct
+ */
+typedef struct { /* followed by string */
+ CARD8 len; /* number of *characters* in string, or FontChange (255)
+ for font change, or 0 if just delta given */
+ INT8 delta;
+} xTextElt;
+
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue booleans */
+ CARD8 pad;
+} xColorItem;
+
+
+typedef struct {
+ CARD16 red B16, green B16, blue B16, pad B16;
+} xrgb;
+
+typedef CARD8 KEYCODE;
+
+
+/*****************
+ * XRep:
+ * meant to be 32 byte quantity
+ *****************/
+
+/* GenericReply is the common format of all replies. The "data" items
+ are specific to each individual reply type. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE data1; /* depends on reply type */
+ CARD16 sequenceNumber B16; /* of last request received by server */
+ CARD32 length B32; /* 4 byte quantities beyond size of GenericReply */
+ CARD32 data00 B32;
+ CARD32 data01 B32;
+ CARD32 data02 B32;
+ CARD32 data03 B32;
+ CARD32 data04 B32;
+ CARD32 data05 B32;
+ } xGenericReply;
+
+/* Individual reply formats. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 backingStore;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* NOT 0; this is an extra-large reply */
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ CARD8 bitGravity;
+ CARD8 winGravity;
+ CARD32 backingBitPlanes B32;
+ CARD32 backingPixel B32;
+ BOOL saveUnder;
+ BOOL mapInstalled;
+ CARD8 mapState;
+ BOOL override;
+ Colormap colormap B32;
+ CARD32 allEventMasks B32;
+ CARD32 yourEventMask B32;
+ CARD16 doNotPropagateMask B16;
+ CARD16 pad B16;
+ } xGetWindowAttributesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD16 borderWidth B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetGeometryReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window root B32, parent B32;
+ CARD16 nChildren B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xQueryTreeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Atom atom B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xInternAtomReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ CARD16 nameLength B16; /* # of characters in name */
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetAtomNameReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetPropertyReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nProperties B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListPropertiesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window owner B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetSelectionOwnerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGrabPointerReply;
+
+typedef xGrabPointerReply xGrabKeyboardReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32, child B32;
+ INT16 rootX B16, rootY B16, winX B16, winY B16;
+ CARD16 mask B16;
+ CARD16 pad1 B16;
+ CARD32 pad B32;
+ } xQueryPointerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nEvents B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetMotionEventsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window child B32;
+ INT16 dstX B16, dstY B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xTranslateCoordsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 revertTo;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window focus B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xGetInputFocusReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 2, NOT 0; this is an extra-large reply */
+ BYTE map[32];
+ } xQueryKeymapReply;
+
+/* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */
+typedef struct _xQueryFontReply {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
+ xCharInfo minBounds;
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nCharInfos B32; /* followed by this many xCharInfo structures */
+} xQueryFontReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 drawDirection;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ INT16 fontAscent B16, fontDescent B16;
+ INT16 overallAscent B16, overallDescent B16;
+ INT32 overallWidth B32, overallLeft B32, overallRight B32;
+ CARD32 pad B32;
+ } xQueryTextExtentsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nFonts B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListFontsReply;
+
+/* Warning: this MUST match (up to component renaming) xQueryFontReply */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nameLength; /* 0 indicates end-of-reply-sequence */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
+ xCharInfo minBounds;
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nReplies B32; /* hint as to how many more replies might be coming */
+} xListFontsWithInfoReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPaths B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetFontPathReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ VisualID visual B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetImageReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColormaps B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListInstalledColormapsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+ CARD32 pixel B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xAllocColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pixel B32;
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xAllocNamedColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16, nMasks B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xAllocColorCellsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16;
+ CARD16 pad2 B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ } xAllocColorPlanesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColors B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryColorsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xLookupColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 width B16, height B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryBestSizeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ BOOL present;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 first_error;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryExtensionReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nExtensions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListExtensionsReply;
+
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 success;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xSetMappingReply;
+typedef xSetMappingReply xSetPointerMappingReply;
+typedef xSetMappingReply xSetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nElts; /* how many elements does the map have */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetPointerMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 keySymsPerKeyCode;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGetKeyboardMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 numKeyPerModifier;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL globalAutoRepeat;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 5 */
+ CARD32 ledMask B32;
+ CARD8 keyClickPercent, bellPercent;
+ CARD16 bellPitch B16, bellDuration B16;
+ CARD16 pad B16;
+ BYTE map[32]; /* bit masks start here */
+ } xGetKeyboardControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 accelNumerator B16, accelDenominator B16;
+ CARD16 threshold B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetPointerControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 timeout B16, interval B16;
+ BOOL preferBlanking;
+ BOOL allowExposures;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetScreenSaverReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL enabled;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nHosts B16;
+ CARD16 pad1 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListHostsReply;
+
+
+
+
+/*****************************************************************
+ * Xerror
+ * All errors are 32 bytes
+ *****************************************************************/
+
+typedef struct {
+ BYTE type; /* X_Error */
+ BYTE errorCode;
+ CARD16 sequenceNumber B16; /* the nth request from this client */
+ CARD32 resourceID B32;
+ CARD16 minorCode B16;
+ CARD8 majorCode;
+ BYTE pad1;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xError;
+
+/*****************************************************************
+ * xEvent
+ * All events are 32 bytes
+ *****************************************************************/
+
+typedef struct _xEvent {
+ union {
+ struct {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ } u;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BOOL sameScreen;
+ BYTE pad1;
+ } keyButtonPointer;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BYTE mode; /* really XMode */
+ BYTE flags; /* sameScreen and focus booleans, packed together */
+#define ELFlagFocus (1<<0)
+#define ELFlagSameScreen (1<<1)
+ } enterLeave;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ BYTE mode; /* really XMode */
+ BYTE pad1, pad2, pad3;
+ } focus;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 count B16;
+ CARD16 pad2 B16;
+ } expose;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 minorEvent B16;
+ CARD16 count B16;
+ BYTE majorEvent;
+ BYTE pad1, pad2, pad3;
+ } graphicsExposure;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 minorEvent B16;
+ BYTE majorEvent;
+ BYTE bpad;
+ } noExposure;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD8 state;
+ BYTE pad1, pad2, pad3;
+ } visibility;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } createNotify;
+/*
+ * The event fields in the structures for DestroyNotify, UnmapNotify,
+ * MapNotify, ReparentNotify, ConfigureNotify, CirculateNotify, GravityNotify,
+ * must be at the same offset because server internal code is depending upon
+ * this to patch up the events before they are delivered.
+ * Also note that MapRequest, ConfigureRequest and CirculateRequest have
+ * the same offset for the event window.
+ */
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ } destroyNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL fromConfigure;
+ BYTE pad1, pad2, pad3;
+ } unmapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } mapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ } mapRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ INT16 x B16, y B16;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } reparent;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, aboveSibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } configureNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32, sibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ CARD16 valueMask B16;
+ CARD32 pad1 B32;
+ } configureRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ INT16 x B16, y B16;
+ CARD32 pad1 B32, pad2 B32, pad3 B32, pad4 B32;
+ } gravity;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 width B16, height B16;
+ } resizeRequest;
+ struct {
+/* The event field in the circulate record is really the parent when this
+ is used as a CirculateRequest instead of a CirculateNotify */
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ BYTE place; /* Top or Bottom */
+ BYTE pad1, pad2, pad3;
+ } circulate;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Atom atom B32;
+ Time time B32;
+ BYTE state; /* NewValue or Deleted */
+ BYTE pad1;
+ CARD16 pad2 B16;
+ } property;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window window B32;
+ Atom atom B32;
+ } selectionClear;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window owner B32, requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionRequest;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Colormap colormap B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_new;
+#else
+ BOOL new;
+#endif
+ BYTE state; /* Installed or UnInstalled */
+ BYTE pad1, pad2;
+ } colormap;
+ struct {
+ CARD32 pad00 B32;
+ CARD8 request;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+ } mappingNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ union {
+ struct {
+ Atom type B32;
+ INT32 longs0 B32;
+ INT32 longs1 B32;
+ INT32 longs2 B32;
+ INT32 longs3 B32;
+ INT32 longs4 B32;
+ } l;
+ struct {
+ Atom type B32;
+ INT16 shorts0 B16;
+ INT16 shorts1 B16;
+ INT16 shorts2 B16;
+ INT16 shorts3 B16;
+ INT16 shorts4 B16;
+ INT16 shorts5 B16;
+ INT16 shorts6 B16;
+ INT16 shorts7 B16;
+ INT16 shorts8 B16;
+ INT16 shorts9 B16;
+ } s;
+ struct {
+ Atom type B32;
+ INT8 bytes[20];
+ } b;
+ } u;
+ } clientMessage;
+ } u;
+} xEvent;
+
+/*********************************************************
+ *
+ * Generic event
+ *
+ * Those events are not part of the core protocol spec and can be used by
+ * various extensions.
+ * type is always GenericEvent
+ * extension is the minor opcode of the extension the event belongs to.
+ * evtype is the actual event type, unique __per extension__.
+ *
+ * GenericEvents can be longer than 32 bytes, with the length field
+ * specifying the number of 4 byte blocks after the first 32 bytes.
+ *
+ *
+ */
+typedef struct
+{
+ BYTE type;
+ CARD8 extension;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 evtype B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGenericEvent;
+
+
+
+/* KeymapNotify events are not included in the above union because they
+ are different from all other events: they do not have a "detail"
+ or "sequenceNumber", so there is room for a 248-bit key mask. */
+
+typedef struct {
+ BYTE type;
+ BYTE map[31];
+ } xKeymapEvent;
+
+#define XEventSize (sizeof(xEvent))
+
+/* XReply is the union of all the replies above whose "fixed part"
+fits in 32 bytes. It does NOT include GetWindowAttributesReply,
+QueryFontReply, QueryKeymapReply, or GetKeyboardControlReply
+ListFontsWithInfoReply */
+
+typedef union {
+ xGenericReply generic;
+ xGetGeometryReply geom;
+ xQueryTreeReply tree;
+ xInternAtomReply atom;
+ xGetAtomNameReply atomName;
+ xGetPropertyReply property;
+ xListPropertiesReply listProperties;
+ xGetSelectionOwnerReply selection;
+ xGrabPointerReply grabPointer;
+ xGrabKeyboardReply grabKeyboard;
+ xQueryPointerReply pointer;
+ xGetMotionEventsReply motionEvents;
+ xTranslateCoordsReply coords;
+ xGetInputFocusReply inputFocus;
+ xQueryTextExtentsReply textExtents;
+ xListFontsReply fonts;
+ xGetFontPathReply fontPath;
+ xGetImageReply image;
+ xListInstalledColormapsReply colormaps;
+ xAllocColorReply allocColor;
+ xAllocNamedColorReply allocNamedColor;
+ xAllocColorCellsReply colorCells;
+ xAllocColorPlanesReply colorPlanes;
+ xQueryColorsReply colors;
+ xLookupColorReply lookupColor;
+ xQueryBestSizeReply bestSize;
+ xQueryExtensionReply extension;
+ xListExtensionsReply extensions;
+ xSetModifierMappingReply setModifierMapping;
+ xGetModifierMappingReply getModifierMapping;
+ xSetPointerMappingReply setPointerMapping;
+ xGetKeyboardMappingReply getKeyboardMapping;
+ xGetPointerMappingReply getPointerMapping;
+ xGetPointerControlReply pointerControl;
+ xGetScreenSaverReply screenSaver;
+ xListHostsReply hosts;
+ xError error;
+ xEvent event;
+} xReply;
+
+
+
+/*****************************************************************
+ * REQUESTS
+ *****************************************************************/
+
+
+/* Request structure */
+
+typedef struct _xReq {
+ CARD8 reqType;
+ CARD8 data; /* meaning depends on request type */
+ CARD16 length B16; /* length in 4 bytes quantities
+ of whole request, including this header */
+} xReq;
+
+/*****************************************************************
+ * structures that follow request.
+ *****************************************************************/
+
+/* ResourceReq is used for any request which has a resource ID
+ (or Atom or Time) as its one and only argument. */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 id B32; /* a Window, Drawable, Font, GContext, Pixmap, etc. */
+ } xResourceReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Window wid B32, parent B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ VisualID visual B32;
+ CARD32 mask B32;
+} xCreateWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD32 valueMask B32;
+} xChangeWindowAttributesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ Window window B32;
+} xChangeSaveSetReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32, parent B32;
+ INT16 x B16, y B16;
+} xReparentWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 mask B16;
+ CARD16 pad2 B16;
+} xConfigureWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 direction;
+ CARD16 length B16;
+ Window window B32;
+} xCirculateWindowReq;
+
+typedef struct { /* followed by padded string */
+ CARD8 reqType;
+ BOOL onlyIfExists;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of bytes in string */
+ CARD16 pad B16;
+} xInternAtomReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD8 format;
+ BYTE pad[3];
+ CARD32 nUnits B32; /* length of stuff following, depends on format */
+} xChangePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+} xDeletePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_delete;
+#else
+ BOOL delete;
+#endif
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+} xGetPropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom selection B32;
+ Time time B32;
+} xSetSelectionOwnerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ Time time B32;
+ } xConvertSelectionReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL propagate;
+ CARD16 length B16;
+ Window destination B32;
+ CARD32 eventMask B32;
+#ifdef WORD64
+ /* the structure should have been quad-aligned */
+ BYTE eventdata[SIZEOF(xEvent)];
+#else
+ xEvent event;
+#endif /* WORD64 */
+} xSendEventReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ Time time B32;
+} xGrabPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ CARD8 button;
+ BYTE pad;
+ CARD16 modifiers B16;
+} xGrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 button;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ Time time B32;
+ CARD16 eventMask B16;
+ CARD16 pad2 B16;
+} xChangeActivePointerGrabReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ Time time B32;
+ BYTE pointerMode, keyboardMode;
+ CARD16 pad B16;
+} xGrabKeyboardReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 key;
+ BYTE pointerMode, keyboardMode;
+ BYTE pad1, pad2, pad3;
+} xGrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 key;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Time time B32;
+} xAllowEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Time start B32, stop B32;
+} xGetMotionEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+} xTranslateCoordsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+ INT16 dstX B16, dstY B16;
+} xWarpPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 revertTo;
+ CARD16 length B16;
+ Window focus B32;
+ Time time B32;
+} xSetInputFocusReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font fid B32;
+ CARD16 nbytes B16;
+ BYTE pad1, pad2; /* string follows on word boundary */
+} xOpenFontReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL oddLength;
+ CARD16 length B16;
+ Font fid B32;
+ } xQueryTextExtentsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 maxNames B16;
+ CARD16 nbytes B16; /* followed immediately by string bytes */
+} xListFontsReq;
+
+typedef xListFontsReq xListFontsWithInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nFonts B16;
+ BYTE pad1, pad2; /* LISTofSTRING8 follows on word boundary */
+} xSetFontPathReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Pixmap pid B32;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xCreatePixmapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ Drawable drawable B32;
+ CARD32 mask B32;
+} xCreateGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD32 mask B32;
+} xChangeGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext srcGC B32, dstGC B32;
+ CARD32 mask B32;
+} xCopyGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD16 dashOffset B16;
+ CARD16 nDashes B16; /* length LISTofCARD8 of values following */
+} xSetDashesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE ordering;
+ CARD16 length B16;
+ GContext gc B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xSetClipRectanglesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL exposures;
+ CARD16 length B16;
+ Window window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xClearAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+} xCopyAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+ CARD32 bitPlane B32;
+} xCopyPlaneReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE coordMode;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolyPointReq;
+
+typedef xPolyPointReq xPolyLineReq; /* same request structure */
+
+/* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolySegmentReq;
+
+typedef xPolySegmentReq xPolyArcReq;
+typedef xPolySegmentReq xPolyRectangleReq;
+typedef xPolySegmentReq xPolyFillRectangleReq;
+typedef xPolySegmentReq xPolyFillArcReq;
+
+typedef struct _FillPolyReq {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ BYTE shape;
+ BYTE coordMode;
+ CARD16 pad1 B16;
+} xFillPolyReq;
+
+
+typedef struct _PutImageReq {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ CARD16 width B16, height B16;
+ INT16 dstX B16, dstY B16;
+ CARD8 leftPad;
+ CARD8 depth;
+ CARD16 pad B16;
+} xPutImageReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 planeMask B32;
+} xGetImageReq;
+
+/* the following used by PolyText8 and PolyText16 */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16; /* items (xTextElt) start after struct */
+} xPolyTextReq;
+
+typedef xPolyTextReq xPolyText8Req;
+typedef xPolyTextReq xPolyText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE nChars;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16;
+} xImageTextReq;
+
+typedef xImageTextReq xImageText8Req;
+typedef xImageTextReq xImageText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE alloc;
+ CARD16 length B16;
+ Colormap mid B32;
+ Window window B32;
+ VisualID visual B32;
+} xCreateColormapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap mid B32;
+ Colormap srcCmap B32;
+} xCopyColormapAndFreeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+} xAllocColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* followed by structure */
+ BYTE pad1, pad2;
+} xAllocNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, planes B16;
+} xAllocColorCellsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, red B16, green B16, blue B16;
+} xAllocColorPlanesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 planeMask B32;
+} xFreeColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xStoreColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue, as in xColorItem */
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 pixel B32;
+ CARD16 nbytes B16; /* number of name string bytes following structure */
+ BYTE pad1, pad2;
+ } xStoreNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xQueryColorsReq;
+
+typedef struct { /* followed by string of length len */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* number of string bytes following structure*/
+ BYTE pad1, pad2;
+} xLookupColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Pixmap source B32, mask B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+ CARD16 x B16, y B16;
+} xCreateCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Font source B32, mask B32;
+ CARD16 sourceChar B16, maskChar B16;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xCreateGlyphCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xRecolorCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD16 length B16;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xQueryBestSizeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of string bytes following structure */
+ BYTE pad1, pad2;
+} xQueryExtensionReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 numKeyPerModifier;
+ CARD16 length B16;
+} xSetModifierMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 nElts; /* how many elements in the map */
+ CARD16 length B16;
+} xSetPointerMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ CARD16 pad1 B16;
+} xGetKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 keyCodes;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD16 pad1 B16;
+} xChangeKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 mask B32;
+} xChangeKeyboardControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ INT8 percent; /* -100 to 100 */
+ CARD16 length B16;
+} xBellReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 accelNum B16, accelDenum B16;
+ INT16 threshold B16;
+ BOOL doAccel, doThresh;
+} xChangePointerControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 timeout B16, interval B16;
+ BYTE preferBlank, allowExpose;
+ CARD16 pad2 B16;
+} xSetScreenSaverReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ CARD8 hostFamily;
+ BYTE pad;
+ CARD16 hostLength B16;
+} xChangeHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ } xListHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ } xChangeModeReq;
+
+typedef xChangeModeReq xSetAccessControlReq;
+typedef xChangeModeReq xSetCloseDownModeReq;
+typedef xChangeModeReq xForceScreenSaverReq;
+
+typedef struct { /* followed by LIST of ATOM */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 nAtoms B16;
+ INT16 nPositions B16;
+ } xRotatePropertiesReq;
+
+
+
+/* Reply codes */
+
+#define X_Reply 1 /* Normal reply */
+#define X_Error 0 /* Error */
+
+/* Request codes */
+
+#define X_CreateWindow 1
+#define X_ChangeWindowAttributes 2
+#define X_GetWindowAttributes 3
+#define X_DestroyWindow 4
+#define X_DestroySubwindows 5
+#define X_ChangeSaveSet 6
+#define X_ReparentWindow 7
+#define X_MapWindow 8
+#define X_MapSubwindows 9
+#define X_UnmapWindow 10
+#define X_UnmapSubwindows 11
+#define X_ConfigureWindow 12
+#define X_CirculateWindow 13
+#define X_GetGeometry 14
+#define X_QueryTree 15
+#define X_InternAtom 16
+#define X_GetAtomName 17
+#define X_ChangeProperty 18
+#define X_DeleteProperty 19
+#define X_GetProperty 20
+#define X_ListProperties 21
+#define X_SetSelectionOwner 22
+#define X_GetSelectionOwner 23
+#define X_ConvertSelection 24
+#define X_SendEvent 25
+#define X_GrabPointer 26
+#define X_UngrabPointer 27
+#define X_GrabButton 28
+#define X_UngrabButton 29
+#define X_ChangeActivePointerGrab 30
+#define X_GrabKeyboard 31
+#define X_UngrabKeyboard 32
+#define X_GrabKey 33
+#define X_UngrabKey 34
+#define X_AllowEvents 35
+#define X_GrabServer 36
+#define X_UngrabServer 37
+#define X_QueryPointer 38
+#define X_GetMotionEvents 39
+#define X_TranslateCoords 40
+#define X_WarpPointer 41
+#define X_SetInputFocus 42
+#define X_GetInputFocus 43
+#define X_QueryKeymap 44
+#define X_OpenFont 45
+#define X_CloseFont 46
+#define X_QueryFont 47
+#define X_QueryTextExtents 48
+#define X_ListFonts 49
+#define X_ListFontsWithInfo 50
+#define X_SetFontPath 51
+#define X_GetFontPath 52
+#define X_CreatePixmap 53
+#define X_FreePixmap 54
+#define X_CreateGC 55
+#define X_ChangeGC 56
+#define X_CopyGC 57
+#define X_SetDashes 58
+#define X_SetClipRectangles 59
+#define X_FreeGC 60
+#define X_ClearArea 61
+#define X_CopyArea 62
+#define X_CopyPlane 63
+#define X_PolyPoint 64
+#define X_PolyLine 65
+#define X_PolySegment 66
+#define X_PolyRectangle 67
+#define X_PolyArc 68
+#define X_FillPoly 69
+#define X_PolyFillRectangle 70
+#define X_PolyFillArc 71
+#define X_PutImage 72
+#define X_GetImage 73
+#define X_PolyText8 74
+#define X_PolyText16 75
+#define X_ImageText8 76
+#define X_ImageText16 77
+#define X_CreateColormap 78
+#define X_FreeColormap 79
+#define X_CopyColormapAndFree 80
+#define X_InstallColormap 81
+#define X_UninstallColormap 82
+#define X_ListInstalledColormaps 83
+#define X_AllocColor 84
+#define X_AllocNamedColor 85
+#define X_AllocColorCells 86
+#define X_AllocColorPlanes 87
+#define X_FreeColors 88
+#define X_StoreColors 89
+#define X_StoreNamedColor 90
+#define X_QueryColors 91
+#define X_LookupColor 92
+#define X_CreateCursor 93
+#define X_CreateGlyphCursor 94
+#define X_FreeCursor 95
+#define X_RecolorCursor 96
+#define X_QueryBestSize 97
+#define X_QueryExtension 98
+#define X_ListExtensions 99
+#define X_ChangeKeyboardMapping 100
+#define X_GetKeyboardMapping 101
+#define X_ChangeKeyboardControl 102
+#define X_GetKeyboardControl 103
+#define X_Bell 104
+#define X_ChangePointerControl 105
+#define X_GetPointerControl 106
+#define X_SetScreenSaver 107
+#define X_GetScreenSaver 108
+#define X_ChangeHosts 109
+#define X_ListHosts 110
+#define X_SetAccessControl 111
+#define X_SetCloseDownMode 112
+#define X_KillClient 113
+#define X_RotateProperties 114
+#define X_ForceScreenSaver 115
+#define X_SetPointerMapping 116
+#define X_GetPointerMapping 117
+#define X_SetModifierMapping 118
+#define X_GetModifierMapping 119
+#define X_NoOperation 127
+
+/* restore these definitions back to the typedefs in X.h */
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* XPROTO_H */
diff --git a/X11/Xprotostr.h b/X11/Xprotostr.h
new file mode 100644
index 000000000..f343d9849
--- /dev/null
+++ b/X11/Xprotostr.h
@@ -0,0 +1,78 @@
+/* $Xorg: Xprotostr.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+#ifndef XPROTOSTRUCTS_H
+#define XPROTOSTRUCTS_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#include <X11/Xmd.h>
+
+/* Used by PolySegment */
+
+typedef struct _xSegment {
+ INT16 x1 B16, y1 B16, x2 B16, y2 B16;
+} xSegment;
+
+/* POINT */
+
+typedef struct _xPoint {
+ INT16 x B16, y B16;
+} xPoint;
+
+typedef struct _xRectangle {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xRectangle;
+
+/* ARC */
+
+typedef struct _xArc {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ INT16 angle1 B16, angle2 B16;
+} xArc;
+
+#endif /* XPROTOSTRUCTS_H */
diff --git a/X11/Xthreads.h b/X11/Xthreads.h
new file mode 100644
index 000000000..54b5440ad
--- /dev/null
+++ b/X11/Xthreads.h
@@ -0,0 +1,316 @@
+/*
+ * $Xorg: Xthreads.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $
+ *
+ *
+Copyright 1993, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ * *
+ */
+/* $XFree86: Xthreads.h,v 3.10 2001/12/14 19:53:26 dawes Exp $ */
+
+#ifndef _XTHREADS_H_
+#define _XTHREADS_H_
+
+/* Redefine these to XtMalloc/XtFree or whatever you want before including
+ * this header file.
+ */
+#ifndef xmalloc
+#define xmalloc malloc
+#endif
+#ifndef xfree
+#define xfree free
+#endif
+
+#ifdef CTHREADS
+#include <cthreads.h>
+typedef cthread_t xthread_t;
+typedef struct condition xcondition_rec;
+typedef struct mutex xmutex_rec;
+#define xthread_init() cthread_init()
+#define xthread_self cthread_self
+#define xthread_fork(func,closure) cthread_fork(func,closure)
+#define xthread_yield() cthread_yield()
+#define xthread_exit(v) cthread_exit(v)
+#define xthread_set_name(t,str) cthread_set_name(t,str)
+#define xmutex_init(m) mutex_init(m)
+#define xmutex_clear(m) mutex_clear(m)
+#define xmutex_lock(m) mutex_lock(m)
+#define xmutex_unlock(m) mutex_unlock(m)
+#define xmutex_set_name(m,str) mutex_set_name(m,str)
+#define xcondition_init(cv) condition_init(cv)
+#define xcondition_clear(cv) condition_clear(cv)
+#define xcondition_wait(cv,m) condition_wait(cv,m)
+#define xcondition_signal(cv) condition_signal(cv)
+#define xcondition_broadcast(cv) condition_broadcast(cv)
+#define xcondition_set_name(cv,str) condition_set_name(cv,str)
+#else /* !CTHREADS */
+#if defined(SVR4) && !defined(__sgi) && !defined(_SEQUENT_)
+#include <thread.h>
+#include <synch.h>
+typedef thread_t xthread_t;
+typedef thread_key_t xthread_key_t;
+typedef cond_t xcondition_rec;
+typedef mutex_t xmutex_rec;
+#if defined(__UNIXWARE__)
+extern xthread_t (*_x11_thr_self)();
+#define xthread_self (_x11_thr_self)
+#else
+#define xthread_self thr_self
+#endif
+#define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
+#define xthread_yield() thr_yield()
+#define xthread_exit(v) thr_exit(v)
+#define xthread_key_create(kp,d) thr_keycreate(kp,d)
+#ifdef sun
+#define xthread_key_delete(k) 0
+#else
+#define xthread_key_delete(k) thr_keydelete(k)
+#endif
+#define xthread_set_specific(k,v) thr_setspecific(k,v)
+#define xthread_get_specific(k,vp) thr_getspecific(k,vp)
+#define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
+#define xmutex_clear(m) mutex_destroy(m)
+#define xmutex_lock(m) mutex_lock(m)
+#define xmutex_unlock(m) mutex_unlock(m)
+#define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)
+#define xcondition_clear(cv) cond_destroy(cv)
+#define xcondition_wait(cv,m) cond_wait(cv,m)
+#define xcondition_signal(cv) cond_signal(cv)
+#define xcondition_broadcast(cv) cond_broadcast(cv)
+#else /* !SVR4 */
+#ifdef WIN32
+#include <X11/Xwindows.h>
+typedef DWORD xthread_t;
+typedef DWORD xthread_key_t;
+struct _xthread_waiter {
+ HANDLE sem;
+ struct _xthread_waiter *next;
+};
+typedef struct {
+ CRITICAL_SECTION cs;
+ struct _xthread_waiter *waiters;
+} xcondition_rec;
+typedef CRITICAL_SECTION xmutex_rec;
+#define xthread_init() _Xthread_init()
+#define xthread_self GetCurrentThreadId
+#define xthread_fork(func,closure) { \
+ DWORD _tmptid; \
+ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \
+ &_tmptid); \
+}
+#define xthread_yield() Sleep(0)
+#define xthread_exit(v) ExitThread((DWORD)(v))
+#define xthread_key_create(kp,d) *(kp) = TlsAlloc()
+#define xthread_key_delete(k) TlsFree(k)
+#define xthread_set_specific(k,v) TlsSetValue(k,v)
+#define xthread_get_specific(k,vp) TlsGetValue(k)
+#define xmutex_init(m) InitializeCriticalSection(m)
+#define xmutex_clear(m) DeleteCriticalSection(m)
+#define _XMUTEX_NESTS
+#define xmutex_lock(m) EnterCriticalSection(m)
+#define xmutex_unlock(m) LeaveCriticalSection(m)
+#define xcondition_init(cv) { \
+ InitializeCriticalSection(&(cv)->cs); \
+ (cv)->waiters = NULL; \
+}
+#define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)
+extern struct _xthread_waiter *_Xthread_waiter();
+#define xcondition_wait(cv,m) { \
+ struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \
+ EnterCriticalSection(&(cv)->cs); \
+ _tmpthr->next = (cv)->waiters; \
+ (cv)->waiters = _tmpthr; \
+ LeaveCriticalSection(&(cv)->cs); \
+ LeaveCriticalSection(m); \
+ WaitForSingleObject(_tmpthr->sem, INFINITE); \
+ EnterCriticalSection(m); \
+}
+#define xcondition_signal(cv) { \
+ EnterCriticalSection(&(cv)->cs); \
+ if ((cv)->waiters) { \
+ ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \
+ (cv)->waiters = (cv)->waiters->next; \
+ } \
+ LeaveCriticalSection(&(cv)->cs); \
+}
+#define xcondition_broadcast(cv) { \
+ struct _xthread_waiter *_tmpthr; \
+ EnterCriticalSection(&(cv)->cs); \
+ for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \
+ ReleaseSemaphore(_tmpthr->sem, 1, NULL); \
+ (cv)->waiters = NULL; \
+ LeaveCriticalSection(&(cv)->cs); \
+}
+#else /* !WIN32 */
+#ifdef USE_TIS_SUPPORT
+/*
+ * TIS support is intended for thread safe libraries.
+ * This should not be used for general client programming.
+ */
+#include <tis.h>
+typedef pthread_t xthread_t;
+typedef pthread_key_t xthread_key_t;
+typedef pthread_cond_t xcondition_rec;
+typedef pthread_mutex_t xmutex_rec;
+#define xthread_self tis_self
+#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,NULL,func,closure); }
+#define xthread_yield() pthread_yield_np()
+#define xthread_exit(v) pthread_exit(v)
+#define xthread_key_create(kp,d) tis_key_create(kp,d)
+#define xthread_key_delete(k) tis_key_delete(k)
+#define xthread_set_specific(k,v) tis_setspecific(k,v)
+#define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)
+#define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+#define xmutex_init(m) tis_mutex_init(m)
+#define xmutex_clear(m) tis_mutex_destroy(m)
+#define xmutex_lock(m) tis_mutex_lock(m)
+#define xmutex_unlock(m) tis_mutex_unlock(m)
+#define xcondition_init(c) tis_cond_init(c)
+#define xcondition_clear(c) tis_cond_destroy(c)
+#define xcondition_wait(c,m) tis_cond_wait(c,m)
+#define xcondition_signal(c) tis_cond_signal(c)
+#define xcondition_broadcast(c) tis_cond_broadcast(c)
+#else
+#ifdef USE_NBSD_THREADLIB
+/*
+ * NetBSD threadlib support is intended for thread safe libraries.
+ * This should not be used for general client programming.
+ */
+#include <threadlib.h>
+typedef thr_t xthread_t;
+typedef thread_key_t xthread_key_t;
+typedef cond_t xcondition_rec;
+typedef mutex_t xmutex_rec;
+#define xthread_self thr_self
+#define xthread_fork(func,closure) { thr_t _tmpxthr; \
+ /* XXX Create it detached? --thorpej */ \
+ thr_create(&_tmpxthr,NULL,func,closure); }
+#define xthread_yield() thr_yield()
+#define xthread_exit(v) thr_exit(v)
+#define xthread_key_create(kp,d) thr_keycreate(kp,d)
+#define xthread_key_delete(k) thr_keydelete(k)
+#define xthread_set_specific(k,v) thr_setspecific(k,v)
+#define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
+#define XMUTEX_INITIALIZER MUTEX_INITIALIZER
+#define xmutex_init(m) mutex_init(m, 0)
+#define xmutex_clear(m) mutex_destroy(m)
+#define xmutex_lock(m) mutex_lock(m)
+#define xmutex_unlock(m) mutex_unlock(m)
+#define xcondition_init(c) cond_init(c, 0, 0)
+#define xcondition_clear(c) cond_destroy(c)
+#define xcondition_wait(c,m) cond_wait(c,m)
+#define xcondition_signal(c) cond_signal(c)
+#define xcondition_broadcast(c) cond_broadcast(c)
+#else
+#include <pthread.h>
+typedef pthread_t xthread_t;
+typedef pthread_key_t xthread_key_t;
+typedef pthread_cond_t xcondition_rec;
+typedef pthread_mutex_t xmutex_rec;
+#define xthread_self pthread_self
+#define xthread_yield() pthread_yield()
+#define xthread_exit(v) pthread_exit(v)
+#define xthread_set_specific(k,v) pthread_setspecific(k,v)
+#define xmutex_clear(m) pthread_mutex_destroy(m)
+#define xmutex_lock(m) pthread_mutex_lock(m)
+#define xmutex_unlock(m) pthread_mutex_unlock(m)
+#ifndef XPRE_STANDARD_API
+#define xthread_key_create(kp,d) pthread_key_create(kp,d)
+#define xthread_key_delete(k) pthread_key_delete(k)
+#define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)
+#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,NULL,func,closure); }
+#define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+#define xmutex_init(m) pthread_mutex_init(m, NULL)
+#define xcondition_init(c) pthread_cond_init(c, NULL)
+#else /* XPRE_STANDARD_API */
+#define xthread_key_create(kp,d) pthread_keycreate(kp,d)
+#define xthread_key_delete(k) 0
+#define xthread_get_specific(k,vp) pthread_getspecific(k,vp)
+#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
+#define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
+#define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
+#endif /* XPRE_STANDARD_API */
+#define xcondition_clear(c) pthread_cond_destroy(c)
+#define xcondition_wait(c,m) pthread_cond_wait(c,m)
+#define xcondition_signal(c) pthread_cond_signal(c)
+#define xcondition_broadcast(c) pthread_cond_broadcast(c)
+#if defined(_DECTHREADS_)
+static xthread_t _X_no_thread_id;
+#define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
+#define xthread_clear_id(id) id = _X_no_thread_id
+#define xthread_equal(id1,id2) pthread_equal(id1, id2)
+#endif /* _DECTHREADS_ */
+#if defined(__linux__)
+#define xthread_have_id(id) !pthread_equal(id, 0)
+#define xthread_clear_id(id) id = 0
+#define xthread_equal(id1,id2) pthread_equal(id1, id2)
+#endif /* linux */
+#if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
+#ifdef DEBUG /* too much of a hack to enable normally */
+/* see also cma__obj_set_name() */
+#define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
+#define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
+#endif /* DEBUG */
+#endif /* _CMA_VENDOR_ == _CMA__IBM */
+#endif /* USE_NBSD_THREADLIB */
+#endif /* USE_TIS_SUPPORT */
+#endif /* WIN32 */
+#endif /* SVR4 */
+#endif /* CTHREADS */
+typedef xcondition_rec *xcondition_t;
+typedef xmutex_rec *xmutex_t;
+#ifndef xcondition_malloc
+#define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))
+#endif
+#ifndef xcondition_free
+#define xcondition_free(c) xfree((char *)c)
+#endif
+#ifndef xmutex_malloc
+#define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))
+#endif
+#ifndef xmutex_free
+#define xmutex_free(m) xfree((char *)m)
+#endif
+#ifndef xthread_have_id
+#define xthread_have_id(id) id
+#endif
+#ifndef xthread_clear_id
+#define xthread_clear_id(id) id = 0
+#endif
+#ifndef xthread_equal
+#define xthread_equal(id1,id2) ((id1) == (id2))
+#endif
+/* aids understood by some debuggers */
+#ifndef xthread_set_name
+#define xthread_set_name(t,str)
+#endif
+#ifndef xmutex_set_name
+#define xmutex_set_name(m,str)
+#endif
+#ifndef xcondition_set_name
+#define xcondition_set_name(cv,str)
+#endif
+
+#endif /* _XTHREADS_H_ */
diff --git a/X11/Xw32defs.h b/X11/Xw32defs.h
new file mode 100644
index 000000000..f65b265bf
--- /dev/null
+++ b/X11/Xw32defs.h
@@ -0,0 +1,81 @@
+/* $Xorg: Xw32defs.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+
+#ifndef _XW32DEFS_H
+#define _XW32DEFS_H
+
+#ifdef __GNUC__ /* mingw is more close to unix than msvc */
+#if !defined(__daddr_t_defined)
+typedef char *caddr_t;
+#endif
+#define lstat stat
+
+#else
+typedef char *caddr_t;
+
+#define access _access
+#define alloca _alloca
+#define chdir _chdir
+#define chmod _chmod
+#define close _close
+#define creat _creat
+#define dup _dup
+#define dup2 _dup2
+#define environ _environ
+#define execl _execl
+#define execle _execle
+#define execlp _execlp
+#define execlpe _execlpe
+#define execv _execv
+#define execve _execve
+#define execvp _execvp
+#define execvpe _execvpe
+#define fdopen _fdopen
+#define fileno _fileno
+#define fstat _fstat
+#define getcwd _getcwd
+#define getpid _getpid
+#define hypot _hypot
+#define isascii __isascii
+#define isatty _isatty
+#define lseek _lseek
+#define mkdir _mkdir
+#define mktemp _mktemp
+#define open _open
+#define putenv _putenv
+#define read _read
+#define rmdir _rmdir
+#define sleep(x) Sleep((x) * 1000)
+#define stat _stat
+#define sys_errlist _sys_errlist
+#define sys_nerr _sys_nerr
+#define umask _umask
+#define unlink _unlink
+#define write _write
+#define random rand
+#define srandom srand
+
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDWR
+#define O_APPEND _O_APPEND
+#define O_CREAT _O_CREAT
+#define O_TRUNC _O_TRUNC
+#define O_EXCL _O_EXCL
+#define O_TEXT _O_TEXT
+#define O_BINARY _O_BINARY
+#define O_RAW _O_BINARY
+
+#define S_IFMT _S_IFMT
+#define S_IFDIR _S_IFDIR
+#define S_IFCHR _S_IFCHR
+#define S_IFREG _S_IFREG
+#define S_IREAD _S_IREAD
+#define S_IWRITE _S_IWRITE
+#define S_IEXEC _S_IEXEC
+
+#define F_OK 0
+#define X_OK 1
+#define W_OK 2
+#define R_OK 4
+#endif /* __GNUC__ */
+#endif
diff --git a/X11/Xwindows.h b/X11/Xwindows.h
new file mode 100644
index 000000000..83649522c
--- /dev/null
+++ b/X11/Xwindows.h
@@ -0,0 +1,80 @@
+/* $Xorg$ */
+/*
+
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
+ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+The Open Group.
+
+*/
+
+/*
+ * This header file has for sole purpose to allow to include windows.h
+ * without getting any name conflicts with our code.
+ * Conflicts come from the fact that including windows.h actually pulls
+ * in the whole Windows API...
+ */
+
+#undef _XFree86Server
+#ifdef XFree86Server
+#define _XFree86Server
+#undef XFree86Server
+#endif
+
+#define BOOL wBOOL
+#define INT32 wINT32
+#undef Status
+#define Status wStatus
+#define ATOM wATOM
+#define BYTE wBYTE
+#define FreeResource wFreeResource
+#include <windows.h>
+#undef Status
+#define Status int
+#undef BYTE
+#undef BOOL
+#undef INT32
+#undef ATOM
+#undef FreeResource
+#undef CreateWindowA
+#undef min
+#undef max
+
+#ifdef RESOURCE_H
+#undef RT_FONT
+#undef RT_CURSOR
+#define RT_FONT ((RESTYPE)4)
+#define RT_CURSOR ((RESTYPE)5)
+#endif
+
+#define sleep(x) Sleep((x) * 1000)
+
+#if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)
+#undef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+#ifdef _XFree86Server
+#define XFree86Server
+#undef _XFree86Server
+#endif
+
diff --git a/X11/Xwinsock.h b/X11/Xwinsock.h
new file mode 100644
index 000000000..5cf062fbf
--- /dev/null
+++ b/X11/Xwinsock.h
@@ -0,0 +1,66 @@
+/* $Xorg: Xwinsock.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+/*
+
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
+ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+The Open Group.
+
+*/
+
+/*
+ * This header file has for sole purpose to allow to include winsock.h
+ * without getting any name conflicts with our code.
+ * Conflicts come from the fact that including winsock.h actually pulls
+ * in the whole Windows API...
+ */
+
+#undef _XFree86Server
+#ifdef XFree86Server
+#define _XFree86Server
+#undef XFree86Server
+#endif
+
+#define BOOL wBOOL
+#define INT32 wINT32
+#undef Status
+#define Status wStatus
+#define ATOM wATOM
+#define BYTE wBYTE
+#define FreeResource wFreeResource
+#include <winsock2.h>
+#undef Status
+#define Status int
+#undef BYTE
+#undef BOOL
+#undef INT32
+#undef ATOM
+#undef FreeResource
+#undef CreateWindowA
+#undef RT_FONT
+#undef RT_CURSOR
+
+#ifdef _XFree86Server
+#define XFree86Server
+#undef _XFree86Server
+#endif
+
diff --git a/X11/aclocal.m4 b/X11/aclocal.m4
new file mode 100644
index 000000000..9215717de
--- /dev/null
+++ b/X11/aclocal.m4
@@ -0,0 +1,930 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.10.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 13
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
+# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+
+AC_DEFUN([XORG_RELEASE_VERSION],[
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+ [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+ [Major version of this package])
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+ [$PVM],
+ [Minor version of this package])
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+ [$PVP],
+ [Patch version of this package])
+])
+
diff --git a/X11/ap_keysym.h b/X11/ap_keysym.h
new file mode 100644
index 000000000..9a1197117
--- /dev/null
+++ b/X11/ap_keysym.h
@@ -0,0 +1,51 @@
+/******************************************************************
+Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
+Copyright 1989 by Hewlett-Packard Company.
+
+ All Rights Reserved
+
+Permission to use, duplicate, change, and distribute this software and
+its documentation for any purpose and without fee is granted, provided
+that the above copyright notice appear in such copy and that this
+copyright notice appear in all supporting documentation, and that the
+names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
+Consortium not be used in advertising or publicity pertaining to
+distribution of the software without written prior permission.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+******************************************************************/
+
+#define apXK_LineDel 0x1000FF00
+#define apXK_CharDel 0x1000FF01
+#define apXK_Copy 0x1000FF02
+#define apXK_Cut 0x1000FF03
+#define apXK_Paste 0x1000FF04
+#define apXK_Move 0x1000FF05
+#define apXK_Grow 0x1000FF06
+#define apXK_Cmd 0x1000FF07
+#define apXK_Shell 0x1000FF08
+#define apXK_LeftBar 0x1000FF09
+#define apXK_RightBar 0x1000FF0A
+#define apXK_LeftBox 0x1000FF0B
+#define apXK_RightBox 0x1000FF0C
+#define apXK_UpBox 0x1000FF0D
+#define apXK_DownBox 0x1000FF0E
+#define apXK_Pop 0x1000FF0F
+#define apXK_Read 0x1000FF10
+#define apXK_Edit 0x1000FF11
+#define apXK_Save 0x1000FF12
+#define apXK_Exit 0x1000FF13
+#define apXK_Repeat 0x1000FF14
+
+#define apXK_KP_parenleft 0x1000FFA8
+#define apXK_KP_parenright 0x1000FFA9
diff --git a/X11/autogen.sh b/X11/autogen.sh
new file mode 100644
index 000000000..904cd6746
--- /dev/null
+++ b/X11/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/X11/config.guess b/X11/config.guess
new file mode 100644
index 000000000..396482d6c
--- /dev/null
+++ b/X11/config.guess
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-07-02'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[3456]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[3456]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/X11/config.sub b/X11/config.sub
new file mode 100644
index 000000000..fab0aa355
--- /dev/null
+++ b/X11/config.sub
@@ -0,0 +1,1616 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-09-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/X11/configure b/X11/configure
new file mode 100644
index 000000000..765a8a7e7
--- /dev/null
+++ b/X11/configure
@@ -0,0 +1,6044 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for Xproto 7.0.14.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='Xproto'
+PACKAGE_TARNAME='xproto'
+PACKAGE_VERSION='7.0.14'
+PACKAGE_STRING='Xproto 7.0.14'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+CPP
+GREP
+EGREP
+USE_FDS_BITS
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Xproto 7.0.14 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/xproto]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Xproto 7.0.14:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-function-prototypes
+ force function prototypes (default: auto)
+ --enable-varargs-prototypes
+ varargs prototypes are supported (default: auto)
+ --enable-const-prototypes
+ const is supported (default: auto)
+ --enable-nested-prototypes
+ nested prototypes are supported (default: auto)
+ --enable-wide-prototypes
+ widen function prototypes (default: auto)
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+Xproto configure 7.0.14
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Xproto $as_me 7.0.14, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.10'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xproto'
+ VERSION='7.0.14'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers do-not-use-config.h"
+
+ac_config_headers="$ac_config_headers Xfuncproto.h"
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+# Check for enable/disable options
+# Check whether --enable-function-prototypes was given.
+if test "${enable_function_prototypes+set}" = set; then
+ enableval=$enable_function_prototypes; FUNCPROTO=$enableval
+else
+ FUNCPROTO=auto
+fi
+
+# Check whether --enable-varargs-prototypes was given.
+if test "${enable_varargs_prototypes+set}" = set; then
+ enableval=$enable_varargs_prototypes; VAPROTO=$enableval
+else
+ VAPROTO=auto
+fi
+
+# Check whether --enable-const-prototypes was given.
+if test "${enable_const_prototypes+set}" = set; then
+ enableval=$enable_const_prototypes; CONSTPROTO=$enableval
+else
+ CONSTPROTO=auto
+fi
+
+# Check whether --enable-nested-prototypes was given.
+if test "${enable_nested_prototypes+set}" = set; then
+ enableval=$enable_nested_prototypes; NESTEDPROTO=$enableval
+else
+ NESTEDPROTO=auto
+fi
+
+# Check whether --enable-wide-prototypes was given.
+if test "${enable_wide_prototypes+set}" = set; then
+ enableval=$enable_wide_prototypes; WIDEPROTO=$enableval
+else
+ WIDEPROTO=auto
+fi
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in sys/select.h sys/param.h sys/types.h sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Handle Xpoll.h.in
+# Avoid determining fds_bits on WIN32 hosts (not including cygwin)
+case $host_os in
+ mingw*) fds_bits_found=true;;
+ *) fds_bits_found=false;;
+esac
+
+if test "x$fds_bits_found" = xfalse ; then
+ { echo "$as_me:$LINENO: checking for fd_set.fds_bits" >&5
+echo $ECHO_N "checking for fd_set.fds_bits... $ECHO_C" >&6; }
+if test "${ac_cv_member_fd_set_fds_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+
+
+int
+main ()
+{
+static fd_set ac_aggr;
+if (ac_aggr.fds_bits)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_fd_set_fds_bits=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+
+
+int
+main ()
+{
+static fd_set ac_aggr;
+if (sizeof ac_aggr.fds_bits)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_fd_set_fds_bits=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_fd_set_fds_bits=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_fd_set_fds_bits" >&5
+echo "${ECHO_T}$ac_cv_member_fd_set_fds_bits" >&6; }
+if test $ac_cv_member_fd_set_fds_bits = yes; then
+
+ fds_bits_found=plain
+ USE_FDS_BITS="fds_bits"
+
+fi
+
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ { echo "$as_me:$LINENO: checking for fd_set.__fds_bits" >&5
+echo $ECHO_N "checking for fd_set.__fds_bits... $ECHO_C" >&6; }
+if test "${ac_cv_member_fd_set___fds_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+
+
+int
+main ()
+{
+static fd_set ac_aggr;
+if (ac_aggr.__fds_bits)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_fd_set___fds_bits=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+
+
+int
+main ()
+{
+static fd_set ac_aggr;
+if (sizeof ac_aggr.__fds_bits)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_fd_set___fds_bits=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_fd_set___fds_bits=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_fd_set___fds_bits" >&5
+echo "${ECHO_T}$ac_cv_member_fd_set___fds_bits" >&6; }
+if test $ac_cv_member_fd_set___fds_bits = yes; then
+
+ fds_bits_found=underscores
+ USE_FDS_BITS="__fds_bits"
+
+fi
+
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ { { echo "$as_me:$LINENO: error: Could not determine how to access the fds_bits or equivalent
+ structure in fd_set on your platform." >&5
+echo "$as_me: error: Could not determine how to access the fds_bits or equivalent
+ structure in fd_set on your platform." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+# Handle Xfuncproto.h
+{ echo "$as_me:$LINENO: checking whether const prototypes are supported" >&5
+echo $ECHO_N "checking whether const prototypes are supported... $ECHO_C" >&6; }
+if test "x$CONSTPROTO" = xauto; then
+ case $host_os in
+ linux*) CONSTPROTO=yes ;;
+ freebsd*) CONSTPROTO=yes ;;
+ netbsd*) CONSTPROTO=yes ;;
+ openbsd*) CONSTPROTO=yes ;;
+ solaris*) CONSTPROTO=yes ;;
+ *) CONSTPROTO=no ;;
+ esac
+fi
+{ echo "$as_me:$LINENO: result: $CONSTPROTO" >&5
+echo "${ECHO_T}$CONSTPROTO" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether varargs prototypes are supported" >&5
+echo $ECHO_N "checking whether varargs prototypes are supported... $ECHO_C" >&6; }
+if test "x$VAPROTO" = xauto; then
+ case $host_os in
+ linux*) VAPROTO=yes ;;
+ freebsd*) VAPROTO=yes ;;
+ netbsd*) VAPROTO=yes ;;
+ openbsd*) VAPROTO=yes ;;
+ solaris*) VAPROTO=yes ;;
+ *) VAPROTO=no ;;
+ esac
+fi
+{ echo "$as_me:$LINENO: result: $VAPROTO" >&5
+echo "${ECHO_T}$VAPROTO" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether nested prototypes are supported" >&5
+echo $ECHO_N "checking whether nested prototypes are supported... $ECHO_C" >&6; }
+if test "x$NESTEDPROTO" = xauto; then
+ case $host_os in
+ linux*) NESTEDPROTO=yes ;;
+ freebsd*) NESTEDPROTO=yes ;;
+ netbsd*) NESTEDPROTO=yes ;;
+ openbsd*) NESTEDPROTO=yes ;;
+ solaris*) NESTEDPROTO=yes ;;
+ *) NESTEDPROTO=no ;;
+ esac
+fi
+{ echo "$as_me:$LINENO: result: $NESTEDPROTO" >&5
+echo "${ECHO_T}$NESTEDPROTO" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to force function prototypes" >&5
+echo $ECHO_N "checking whether to force function prototypes... $ECHO_C" >&6; }
+if test "x$FUNCPROTO" = xauto; then
+ case $host_os in
+ linux*) FUNCPROTO=yes ;;
+ freebsd*) FUNCPROTO=yes ;;
+ netbsd*) FUNCPROTO=yes ;;
+ openbsd*) FUNCPROTO=yes ;;
+ *)
+ if test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ FUNCPROTO=yes
+ else
+ FUNCPROTO=no
+ fi
+ ;;
+ esac
+fi
+{ echo "$as_me:$LINENO: result: $FUNCPROTO" >&5
+echo "${ECHO_T}$FUNCPROTO" >&6; }
+
+# Logic for this was taken from Imake.tmpl
+if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 15
+_ACEOF
+
+else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 11
+_ACEOF
+
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 9
+_ACEOF
+
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 7
+_ACEOF
+
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 5
+_ACEOF
+
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO 3
+_ACEOF
+
+ else
+ if test "x$FUNCPROTO" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FUNCPROTO
+_ACEOF
+
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+{ echo "$as_me:$LINENO: checking whether to widen function prototypes" >&5
+echo $ECHO_N "checking whether to widen function prototypes... $ECHO_C" >&6; }
+if test "x$WIDEPROTO" = xauto; then
+ case $host_os in
+ linux*) WIDEPROTO=no ;;
+ freebsd*) WIDEPROTO=no ;;
+ netbsd*) WIDEPROTO=no ;;
+ openbsd*) WIDEPROTO=no ;;
+ *) WIDEPROTO=yes ;;
+ esac
+fi
+{ echo "$as_me:$LINENO: result: $WIDEPROTO" >&5
+echo "${ECHO_T}$WIDEPROTO" >&6; }
+
+if test "x$WIDEPROTO" = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NARROWPROTO
+_ACEOF
+
+fi
+
+
+
+# Check whether --with-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval=$with_release_version; RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi
+
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+ac_config_files="$ac_config_files Makefile Xpoll.h xproto.pc"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by Xproto $as_me 7.0.14, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Xproto config.status 7.0.14
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS do-not-use-config.h" ;;
+ "Xfuncproto.h") CONFIG_HEADERS="$CONFIG_HEADERS Xfuncproto.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "Xpoll.h") CONFIG_FILES="$CONFIG_FILES Xpoll.h" ;;
+ "xproto.pc") CONFIG_FILES="$CONFIG_FILES xproto.pc" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+USE_FDS_BITS!$USE_FDS_BITS$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/X11/configure.ac b/X11/configure.ac
new file mode 100644
index 000000000..5bcf3eff0
--- /dev/null
+++ b/X11/configure.ac
@@ -0,0 +1,203 @@
+AC_PREREQ([2.57])
+AC_INIT([Xproto], [7.0.14], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+AC_CONFIG_HEADER([do-not-use-config.h])
+AC_CONFIG_HEADER([Xfuncproto.h])
+
+AC_CANONICAL_HOST
+
+m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
+
+# Check for enable/disable options
+AC_ARG_ENABLE(function-prototypes,
+ AS_HELP_STRING([--enable-function-prototypes],
+ [force function prototypes (default: auto)]),
+ [FUNCPROTO=$enableval], [FUNCPROTO=auto])
+AC_ARG_ENABLE(varargs-prototypes,
+ AS_HELP_STRING([--enable-varargs-prototypes],
+ [varargs prototypes are supported (default: auto)]),
+ [VAPROTO=$enableval], [VAPROTO=auto])
+AC_ARG_ENABLE(const-prototypes,
+ AS_HELP_STRING([--enable-const-prototypes],
+ [const is supported (default: auto)]),
+ [CONSTPROTO=$enableval], [CONSTPROTO=auto])
+AC_ARG_ENABLE(nested-prototypes,
+ AS_HELP_STRING([--enable-nested-prototypes],
+ [nested prototypes are supported (default: auto)]),
+ [NESTEDPROTO=$enableval], [NESTEDPROTO=auto])
+AC_ARG_ENABLE(wide-prototypes,
+ AS_HELP_STRING([--enable-wide-prototypes],
+ [widen function prototypes (default: auto)]),
+ [WIDEPROTO=$enableval], [WIDEPROTO=auto])
+
+
+AC_CHECK_HEADERS([sys/select.h sys/param.h sys/types.h sys/time.h])
+
+# Handle Xpoll.h.in
+# Avoid determining fds_bits on WIN32 hosts (not including cygwin)
+case $host_os in
+ mingw*) fds_bits_found=true;;
+ *) fds_bits_found=false;;
+esac
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.fds_bits,
+ [
+ fds_bits_found=plain
+ USE_FDS_BITS="fds_bits"
+ ],,
+ [
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+ ])
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.__fds_bits,
+ [
+ fds_bits_found=underscores
+ USE_FDS_BITS="__fds_bits"
+ ],,
+ [
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+ ])
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_MSG_ERROR([Could not determine how to access the fds_bits or equivalent
+ structure in fd_set on your platform.])
+fi
+
+AC_SUBST([USE_FDS_BITS])
+
+
+# Handle Xfuncproto.h
+AC_MSG_CHECKING([whether const prototypes are supported])
+if test "x$CONSTPROTO" = xauto; then
+ case $host_os in
+ linux*) CONSTPROTO=yes ;;
+ freebsd*) CONSTPROTO=yes ;;
+ netbsd*) CONSTPROTO=yes ;;
+ openbsd*) CONSTPROTO=yes ;;
+ solaris*) CONSTPROTO=yes ;;
+ *) CONSTPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$CONSTPROTO])
+
+AC_MSG_CHECKING([whether varargs prototypes are supported])
+if test "x$VAPROTO" = xauto; then
+ case $host_os in
+ linux*) VAPROTO=yes ;;
+ freebsd*) VAPROTO=yes ;;
+ netbsd*) VAPROTO=yes ;;
+ openbsd*) VAPROTO=yes ;;
+ solaris*) VAPROTO=yes ;;
+ *) VAPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$VAPROTO])
+
+AC_MSG_CHECKING([whether nested prototypes are supported])
+if test "x$NESTEDPROTO" = xauto; then
+ case $host_os in
+ linux*) NESTEDPROTO=yes ;;
+ freebsd*) NESTEDPROTO=yes ;;
+ netbsd*) NESTEDPROTO=yes ;;
+ openbsd*) NESTEDPROTO=yes ;;
+ solaris*) NESTEDPROTO=yes ;;
+ *) NESTEDPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$NESTEDPROTO])
+
+AC_MSG_CHECKING([whether to force function prototypes])
+if test "x$FUNCPROTO" = xauto; then
+ case $host_os in
+ linux*) FUNCPROTO=yes ;;
+ freebsd*) FUNCPROTO=yes ;;
+ netbsd*) FUNCPROTO=yes ;;
+ openbsd*) FUNCPROTO=yes ;;
+ *)
+ if test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ FUNCPROTO=yes
+ else
+ FUNCPROTO=no
+ fi
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$FUNCPROTO])
+
+# Logic for this was taken from Imake.tmpl
+if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [15], [FUNCPROTO])
+else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [11], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [9], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [7], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [5], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [3], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [], [FUNCPROTO])
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+AC_MSG_CHECKING([whether to widen function prototypes])
+if test "x$WIDEPROTO" = xauto; then
+ case $host_os in
+ linux*) WIDEPROTO=no ;;
+ freebsd*) WIDEPROTO=no ;;
+ netbsd*) WIDEPROTO=no ;;
+ openbsd*) WIDEPROTO=no ;;
+ *) WIDEPROTO=yes ;;
+ esac
+fi
+AC_MSG_RESULT([$WIDEPROTO])
+
+if test "x$WIDEPROTO" = xno; then
+ AC_DEFINE(NARROWPROTO, [], [Narrow prototypes])
+fi
+
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile
+ Xpoll.h
+ xproto.pc])
diff --git a/X11/do-not-use-config.h.in b/X11/do-not-use-config.h.in
new file mode 100644
index 000000000..4c3523491
--- /dev/null
+++ b/X11/do-not-use-config.h.in
@@ -0,0 +1,76 @@
+/* do-not-use-config.h.in. Generated from configure.ac by autoheader. */
+
+/* FUNCPROTO */
+#undef FUNCPROTO
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Narrow prototypes */
+#undef NARROWPROTO
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/X11/extensions/AUTHORS b/X11/extensions/AUTHORS
new file mode 100644
index 000000000..78b329f13
--- /dev/null
+++ b/X11/extensions/AUTHORS
@@ -0,0 +1,2 @@
+Keith Packard, HP
+Eric Anholt, Intel
diff --git a/X11/extensions/COPYING b/X11/extensions/COPYING
new file mode 100644
index 000000000..a32b353d6
--- /dev/null
+++ b/X11/extensions/COPYING
@@ -0,0 +1,179 @@
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+Copyright 1992 Network Computing Devices
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of NCD. not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission. NCD. makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+
+NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+Copyright (c) 1994, 1995 Hewlett-Packard Company
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the Hewlett-Packard
+Company shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the Hewlett-Packard Company.
+
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+
+Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name Network Computing Devices, Inc. not be
+used in advertising or publicity pertaining to distribution of this
+software without specific, written prior permission.
+
+THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
+DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
+LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
+COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
+SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
+DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
+REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+
+Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Hewlett-Packard not be used in
+advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+Hewlett-Packard makes no representations about the
+suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
diff --git a/X11/extensions/ChangeLog b/X11/extensions/ChangeLog
new file mode 100644
index 000000000..d6b7bcfb1
--- /dev/null
+++ b/X11/extensions/ChangeLog
@@ -0,0 +1,185 @@
+commit db08133016b421ef12c65db9c4a2819078f01b06
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Wed May 28 17:18:14 2008 +0930
+
+ Bump to 7.0.3.
+
+commit 801650f0d15b4497c63d056559ad98a8ca82f271
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Mon May 12 17:26:02 2008 +0930
+
+ Xge: replace copyrights with standard format from xserver COPYING.
+
+commit 9dc48efe2b3136756613ae00afd706f9a52d6f10
+Merge: 69356e4... a07a30f...
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Mon May 12 17:22:14 2008 +0930
+
+ Merge branch 'master' into xge
+
+commit a07a30f9922e9768e2cf00cc2e479978242c58a8
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 6 16:39:10 2007 -0500
+
+ Replace static ChangeLog with dist-hook to generate from git log
+
+commit 087c2ccc7e348e530422a578059173c959aa5a78
+Author: James Cloos <cloos@jhcloos.com>
+Date: Mon Sep 3 05:54:25 2007 -0400
+
+ Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 69356e4165f11f3ed4b377d29df038549191a91e
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date: Thu May 17 19:40:15 2007 +0930
+
+ Add XGE header files and protocol description.
+
+commit 88c24404b44def76a56f52a216a8cf2e0991c3e6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri Jul 14 18:56:41 2006 -0700
+
+ renamed: .cvsignore -> .gitignore
+
+commit a63b4a9d7ebc5929ce9172b10743396cd36addb8
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jun 27 16:25:22 2006 +0000
+
+ Remove Xserver API for appgroup extension [Will break Xorg server builds
+ prior to 2006-06-21 / git commit
+ 77c947b900faf34f425eef1549d8210c475e093b]
+
+commit 7bcd3400a8043dee6399680ddc6592747b30f599
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Jun 21 21:20:22 2006 +0000
+
+ Remove Xserver API for security extension (#ifdef _SECURITY_SERVER) [Will
+ break Xorg server builds prior to 2006-06-20 / git commit
+ d44b2a0a57fb89741173c31676af0ccc822387dc]
+
+commit cb67dc36362b018f3a9faa5c4558ce99dbfb2334
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:39 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit 9f8dd222022cfafe3ca6467e02232af7d4d7934b
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:48:15 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit cba4432f0d088517f2475881e93cf4dda96a7f94
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Tue Aug 2 19:19:40 2005 +0000
+
+ Add basic .cvsignore files for proto modules.
+
+commit 790de7da644c6f9114a715b99789253a9c79b0a5
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:57 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit cf67142f46ec2f754f2b3347b21139b66b7167cf
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Fri Jun 10 04:01:14 2005 +0000
+
+ Bug #2799: Input shape. (Keith Packard)
+
+commit b855e49cf845cf814fa1d8a9abcd65cb14356644
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:22:40 2005 +0000
+
+ revert last change, didn't do right thing at all, sorry for the noise
+
+commit 1e1659043f908d2e648d0ee73f7f33f5fc79813b
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:10:19 2005 +0000
+
+ Require automake 1.7 in AM_INIT_AUTOMAKE
+
+commit 1d316d39381cf0981b2f9687cd2f0200c92961ea
+Author: Josh Triplett <josh@speakeasy.net>
+Date: Wed May 18 08:09:13 2005 +0000
+
+ Add COPYING file for XExt. Note that there are several similar but
+ subtly-different licenses included; in particular, there are some
+ copyright holders with multiple slightly-different licenses included.
+
+commit f3c7759e6dc671ab6db160e739d00133e9996296
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Mon May 9 18:20:06 2005 +0000
+
+ Change all the protonames from <extension>Ext to <extension>Proto.
+
+commit 474a31667a8addb29a0f115790df2910400c4081
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri May 6 01:46:32 2005 +0000
+
+ Initial build system files for proto module.
+
+commit be09530f849ec00001fc0575816030b7a5dde05c
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date: Tue Dec 7 23:37:37 2004 +0000
+
+ //bugs.freedesktop.org/show_bug.cgi?id=830): Get DPMS header file
+ (include/extensions/dpms.h) working with C++ applications. Patch by
+ Kevin DeKorte <kdekorte@yahoo.com> and Roland Mainz
+ <roland.mainz@nrubsig.org>.
+
+commit da24110547ed45c08d707dbffb2972f043dbc1b1
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 18:43:06 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit 8fc2a0fd8ac1b777a35b01d65934ee100b304d20
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:31:36 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit e7af2a9e4c47a46b3a68a2efebb171dc7872c341
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:10:54 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit abb02cac08ca1d7d3a64b361df5d1be6f15c6440
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:35:14 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit c9d6200d559e57f4ca67291213cd282c7437c3c7
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:22:28 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 023a09fe640f876478157e5b4cd9cfec1452da4b
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:28:02 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 343e78e15048e6a25791449bfc7566c07ccddf28
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:43 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit 9a41c9c6452753ac1911a585e59982e8e5186c6b
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 15:54:35 2003 +0000
+
+ R6.6 is the Xorg base-line
diff --git a/X11/extensions/INSTALL b/X11/extensions/INSTALL
new file mode 100644
index 000000000..05868b6d6
--- /dev/null
+++ b/X11/extensions/INSTALL
@@ -0,0 +1,8 @@
+Damage is built with the traditional configure script:
+
+ $ ./configure --prefix=/usr/X11R6
+
+This should generate valid Makefiles, then:
+
+ $ make
+ $ make install
diff --git a/X11/extensions/MITMisc.h b/X11/extensions/MITMisc.h
new file mode 100644
index 000000000..975700e01
--- /dev/null
+++ b/X11/extensions/MITMisc.h
@@ -0,0 +1,66 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+
+#ifndef _XMITMISC_H_
+#define _XMITMISC_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_MITSetBugMode 0
+#define X_MITGetBugMode 1
+
+#define MITMiscNumberEvents 0
+
+#define MITMiscNumberErrors 0
+
+#ifndef _MITMISC_SERVER_
+
+_XFUNCPROTOBEGIN
+
+Bool XMITMiscQueryExtension(
+ Display* /* dpy */,
+ int* /* event_basep */,
+ int* /* error_basep */
+);
+
+Status XMITMiscSetBugMode(
+ Display* /* dpy */,
+ Bool /* onOff */
+);
+
+Bool XMITMiscGetBugMode(
+ Display* /* dpy */
+);
+
+_XFUNCPROTOEND
+
+#endif
+
+#endif
diff --git a/X11/extensions/Makefile.am b/X11/extensions/Makefile.am
new file mode 100644
index 000000000..fe47e2578
--- /dev/null
+++ b/X11/extensions/Makefile.am
@@ -0,0 +1,55 @@
+xextdir = $(includedir)/X11/extensions
+xext_HEADERS = \
+ dpms.h \
+ dpmsstr.h \
+ extutil.h \
+ ge.h \
+ geproto.h \
+ Xge.h \
+ lbxbuf.h \
+ lbxbufstr.h \
+ lbxdeltastr.h \
+ lbximage.h \
+ lbxopts.h \
+ lbxstr.h \
+ lbxzlib.h \
+ MITMisc.h \
+ mitmiscstr.h \
+ multibuf.h \
+ multibufst.h \
+ security.h \
+ securstr.h \
+ shape.h \
+ shapestr.h \
+ shmstr.h \
+ sync.h \
+ syncstr.h \
+ Xag.h \
+ Xagstr.h \
+ Xcup.h \
+ Xcupstr.h \
+ Xdbe.h \
+ Xdbeproto.h \
+ XEVI.h \
+ XEVIstr.h \
+ Xext.h \
+ XLbx.h \
+ XShm.h \
+ xtestext1.h \
+ XTest.h \
+ xteststr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xextproto.pc
+
+EXTRA_DIST = autogen.sh xextproto.pc.in
+
+EXTRA_DIST += ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
diff --git a/X11/extensions/Makefile.in b/X11/extensions/Makefile.in
new file mode 100644
index 000000000..d3029ac0b
--- /dev/null
+++ b/X11/extensions/Makefile.in
@@ -0,0 +1,530 @@
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/xextproto.pc.in \
+ $(top_srcdir)/configure $(xext_HEADERS) COPYING ChangeLog \
+ install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = xextproto.pc
+SOURCES =
+DIST_SOURCES =
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xextdir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+xextHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(xext_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+xextdir = $(includedir)/X11/extensions
+xext_HEADERS = \
+ dpms.h \
+ dpmsstr.h \
+ extutil.h \
+ ge.h \
+ geproto.h \
+ Xge.h \
+ lbxbuf.h \
+ lbxbufstr.h \
+ lbxdeltastr.h \
+ lbximage.h \
+ lbxopts.h \
+ lbxstr.h \
+ lbxzlib.h \
+ MITMisc.h \
+ mitmiscstr.h \
+ multibuf.h \
+ multibufst.h \
+ security.h \
+ securstr.h \
+ shape.h \
+ shapestr.h \
+ shmstr.h \
+ sync.h \
+ syncstr.h \
+ Xag.h \
+ Xagstr.h \
+ Xcup.h \
+ Xcupstr.h \
+ Xdbe.h \
+ Xdbeproto.h \
+ XEVI.h \
+ XEVIstr.h \
+ Xext.h \
+ XLbx.h \
+ XShm.h \
+ xtestext1.h \
+ XTest.h \
+ xteststr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xextproto.pc
+EXTRA_DIST = autogen.sh xextproto.pc.in ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+all: all-am
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+xextproto.pc: $(top_builddir)/config.status $(srcdir)/xextproto.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-xextHEADERS: $(xext_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xextdir)" || $(mkdir_p) "$(DESTDIR)$(xextdir)"
+ @list='$(xext_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(xextHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xextdir)/$$f'"; \
+ $(xextHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xextdir)/$$f"; \
+ done
+
+uninstall-xextHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xext_HEADERS)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f '$(DESTDIR)$(xextdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(xextdir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/.
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xextdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgconfigDATA install-xextHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkgconfigDATA \
+ uninstall-xextHEADERS
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-pkgconfigDATA install-strip install-xextHEADERS \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \
+ uninstall-pkgconfigDATA uninstall-xextHEADERS
+
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/X11/extensions/NEWS b/X11/extensions/NEWS
new file mode 100644
index 000000000..29b8edd86
--- /dev/null
+++ b/X11/extensions/NEWS
@@ -0,0 +1,2 @@
+2004-01-05: Version 1.0 released.
+2007-01-09: Version 1.1 released, adding the DamageAdd request. \ No newline at end of file
diff --git a/X11/extensions/README b/X11/extensions/README
new file mode 100644
index 000000000..6f1ad4bfc
--- /dev/null
+++ b/X11/extensions/README
@@ -0,0 +1,10 @@
+ Damage
+ X Damage Extension
+ Version 1.1
+ 2007-01-08
+
+This package contains header files and documentation for the X Damage
+extension. Library and server implementations are separate.
+
+Keith Packard
+keithp@keithp.com
diff --git a/X11/extensions/XEVI.h b/X11/extensions/XEVI.h
new file mode 100644
index 000000000..d8e37ff4f
--- /dev/null
+++ b/X11/extensions/XEVI.h
@@ -0,0 +1,64 @@
+/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+********************************************************/
+/* $XFree86$ */
+
+#ifndef _XEVI_H_
+#define _XEVI_H_
+#include <X11/Xfuncproto.h>
+#define X_EVIQueryVersion 0
+#define X_EVIGetVisualInfo 1
+#define XEVI_TRANSPARENCY_NONE 0
+#define XEVI_TRANSPARENCY_PIXEL 1
+#define XEVI_TRANSPARENCY_MASK 2
+#ifndef _XEVI_SERVER_
+typedef struct {
+ VisualID core_visual_id;
+ int screen;
+ int level;
+ unsigned int transparency_type;
+ unsigned int transparency_value;
+ unsigned int min_hw_colormaps;
+ unsigned int max_hw_colormaps;
+ unsigned int num_colormap_conflicts;
+ VisualID* colormap_conflicts;
+} ExtendedVisualInfo;
+_XFUNCPROTOBEGIN
+Bool XeviQueryExtension(
+ Display* /* dpy */
+);
+Status XeviQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */
+);
+Status XeviGetVisualInfo(
+ Display* /* dpy */,
+ VisualID* /* visual_query */,
+ int /* nVisual_query */,
+ ExtendedVisualInfo** /* extendedVisualInfo_return */,
+ int* /* nInfo_return */
+);
+_XFUNCPROTOEND
+#endif
+#endif
diff --git a/X11/extensions/XEVIstr.h b/X11/extensions/XEVIstr.h
new file mode 100644
index 000000000..388ef4bcf
--- /dev/null
+++ b/X11/extensions/XEVIstr.h
@@ -0,0 +1,98 @@
+/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+********************************************************/
+/* $XFree86$ */
+
+#ifndef _EVISTR_H_
+#define _EVISTR_H_
+
+#include <X11/extensions/XEVI.h>
+
+#define VisualID CARD32
+#define EVINAME "Extended-Visual-Information"
+#define XEVI_MAJOR_VERSION 1 /* current version numbers */
+#define XEVI_MINOR_VERSION 0
+
+typedef CARD32 VisualID32;
+#define sz_VisualID32 4
+
+typedef struct _xExtendedVisualInfo {
+ VisualID core_visual_id B32;
+ INT8 screen;
+ INT8 level;
+ CARD8 transparency_type;
+ CARD8 pad0;
+ CARD32 transparency_value B32;
+ CARD8 min_hw_colormaps;
+ CARD8 max_hw_colormaps;
+ CARD16 num_colormap_conflicts B16;
+} xExtendedVisualInfo;
+#define sz_xExtendedVisualInfo 16
+
+typedef struct _XEVIQueryVersion {
+ CARD8 reqType; /* always XEVIReqCode */
+ CARD8 xeviReqType; /* always X_EVIQueryVersion */
+ CARD16 length B16;
+} xEVIQueryVersionReq;
+#define sz_xEVIQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of EVI protocol */
+ CARD16 minorVersion B16; /* minor version of EVI protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xEVIQueryVersionReply;
+#define sz_xEVIQueryVersionReply 32
+
+typedef struct _XEVIGetVisualInfoReq {
+ CARD8 reqType; /* always XEVIReqCode */
+ CARD8 xeviReqType; /* always X_EVIGetVisualInfo */
+ CARD16 length B16;
+ CARD32 n_visual B32;
+} xEVIGetVisualInfoReq;
+#define sz_xEVIGetVisualInfoReq 8
+
+typedef struct _XEVIGetVisualInfoReply {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 n_info B32;
+ CARD32 n_conflicts B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xEVIGetVisualInfoReply;
+#define sz_xEVIGetVisualInfoReply 32
+
+#undef VisualID
+
+#endif /* _EVISTR_H_ */
diff --git a/X11/extensions/XI.h b/X11/extensions/XI.h
new file mode 100644
index 000000000..51a417514
--- /dev/null
+++ b/X11/extensions/XI.h
@@ -0,0 +1,288 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/* Definitions used by the server, library and client */
+
+#ifndef _XI_H_
+#define _XI_H_
+
+#define sz_xGetExtensionVersionReq 8
+#define sz_xGetExtensionVersionReply 32
+#define sz_xListInputDevicesReq 4
+#define sz_xListInputDevicesReply 32
+#define sz_xOpenDeviceReq 8
+#define sz_xOpenDeviceReply 32
+#define sz_xCloseDeviceReq 8
+#define sz_xSetDeviceModeReq 8
+#define sz_xSetDeviceModeReply 32
+#define sz_xSelectExtensionEventReq 12
+#define sz_xGetSelectedExtensionEventsReq 8
+#define sz_xGetSelectedExtensionEventsReply 32
+#define sz_xChangeDeviceDontPropagateListReq 12
+#define sz_xGetDeviceDontPropagateListReq 8
+#define sz_xGetDeviceDontPropagateListReply 32
+#define sz_xGetDeviceMotionEventsReq 16
+#define sz_xGetDeviceMotionEventsReply 32
+#define sz_xChangeKeyboardDeviceReq 8
+#define sz_xChangeKeyboardDeviceReply 32
+#define sz_xChangePointerDeviceReq 8
+#define sz_xChangePointerDeviceReply 32
+#define sz_xGrabDeviceReq 20
+#define sz_xGrabDeviceReply 32
+#define sz_xUngrabDeviceReq 12
+#define sz_xGrabDeviceKeyReq 20
+#define sz_xGrabDeviceKeyReply 32
+#define sz_xUngrabDeviceKeyReq 16
+#define sz_xGrabDeviceButtonReq 20
+#define sz_xGrabDeviceButtonReply 32
+#define sz_xUngrabDeviceButtonReq 16
+#define sz_xAllowDeviceEventsReq 12
+#define sz_xGetDeviceFocusReq 8
+#define sz_xGetDeviceFocusReply 32
+#define sz_xSetDeviceFocusReq 16
+#define sz_xGetFeedbackControlReq 8
+#define sz_xGetFeedbackControlReply 32
+#define sz_xChangeFeedbackControlReq 12
+#define sz_xGetDeviceKeyMappingReq 8
+#define sz_xGetDeviceKeyMappingReply 32
+#define sz_xChangeDeviceKeyMappingReq 8
+#define sz_xGetDeviceModifierMappingReq 8
+#define sz_xSetDeviceModifierMappingReq 8
+#define sz_xSetDeviceModifierMappingReply 32
+#define sz_xGetDeviceButtonMappingReq 8
+#define sz_xGetDeviceButtonMappingReply 32
+#define sz_xSetDeviceButtonMappingReq 8
+#define sz_xSetDeviceButtonMappingReply 32
+#define sz_xQueryDeviceStateReq 8
+#define sz_xQueryDeviceStateReply 32
+#define sz_xSendExtensionEventReq 16
+#define sz_xDeviceBellReq 8
+#define sz_xSetDeviceValuatorsReq 8
+#define sz_xSetDeviceValuatorsReply 32
+#define sz_xGetDeviceControlReq 8
+#define sz_xGetDeviceControlReply 32
+#define sz_xChangeDeviceControlReq 8
+#define sz_xChangeDeviceControlReply 32
+
+#define INAME "XInputExtension"
+
+#define XI_KEYBOARD "KEYBOARD"
+#define XI_MOUSE "MOUSE"
+#define XI_TABLET "TABLET"
+#define XI_TOUCHSCREEN "TOUCHSCREEN"
+#define XI_TOUCHPAD "TOUCHPAD"
+#define XI_BARCODE "BARCODE"
+#define XI_BUTTONBOX "BUTTONBOX"
+#define XI_KNOB_BOX "KNOB_BOX"
+#define XI_ONE_KNOB "ONE_KNOB"
+#define XI_NINE_KNOB "NINE_KNOB"
+#define XI_TRACKBALL "TRACKBALL"
+#define XI_QUADRATURE "QUADRATURE"
+#define XI_ID_MODULE "ID_MODULE"
+#define XI_SPACEBALL "SPACEBALL"
+#define XI_DATAGLOVE "DATAGLOVE"
+#define XI_EYETRACKER "EYETRACKER"
+#define XI_CURSORKEYS "CURSORKEYS"
+#define XI_FOOTMOUSE "FOOTMOUSE"
+
+#define Dont_Check 0
+#define XInput_Initial_Release 1
+#define XInput_Add_XDeviceBell 2
+#define XInput_Add_XSetDeviceValuators 3
+#define XInput_Add_XChangeDeviceControl 4
+#define XInput_Add_DevicePresenceNotify 5
+
+#define XI_Absent 0
+#define XI_Present 1
+
+#define XI_Initial_Release_Major 1
+#define XI_Initial_Release_Minor 0
+
+#define XI_Add_XDeviceBell_Major 1
+#define XI_Add_XDeviceBell_Minor 1
+
+#define XI_Add_XSetDeviceValuators_Major 1
+#define XI_Add_XSetDeviceValuators_Minor 2
+
+#define XI_Add_XChangeDeviceControl_Major 1
+#define XI_Add_XChangeDeviceControl_Minor 3
+
+#define XI_Add_DevicePresenceNotify_Major 1
+#define XI_Add_DevicePresenceNotify_Minor 4
+
+#define DEVICE_RESOLUTION 1
+#define DEVICE_ABS_CALIB 2
+#define DEVICE_CORE 3
+#define DEVICE_ENABLE 4
+#define DEVICE_ABS_AREA 5
+
+#define NoSuchExtension 1
+
+#define COUNT 0
+#define CREATE 1
+
+#define NewPointer 0
+#define NewKeyboard 1
+
+#define XPOINTER 0
+#define XKEYBOARD 1
+
+#define UseXKeyboard 0xFF
+
+#define IsXPointer 0
+#define IsXKeyboard 1
+#define IsXExtensionDevice 2
+#define IsXExtensionKeyboard 3
+#define IsXExtensionPointer 4
+
+#define AsyncThisDevice 0
+#define SyncThisDevice 1
+#define ReplayThisDevice 2
+#define AsyncOtherDevices 3
+#define AsyncAll 4
+#define SyncAll 5
+
+#define FollowKeyboard 3
+#ifndef RevertToFollowKeyboard
+#define RevertToFollowKeyboard 3
+#endif
+
+#define DvAccelNum (1L << 0)
+#define DvAccelDenom (1L << 1)
+#define DvThreshold (1L << 2)
+
+#define DvKeyClickPercent (1L<<0)
+#define DvPercent (1L<<1)
+#define DvPitch (1L<<2)
+#define DvDuration (1L<<3)
+#define DvLed (1L<<4)
+#define DvLedMode (1L<<5)
+#define DvKey (1L<<6)
+#define DvAutoRepeatMode (1L<<7)
+
+#define DvString (1L << 0)
+
+#define DvInteger (1L << 0)
+
+#define DeviceMode (1L << 0)
+#define Relative 0
+#define Absolute 1
+
+#define ProximityState (1L << 1)
+#define InProximity (0L << 1)
+#define OutOfProximity (1L << 1)
+
+#define AddToList 0
+#define DeleteFromList 1
+
+#define KeyClass 0
+#define ButtonClass 1
+#define ValuatorClass 2
+#define FeedbackClass 3
+#define ProximityClass 4
+#define FocusClass 5
+#define OtherClass 6
+
+#define KbdFeedbackClass 0
+#define PtrFeedbackClass 1
+#define StringFeedbackClass 2
+#define IntegerFeedbackClass 3
+#define LedFeedbackClass 4
+#define BellFeedbackClass 5
+
+#define _devicePointerMotionHint 0
+#define _deviceButton1Motion 1
+#define _deviceButton2Motion 2
+#define _deviceButton3Motion 3
+#define _deviceButton4Motion 4
+#define _deviceButton5Motion 5
+#define _deviceButtonMotion 6
+#define _deviceButtonGrab 7
+#define _deviceOwnerGrabButton 8
+#define _noExtensionEvent 9
+
+#define _devicePresence 0
+
+#define DeviceAdded 0
+#define DeviceRemoved 1
+#define DeviceEnabled 2
+#define DeviceDisabled 3
+#define DeviceUnrecoverable 4
+#define DeviceControlChanged 5
+
+#define XI_BadDevice 0
+#define XI_BadEvent 1
+#define XI_BadMode 2
+#define XI_DeviceBusy 3
+#define XI_BadClass 4
+
+/*
+ * Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
+ * definition of XEventClass since that would be a library interface change.
+ * See the top of X.h for more _XSERVER64 magic.
+ *
+ * But, don't actually use the CARD32 type. We can't get it defined here
+ * without polluting the namespace.
+ */
+#ifdef _XSERVER64
+typedef unsigned int XEventClass;
+#else
+typedef unsigned long XEventClass;
+#endif
+
+/*******************************************************************
+ *
+ * Extension version structure.
+ *
+ */
+
+typedef struct {
+ int present;
+ short major_version;
+ short minor_version;
+} XExtensionVersion;
+
+#endif /* _XI_H_ */
diff --git a/X11/extensions/XInput.h b/X11/extensions/XInput.h
new file mode 100644
index 000000000..e3585b4f9
--- /dev/null
+++ b/X11/extensions/XInput.h
@@ -0,0 +1,1200 @@
+/* $Xorg: XInput.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/include/extensions/XInput.h,v 1.3 2001/12/14 19:53:28 dawes Exp $ */
+
+/* Definitions used by the library and client */
+
+#ifndef _XINPUT_H_
+#define _XINPUT_H_
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XI.h>
+
+#define _deviceKeyPress 0
+#define _deviceKeyRelease 1
+
+#define _deviceButtonPress 0
+#define _deviceButtonRelease 1
+
+#define _deviceMotionNotify 0
+
+#define _deviceFocusIn 0
+#define _deviceFocusOut 1
+
+#define _proximityIn 0
+#define _proximityOut 1
+
+#define _deviceStateNotify 0
+#define _deviceMappingNotify 1
+#define _changeDeviceNotify 2
+
+#define FindTypeAndClass(d,type,_class,classid,offset) \
+ { int _i; XInputClassInfo *_ip; \
+ type = 0; _class = 0; \
+ for (_i=0, _ip= ((XDevice *) d)->classes; \
+ _i< ((XDevice *) d)->num_classes; \
+ _i++, _ip++) \
+ if (_ip->input_class == classid) \
+ {type = _ip->event_type_base + offset; \
+ _class = ((XDevice *) d)->device_id << 8 | type;}}
+
+#define DeviceKeyPress(d,type,_class) \
+ FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress)
+
+#define DeviceKeyRelease(d,type,_class) \
+ FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease)
+
+#define DeviceButtonPress(d,type,_class) \
+ FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress)
+
+#define DeviceButtonRelease(d,type,_class) \
+ FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease)
+
+#define DeviceMotionNotify(d,type,_class) \
+ FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify)
+
+#define DeviceFocusIn(d,type,_class) \
+ FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn)
+
+#define DeviceFocusOut(d,type,_class) \
+ FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut)
+
+#define ProximityIn(d,type,_class) \
+ FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn)
+
+#define ProximityOut(d,type,_class) \
+ FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut)
+
+#define DeviceStateNotify(d,type,_class) \
+ FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify)
+
+#define DeviceMappingNotify(d,type,_class) \
+ FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify)
+
+#define ChangeDeviceNotify(d,type,_class) \
+ FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify)
+
+#define DevicePointerMotionHint(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;}
+
+#define DeviceButton1Motion(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;}
+
+#define DeviceButton2Motion(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;}
+
+#define DeviceButton3Motion(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;}
+
+#define DeviceButton4Motion(d,type, _class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;}
+
+#define DeviceButton5Motion(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;}
+
+#define DeviceButtonMotion(d,type, _class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;}
+
+#define DeviceOwnerGrabButton(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;}
+
+#define DeviceButtonPressGrab(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;}
+
+#define NoExtensionEvent(d,type,_class) \
+ { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
+
+#define DevicePresence(dpy, type, _class) \
+ { \
+ extern int _XiGetDevicePresenceNotifyEvent(Display *); \
+ type = _XiGetDevicePresenceNotifyEvent(dpy); \
+ _class = (0x10000 | _devicePresence); \
+ }
+
+#define BadDevice(dpy,error) _xibaddevice(dpy, &error)
+
+#define BadClass(dpy,error) _xibadclass(dpy, &error)
+
+#define BadEvent(dpy,error) _xibadevent(dpy, &error)
+
+#define BadMode(dpy,error) _xibadmode(dpy, &error)
+
+#define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error)
+
+/***************************************************************
+ *
+ * DeviceKey events. These events are sent by input devices that
+ * support input class Keys.
+ * The location of the X pointer is reported in the coordinate
+ * fields of the x,y and x_root,y_root fields.
+ *
+ */
+
+typedef struct
+ {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ XID deviceid;
+ Window root; /* root window event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* x, y coordinates in event window */
+ int x_root; /* coordinates relative to root */
+ int y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int keycode; /* detail */
+ Bool same_screen; /* same screen flag */
+ unsigned int device_state; /* device key or button mask */
+ unsigned char axes_count;
+ unsigned char first_axis;
+ int axis_data[6];
+ } XDeviceKeyEvent;
+
+typedef XDeviceKeyEvent XDeviceKeyPressedEvent;
+typedef XDeviceKeyEvent XDeviceKeyReleasedEvent;
+
+/*******************************************************************
+ *
+ * DeviceButton events. These events are sent by extension devices
+ * that support input class Buttons.
+ *
+ */
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ XID deviceid;
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* x, y coordinates in event window */
+ int x_root; /* coordinates relative to root */
+ int y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int button; /* detail */
+ Bool same_screen; /* same screen flag */
+ unsigned int device_state; /* device key or button mask */
+ unsigned char axes_count;
+ unsigned char first_axis;
+ int axis_data[6];
+ } XDeviceButtonEvent;
+
+typedef XDeviceButtonEvent XDeviceButtonPressedEvent;
+typedef XDeviceButtonEvent XDeviceButtonReleasedEvent;
+
+/*******************************************************************
+ *
+ * DeviceMotionNotify event. These events are sent by extension devices
+ * that support input class Valuators.
+ *
+ */
+
+typedef struct
+ {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ XID deviceid;
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* x, y coordinates in event window */
+ int x_root; /* coordinates relative to root */
+ int y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ char is_hint; /* detail */
+ Bool same_screen; /* same screen flag */
+ unsigned int device_state; /* device key or button mask */
+ unsigned char axes_count;
+ unsigned char first_axis;
+ int axis_data[6];
+ } XDeviceMotionEvent;
+
+/*******************************************************************
+ *
+ * DeviceFocusChange events. These events are sent when the focus
+ * of an extension device that can be focused is changed.
+ *
+ */
+
+typedef struct
+ {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ XID deviceid;
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonLinear,NotifyNonLinearVirtual, NotifyPointer,
+ * NotifyPointerRoot, NotifyDetailNone
+ */
+ Time time;
+ } XDeviceFocusChangeEvent;
+
+typedef XDeviceFocusChangeEvent XDeviceFocusInEvent;
+typedef XDeviceFocusChangeEvent XDeviceFocusOutEvent;
+
+/*******************************************************************
+ *
+ * ProximityNotify events. These events are sent by those absolute
+ * positioning devices that are capable of generating proximity information.
+ *
+ */
+
+typedef struct
+ {
+ int type; /* ProximityIn or ProximityOut */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ XID deviceid;
+ Window root;
+ Window subwindow;
+ Time time;
+ int x, y;
+ int x_root, y_root;
+ unsigned int state;
+ Bool same_screen;
+ unsigned int device_state; /* device key or button mask */
+ unsigned char axes_count;
+ unsigned char first_axis;
+ int axis_data[6];
+ } XProximityNotifyEvent;
+typedef XProximityNotifyEvent XProximityInEvent;
+typedef XProximityNotifyEvent XProximityOutEvent;
+
+/*******************************************************************
+ *
+ * DeviceStateNotify events are generated on EnterWindow and FocusIn
+ * for those clients who have selected DeviceState.
+ *
+ */
+
+typedef struct
+ {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ } XInputClass;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ XID deviceid;
+ Time time;
+ int num_classes;
+ char data[64];
+} XDeviceStateNotifyEvent;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ unsigned char num_valuators;
+ unsigned char mode;
+ int valuators[6];
+} XValuatorStatus;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ short num_keys;
+ char keys[32];
+} XKeyStatus;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ short num_buttons;
+ char buttons[32];
+} XButtonStatus;
+
+/*******************************************************************
+ *
+ * DeviceMappingNotify event. This event is sent when the key mapping,
+ * modifier mapping, or button mapping of an extension device is changed.
+ *
+ */
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ XID deviceid;
+ Time time;
+ int request; /* one of MappingModifier, MappingKeyboard,
+ MappingPointer */
+ int first_keycode;/* first keycode */
+ int count; /* defines range of change w. first_keycode*/
+} XDeviceMappingEvent;
+
+/*******************************************************************
+ *
+ * ChangeDeviceNotify event. This event is sent when an
+ * XChangeKeyboard or XChangePointer request is made.
+ *
+ */
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ XID deviceid;
+ Time time;
+ int request; /* NewPointer or NewKeyboard */
+} XChangeDeviceNotifyEvent;
+
+/*******************************************************************
+ *
+ * DevicePresenceNotify event. This event is sent when the list of
+ * input devices changes, in which case devchange will be false, and
+ * no information about the change will be contained in the event;
+ * the client should use XListInputDevices() to learn what has changed.
+ *
+ * If devchange is true, an attribute that the server believes is
+ * important has changed on a device, and the client should use
+ * XGetDeviceControl to examine the device. If control is non-zero,
+ * then that control has changed meaningfully.
+ */
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ Time time;
+ Bool devchange;
+ XID deviceid;
+ XID control;
+} XDevicePresenceNotifyEvent;
+
+/*******************************************************************
+ *
+ * Control structures for input devices that support input class
+ * Feedback. These are used by the XGetFeedbackControl and
+ * XChangeFeedbackControl functions.
+ *
+ */
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+} XFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int click;
+ int percent;
+ int pitch;
+ int duration;
+ int led_mask;
+ int global_auto_repeat;
+ char auto_repeats[32];
+} XKbdFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int accelNum;
+ int accelDenom;
+ int threshold;
+} XPtrFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int resolution;
+ int minVal;
+ int maxVal;
+} XIntegerFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int max_symbols;
+ int num_syms_supported;
+ KeySym *syms_supported;
+} XStringFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int percent;
+ int pitch;
+ int duration;
+} XBellFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int led_values;
+ int led_mask;
+} XLedFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+} XFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int accelNum;
+ int accelDenom;
+ int threshold;
+} XPtrFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int click;
+ int percent;
+ int pitch;
+ int duration;
+ int led_mask;
+ int led_value;
+ int key;
+ int auto_repeat_mode;
+} XKbdFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int num_keysyms;
+ KeySym *syms_to_display;
+} XStringFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int int_to_display;
+} XIntegerFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int percent;
+ int pitch;
+ int duration;
+} XBellFeedbackControl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ XID id;
+ int led_mask;
+ int led_values;
+} XLedFeedbackControl;
+
+/*******************************************************************
+ *
+ * Device control structures.
+ *
+ */
+
+typedef struct {
+ XID control;
+ int length;
+} XDeviceControl;
+
+typedef struct {
+ XID control;
+ int length;
+ int first_valuator;
+ int num_valuators;
+ int *resolutions;
+} XDeviceResolutionControl;
+
+typedef struct {
+ XID control;
+ int length;
+ int num_valuators;
+ int *resolutions;
+ int *min_resolutions;
+ int *max_resolutions;
+} XDeviceResolutionState;
+
+typedef struct {
+ XID control;
+ int length;
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int flip_x;
+ int flip_y;
+ int rotation;
+ int button_threshold;
+} XDeviceAbsCalibControl, XDeviceAbsCalibState;
+
+typedef struct {
+ XID control;
+ int length;
+ int offset_x;
+ int offset_y;
+ int width;
+ int height;
+ int screen;
+ XID following;
+} XDeviceAbsAreaControl, XDeviceAbsAreaState;
+
+typedef struct {
+ XID control;
+ int length;
+ int status;
+} XDeviceCoreControl;
+
+typedef struct {
+ XID control;
+ int length;
+ int status;
+ int iscore;
+} XDeviceCoreState;
+
+typedef struct {
+ XID control;
+ int length;
+ int enable;
+} XDeviceEnableControl, XDeviceEnableState;
+
+/*******************************************************************
+ *
+ * An array of XDeviceList structures is returned by the
+ * XListInputDevices function. Each entry contains information
+ * about one input device. Among that information is an array of
+ * pointers to structures that describe the characteristics of
+ * the input device.
+ *
+ */
+
+typedef struct _XAnyClassinfo *XAnyClassPtr;
+
+typedef struct _XAnyClassinfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ } XAnyClassInfo;
+
+typedef struct _XDeviceInfo *XDeviceInfoPtr;
+
+typedef struct _XDeviceInfo
+ {
+ XID id;
+ Atom type;
+ char *name;
+ int num_classes;
+ int use;
+ XAnyClassPtr inputclassinfo;
+ } XDeviceInfo;
+
+typedef struct _XKeyInfo *XKeyInfoPtr;
+
+typedef struct _XKeyInfo
+ {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ unsigned short min_keycode;
+ unsigned short max_keycode;
+ unsigned short num_keys;
+ } XKeyInfo;
+
+typedef struct _XButtonInfo *XButtonInfoPtr;
+
+typedef struct _XButtonInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ short num_buttons;
+ } XButtonInfo;
+
+typedef struct _XAxisInfo *XAxisInfoPtr;
+
+typedef struct _XAxisInfo {
+ int resolution;
+ int min_value;
+ int max_value;
+ } XAxisInfo;
+
+typedef struct _XValuatorInfo *XValuatorInfoPtr;
+
+typedef struct _XValuatorInfo
+ {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ unsigned char num_axes;
+ unsigned char mode;
+ unsigned long motion_buffer;
+ XAxisInfoPtr axes;
+ } XValuatorInfo;
+
+
+/*******************************************************************
+ *
+ * An XDevice structure is returned by the XOpenDevice function.
+ * It contains an array of pointers to XInputClassInfo structures.
+ * Each contains information about a class of input supported by the
+ * device, including a pointer to an array of data for each type of event
+ * the device reports.
+ *
+ */
+
+
+typedef struct {
+ unsigned char input_class;
+ unsigned char event_type_base;
+} XInputClassInfo;
+
+typedef struct {
+ XID device_id;
+ int num_classes;
+ XInputClassInfo *classes;
+} XDevice;
+
+
+/*******************************************************************
+ *
+ * The following structure is used to return information for the
+ * XGetSelectedExtensionEvents function.
+ *
+ */
+
+typedef struct {
+ XEventClass event_type;
+ XID device;
+} XEventList;
+
+/*******************************************************************
+ *
+ * The following structure is used to return motion history data from
+ * an input device that supports the input class Valuators.
+ * This information is returned by the XGetDeviceMotionEvents function.
+ *
+ */
+
+typedef struct {
+ Time time;
+ int *data;
+} XDeviceTimeCoord;
+
+
+/*******************************************************************
+ *
+ * Device state structure.
+ * This is returned by the XQueryDeviceState request.
+ *
+ */
+
+typedef struct {
+ XID device_id;
+ int num_classes;
+ XInputClass *data;
+} XDeviceState;
+
+/*******************************************************************
+ *
+ * Note that the mode field is a bitfield that reports the Proximity
+ * status of the device as well as the mode. The mode field should
+ * be OR'd with the mask DeviceMode and compared with the values
+ * Absolute and Relative to determine the mode, and should be OR'd
+ * with the mask ProximityState and compared with the values InProximity
+ * and OutOfProximity to determine the proximity state.
+ *
+ */
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ unsigned char num_valuators;
+ unsigned char mode;
+ int *valuators;
+} XValuatorState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ short num_keys;
+ char keys[32];
+} XKeyState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ unsigned char c_class;
+#else
+ unsigned char class;
+#endif
+ unsigned char length;
+ short num_buttons;
+ char buttons[32];
+} XButtonState;
+
+/*******************************************************************
+ *
+ * Function definitions.
+ *
+ */
+
+_XFUNCPROTOBEGIN
+
+extern int XChangeKeyboardDevice(
+ Display* /* display */,
+ XDevice* /* device */
+);
+
+extern int XChangePointerDevice(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* xaxis */,
+ int /* yaxis */
+);
+
+extern int XGrabDevice(
+ Display* /* display */,
+ XDevice* /* device */,
+ Window /* grab_window */,
+ Bool /* ownerEvents */,
+ int /* event count */,
+ XEventClass* /* event_list */,
+ int /* this_device_mode */,
+ int /* other_devices_mode */,
+ Time /* time */
+);
+
+extern int XUngrabDevice(
+ Display* /* display */,
+ XDevice* /* device */,
+ Time /* time */
+);
+
+extern int XGrabDeviceKey(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned int /* key */,
+ unsigned int /* modifiers */,
+ XDevice* /* modifier_device */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_count */,
+ XEventClass* /* event_list */,
+ int /* this_device_mode */,
+ int /* other_devices_mode */
+);
+
+extern int XUngrabDeviceKey(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned int /* key */,
+ unsigned int /* modifiers */,
+ XDevice* /* modifier_dev */,
+ Window /* grab_window */
+);
+
+extern int XGrabDeviceButton(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ XDevice* /* modifier_device */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_count */,
+ XEventClass* /* event_list */,
+ int /* this_device_mode */,
+ int /* other_devices_mode */
+);
+
+extern int XUngrabDeviceButton(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ XDevice* /* modifier_dev */,
+ Window /* grab_window */
+);
+
+extern int XAllowDeviceEvents(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* event_mode */,
+ Time /* time */
+);
+
+extern int XGetDeviceFocus(
+ Display* /* display */,
+ XDevice* /* device */,
+ Window* /* focus */,
+ int* /* revert_to */,
+ Time* /* time */
+);
+
+extern int XSetDeviceFocus(
+ Display* /* display */,
+ XDevice* /* device */,
+ Window /* focus */,
+ int /* revert_to */,
+ Time /* time */
+);
+
+extern XFeedbackState *XGetFeedbackControl(
+ Display* /* display */,
+ XDevice* /* device */,
+ int* /* num_feedbacks */
+);
+
+extern void XFreeFeedbackList(
+ XFeedbackState* /* list */
+);
+
+extern int XChangeFeedbackControl(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned long /* mask */,
+ XFeedbackControl* /* f */
+);
+
+extern int XDeviceBell(
+ Display* /* display */,
+ XDevice* /* device */,
+ XID /* feedbackclass */,
+ XID /* feedbackid */,
+ int /* percent */
+);
+
+extern KeySym *XGetDeviceKeyMapping(
+ Display* /* display */,
+ XDevice* /* device */,
+#if NeedWidePrototypes
+ unsigned int /* first */,
+#else
+ KeyCode /* first */,
+#endif
+ int /* keycount */,
+ int* /* syms_per_code */
+);
+
+extern int XChangeDeviceKeyMapping(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* first */,
+ int /* syms_per_code */,
+ KeySym* /* keysyms */,
+ int /* count */
+);
+
+extern XModifierKeymap *XGetDeviceModifierMapping(
+ Display* /* display */,
+ XDevice* /* device */
+);
+
+extern int XSetDeviceModifierMapping(
+ Display* /* display */,
+ XDevice* /* device */,
+ XModifierKeymap* /* modmap */
+);
+
+extern int XSetDeviceButtonMapping(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned char* /* map[] */,
+ int /* nmap */
+);
+
+extern int XGetDeviceButtonMapping(
+ Display* /* display */,
+ XDevice* /* device */,
+ unsigned char* /* map[] */,
+ unsigned int /* nmap */
+);
+
+extern XDeviceState *XQueryDeviceState(
+ Display* /* display */,
+ XDevice* /* device */
+);
+
+extern void XFreeDeviceState(
+ XDeviceState* /* list */
+);
+
+extern XExtensionVersion *XGetExtensionVersion(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+
+extern XDeviceInfo *XListInputDevices(
+ Display* /* display */,
+ int* /* ndevices */
+);
+
+extern void XFreeDeviceList(
+ XDeviceInfo* /* list */
+);
+
+extern XDevice *XOpenDevice(
+ Display* /* display */,
+ XID /* id */
+);
+
+extern int XCloseDevice(
+ Display* /* display */,
+ XDevice* /* device */
+);
+
+extern int XSetDeviceMode(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* mode */
+);
+
+extern int XSetDeviceValuators(
+ Display* /* display */,
+ XDevice* /* device */,
+ int* /* valuators */,
+ int /* first_valuator */,
+ int /* num_valuators */
+);
+
+extern XDeviceControl *XGetDeviceControl(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* control */
+);
+
+extern int XChangeDeviceControl(
+ Display* /* display */,
+ XDevice* /* device */,
+ int /* control */,
+ XDeviceControl* /* d */
+);
+
+extern int XSelectExtensionEvent(
+ Display* /* display */,
+ Window /* w */,
+ XEventClass* /* event_list */,
+ int /* count */
+);
+
+extern int XGetSelectedExtensionEvents(
+ Display* /* display */,
+ Window /* w */,
+ int* /* this_client_count */,
+ XEventClass** /* this_client_list */,
+ int* /* all_clients_count */,
+ XEventClass** /* all_clients_list */
+);
+
+extern int XChangeDeviceDontPropagateList(
+ Display* /* display */,
+ Window /* window */,
+ int /* count */,
+ XEventClass* /* events */,
+ int /* mode */
+);
+
+extern XEventClass *XGetDeviceDontPropagateList(
+ Display* /* display */,
+ Window /* window */,
+ int* /* count */
+);
+
+extern Status XSendExtensionEvent(
+ Display* /* display */,
+ XDevice* /* device */,
+ Window /* dest */,
+ Bool /* prop */,
+ int /* count */,
+ XEventClass* /* list */,
+ XEvent* /* event */
+);
+
+extern XDeviceTimeCoord *XGetDeviceMotionEvents(
+ Display* /* display */,
+ XDevice* /* device */,
+ Time /* start */,
+ Time /* stop */,
+ int* /* nEvents */,
+ int* /* mode */,
+ int* /* axis_count */
+);
+
+extern void XFreeDeviceMotionEvents(
+ XDeviceTimeCoord* /* events */
+);
+
+extern void XFreeDeviceControl(
+ XDeviceControl* /* control */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XINPUT_H_ */
diff --git a/X11/extensions/XIproto.h b/X11/extensions/XIproto.h
new file mode 100644
index 000000000..6d4bf64b2
--- /dev/null
+++ b/X11/extensions/XIproto.h
@@ -0,0 +1,1617 @@
+/* $Xorg: XIproto.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */
+
+#ifndef _XIPROTO_H
+#define _XIPROTO_H
+
+#include <X11/Xproto.h>
+#include <X11/X.h>
+
+/* make sure types have right sizes for protocol structures. */
+#define Window CARD32
+#define Time CARD32
+#define KeyCode CARD8
+
+/*********************************************************
+ *
+ * number of events, errors, and extension name.
+ *
+ */
+
+#define MORE_EVENTS 0x80
+#define DEVICE_BITS 0x7F
+
+#define InputClassBits 0x3F /* bits in mode field for input classes */
+#define ModeBitsShift 6 /* amount to shift the remaining bits */
+
+#define numInputClasses 7
+
+#define IEVENTS 16
+#define IERRORS 5
+
+#define CLIENT_REQ 1
+
+typedef struct _XExtEventInfo
+ {
+ Mask mask;
+ BYTE type;
+ BYTE word;
+ } XExtEventInfo;
+
+typedef unsigned char *Pointer;
+
+struct tmask
+ {
+ Mask mask;
+ Pointer dev;
+ };
+
+/*********************************************************
+ *
+ * Event constants used by library.
+ *
+ */
+
+#define XI_DeviceValuator 0
+#define XI_DeviceKeyPress 1
+#define XI_DeviceKeyRelease 2
+#define XI_DeviceButtonPress 3
+#define XI_DeviceButtonRelease 4
+#define XI_DeviceMotionNotify 5
+#define XI_DeviceFocusIn 6
+#define XI_DeviceFocusOut 7
+#define XI_ProximityIn 8
+#define XI_ProximityOut 9
+#define XI_DeviceStateNotify 10
+#define XI_DeviceMappingNotify 11
+#define XI_ChangeDeviceNotify 12
+#define XI_DeviceKeystateNotify 13
+#define XI_DeviceButtonstateNotify 14
+#define XI_DevicePresenceNotify 15
+
+/*********************************************************
+ *
+ * Protocol request constants
+ *
+ */
+
+#define X_GetExtensionVersion 1
+#define X_ListInputDevices 2
+#define X_OpenDevice 3
+#define X_CloseDevice 4
+#define X_SetDeviceMode 5
+#define X_SelectExtensionEvent 6
+#define X_GetSelectedExtensionEvents 7
+#define X_ChangeDeviceDontPropagateList 8
+#define X_GetDeviceDontPropagateList 9
+#define X_GetDeviceMotionEvents 10
+#define X_ChangeKeyboardDevice 11
+#define X_ChangePointerDevice 12
+#define X_GrabDevice 13
+#define X_UngrabDevice 14
+#define X_GrabDeviceKey 15
+#define X_UngrabDeviceKey 16
+#define X_GrabDeviceButton 17
+#define X_UngrabDeviceButton 18
+#define X_AllowDeviceEvents 19
+#define X_GetDeviceFocus 20
+#define X_SetDeviceFocus 21
+#define X_GetFeedbackControl 22
+#define X_ChangeFeedbackControl 23
+#define X_GetDeviceKeyMapping 24
+#define X_ChangeDeviceKeyMapping 25
+#define X_GetDeviceModifierMapping 26
+#define X_SetDeviceModifierMapping 27
+#define X_GetDeviceButtonMapping 28
+#define X_SetDeviceButtonMapping 29
+#define X_QueryDeviceState 30
+#define X_SendExtensionEvent 31
+#define X_DeviceBell 32
+#define X_SetDeviceValuators 33
+#define X_GetDeviceControl 34
+#define X_ChangeDeviceControl 35
+
+/*********************************************************
+ *
+ * Protocol request and reply structures.
+ *
+ * GetExtensionVersion.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetExtensionVersion */
+ CARD16 length B16;
+ CARD16 nbytes B16;
+ CARD8 pad1, pad2;
+} xGetExtensionVersionReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetExtensionVersion */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ BOOL present;
+ CARD8 pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+} xGetExtensionVersionReply;
+
+/*********************************************************
+ *
+ * ListInputDevices.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ListInputDevices */
+ CARD16 length B16;
+} xListInputDevicesReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ListInputDevices */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 ndevices;
+ CARD8 pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xListInputDevicesReply;
+
+typedef struct _xDeviceInfo *xDeviceInfoPtr;
+
+typedef struct _xAnyClassinfo *xAnyClassPtr;
+
+typedef struct _xAnyClassinfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ } xAnyClassInfo;
+
+typedef struct _xDeviceInfo {
+ CARD32 type B32;
+ CARD8 id;
+ CARD8 num_classes;
+ CARD8 use;
+ CARD8 pad1;
+ } xDeviceInfo;
+
+typedef struct _xKeyInfo *xKeyInfoPtr;
+
+typedef struct _xKeyInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ KeyCode min_keycode;
+ KeyCode max_keycode;
+ CARD16 num_keys B16;
+ CARD8 pad1,pad2;
+ } xKeyInfo;
+
+typedef struct _xButtonInfo *xButtonInfoPtr;
+
+typedef struct _xButtonInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD16 num_buttons B16;
+ } xButtonInfo;
+
+typedef struct _xValuatorInfo *xValuatorInfoPtr;
+
+typedef struct _xValuatorInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_axes;
+ CARD8 mode;
+ CARD32 motion_buffer_size B32;
+ } xValuatorInfo;
+
+typedef struct _xAxisInfo *xAxisInfoPtr;
+
+typedef struct _xAxisInfo {
+ CARD32 resolution B32;
+ CARD32 min_value B32;
+ CARD32 max_value B32;
+ } xAxisInfo;
+
+/*********************************************************
+ *
+ * OpenDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_OpenDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xOpenDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_OpenDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 num_classes;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } xOpenDeviceReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 event_type_base;
+ } xInputClassInfo;
+
+/*********************************************************
+ *
+ * CloseDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_CloseDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xCloseDeviceReq;
+
+/*********************************************************
+ *
+ * SetDeviceMode.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceMode */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 mode;
+ BYTE pad1, pad2;
+} xSetDeviceModeReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceMode */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xSetDeviceModeReply;
+
+/*********************************************************
+ *
+ * SelectExtensionEvent.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SelectExtensionEvent */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 count B16;
+ CARD16 pad00 B16;
+} xSelectExtensionEventReq;
+
+/*********************************************************
+ *
+ * GetSelectedExtensionEvent.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetSelectedExtensionEvents */
+ CARD16 length B16;
+ Window window B32;
+} xGetSelectedExtensionEventsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* GetSelectedExtensionEvents */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 this_client_count B16;
+ CARD16 all_clients_count B16;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetSelectedExtensionEventsReply;
+
+/*********************************************************
+ *
+ * ChangeDeviceDontPropagateList.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 count B16;
+ CARD8 mode;
+ BYTE pad;
+} xChangeDeviceDontPropagateListReq;
+
+/*********************************************************
+ *
+ * GetDeviceDontPropagateList.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetDeviceDontPropagateList */
+ CARD16 length B16;
+ Window window B32;
+} xGetDeviceDontPropagateListReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* GetDeviceDontPropagateList */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 count B16;
+ CARD16 pad00 B16;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xGetDeviceDontPropagateListReply;
+
+/*********************************************************
+ *
+ * GetDeviceMotionEvents.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceMotionEvents*/
+ CARD16 length B16;
+ Time start B32;
+ Time stop B32;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceMotionEventsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceMotionEvents */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nEvents B32;
+ CARD8 axes;
+ CARD8 mode;
+ BYTE pad1, pad2;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+} xGetDeviceMotionEventsReply;
+
+/*********************************************************
+ *
+ * ChangeKeyboardDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeKeyboardDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xChangeKeyboardDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangeKeyboardDevice*/
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xChangeKeyboardDeviceReply;
+
+/*********************************************************
+ *
+ * ChangePointerDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangePointerDevice */
+ CARD16 length B16;
+ CARD8 xaxis;
+ CARD8 yaxis;
+ CARD8 deviceid;
+ BYTE pad1;
+} xChangePointerDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangePointerDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xChangePointerDeviceReply;
+
+/*********************************************************
+ *
+ * GrabDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDevice */
+ CARD16 length B16;
+ Window grabWindow B32;
+ Time time B32;
+ CARD16 event_count B16;
+ CARD8 this_device_mode;
+ CARD8 other_devices_mode;
+ BOOL ownerEvents;
+ CARD8 deviceid;
+ CARD16 pad01 B16;
+} xGrabDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GrabDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xGrabDeviceReply;
+
+/*********************************************************
+ *
+ * UngrabDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UnGrabDevice */
+ CARD16 length B16;
+ Time time B32;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceReq;
+
+/*********************************************************
+ *
+ * GrabDeviceKey.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 event_count B16;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 grabbed_device;
+ CARD8 key;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ BOOL ownerEvents;
+ BYTE pad1, pad2;
+} xGrabDeviceKeyReq;
+
+/*********************************************************
+ *
+ * UngrabDeviceKey.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UngrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 key;
+ CARD8 grabbed_device;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceKeyReq;
+
+/*********************************************************
+ *
+ * GrabDeviceButton.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDeviceButton */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD8 grabbed_device;
+ CARD8 modifier_device;
+ CARD16 event_count B16;
+ CARD16 modifiers B16;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ CARD8 button;
+ BOOL ownerEvents;
+ BYTE pad1, pad2;
+} xGrabDeviceButtonReq;
+
+/*********************************************************
+ *
+ * UngrabDeviceButton.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UngrabDeviceButton */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 button;
+ CARD8 grabbed_device;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceButtonReq;
+
+/*********************************************************
+ *
+ * AllowDeviceEvents.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_AllowDeviceEvents */
+ CARD16 length B16;
+ Time time B32;
+ CARD8 mode;
+ CARD8 deviceid;
+ BYTE pad1, pad2;
+} xAllowDeviceEventsReq;
+
+/*********************************************************
+ *
+ * GetDeviceFocus.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceFocus */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceFocusReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceFocus */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 focus B32;
+ Time time B32;
+ CARD8 revertTo;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ } xGetDeviceFocusReply;
+
+/*********************************************************
+ *
+ * SetDeviceFocus.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceFocus */
+ CARD16 length B16;
+ Window focus B32;
+ Time time B32;
+ CARD8 revertTo;
+ CARD8 device;
+ CARD16 pad01 B16;
+} xSetDeviceFocusReq;
+
+/*********************************************************
+ *
+ * GetFeedbackControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetFeedbackControl */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetFeedbackControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetFeedbackControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 num_feedbacks B16;
+ CARD16 pad01 B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+} xGetFeedbackControlReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class */
+#else
+ CARD8 class; /* feedback class */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+} xFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 id;
+ CARD16 length B16;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+ BOOL global_auto_repeat;
+ CARD8 click;
+ CARD8 percent;
+ BYTE pad;
+ BYTE auto_repeats[32];
+} xKbdFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 id;
+ CARD16 length B16;
+ CARD8 pad1,pad2;
+ CARD16 accelNum B16;
+ CARD16 accelDenom B16;
+ CARD16 threshold B16;
+} xPtrFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD32 resolution B32;
+ INT32 min_value B32;
+ INT32 max_value B32;
+} xIntegerFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD16 max_symbols B16;
+ CARD16 num_syms_supported B16;
+} xStringFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD8 percent;
+ BYTE pad1, pad2, pad3;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+} xBellFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xLedFeedbackState;
+
+/*********************************************************
+ *
+ * ChangeFeedbackControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeFeedbackControl */
+ CARD16 length B16;
+ CARD32 mask B32;
+ CARD8 deviceid;
+ CARD8 feedbackid;
+ BYTE pad1, pad2;
+} xChangeFeedbackControlReq;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+} xFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback length */
+ CARD16 length B16; /* feedback length */
+ KeyCode key;
+ CARD8 auto_repeat_mode;
+ INT8 click;
+ INT8 percent;
+ INT16 pitch B16;
+ INT16 duration B16;
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xKbdFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD8 pad1,pad2;
+ INT16 num B16;
+ INT16 denom B16;
+ INT16 thresh B16;
+} xPtrFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ INT32 int_to_display B32;
+} xIntegerFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD8 pad1,pad2;
+ CARD16 num_keysyms B16;
+} xStringFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ INT8 percent;
+ BYTE pad1, pad2, pad3;
+ INT16 pitch B16;
+ INT16 duration B16;
+} xBellFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xLedFeedbackCtl;
+
+/*********************************************************
+ *
+ * GetDeviceKeyMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceKeyMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+} xGetDeviceKeyMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceKeyMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 keySymsPerKeyCode;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetDeviceKeyMappingReply;
+
+/*********************************************************
+ *
+ * ChangeDeviceKeyMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD8 keyCodes;
+} xChangeDeviceKeyMappingReq;
+
+/*********************************************************
+ *
+ * GetDeviceModifierMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceModifierMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceModifierMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceModifierMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 numKeyPerModifier;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetDeviceModifierMappingReply;
+
+/*********************************************************
+ *
+ * SetDeviceModifierMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceModifierMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 numKeyPerModifier;
+ CARD16 pad1 B16;
+} xSetDeviceModifierMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceModifierMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 success;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xSetDeviceModifierMappingReply;
+
+/*********************************************************
+ *
+ * GetDeviceButtonMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetDeviceButtonMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceButtonMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceButtonMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 nElts;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetDeviceButtonMappingReply;
+
+/*********************************************************
+ *
+ * SetDeviceButtonMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_SetDeviceButtonMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 map_length;
+ BYTE pad1, pad2;
+} xSetDeviceButtonMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceButtonMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xSetDeviceButtonMappingReply;
+
+/*********************************************************
+ *
+ * QueryDeviceState.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_QueryDeviceState */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xQueryDeviceStateReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_QueryDeviceState */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 num_classes;
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xQueryDeviceStateReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_keys;
+ BYTE pad1;
+ CARD8 keys[32];
+} xKeyState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_buttons;
+ BYTE pad1;
+ CARD8 buttons[32];
+} xButtonState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_valuators;
+ CARD8 mode;
+} xValuatorState;
+
+/*********************************************************
+ *
+ * SendExtensionEvent.
+ * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
+ * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_SendExtensionEvent */
+ CARD16 length B16;
+ Window destination B32;
+ CARD8 deviceid;
+ BOOL propagate;
+ CARD16 count B16;
+ CARD8 num_events;
+ BYTE pad1,pad2,pad3;
+} xSendExtensionEventReq;
+
+/*********************************************************
+ *
+ * DeviceBell.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_DeviceBell */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 feedbackid;
+ CARD8 feedbackclass;
+ INT8 percent;
+} xDeviceBellReq;
+
+/*********************************************************
+ *
+ * SetDeviceValuators.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceValuators */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 first_valuator;
+ CARD8 num_valuators;
+ BYTE pad1;
+} xSetDeviceValuatorsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceValuators */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xSetDeviceValuatorsReply;
+
+/*********************************************************
+ *
+ * GetDeviceControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceControl */
+ CARD16 length B16;
+ CARD16 control B16;
+ CARD8 deviceid;
+ BYTE pad2;
+} xGetDeviceControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetDeviceControlReply;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+} xDeviceState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD32 num_valuators B32; /* number of valuators */
+} xDeviceResolutionState;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ INT32 min_x B32;
+ INT32 max_x B32;
+ INT32 min_y B32;
+ INT32 max_y B32;
+ CARD32 flip_x B32;
+ CARD32 flip_y B32;
+ CARD32 rotation B32;
+ CARD32 button_threshold B32;
+} xDeviceAbsCalibState;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD32 offset_x B32;
+ CARD32 offset_y B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 screen B32;
+ CARD32 following B32;
+} xDeviceAbsAreaState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 status;
+ CARD8 iscore;
+ CARD16 pad1 B16;
+} xDeviceCoreState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 enable;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceEnableState;
+
+/*********************************************************
+ *
+ * ChangeDeviceControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ChangeDeviceControl */
+ CARD16 length B16;
+ CARD16 control B16;
+ CARD8 deviceid;
+ BYTE pad0;
+} xChangeDeviceControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangeDeviceControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xChangeDeviceControlReply;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+} xDeviceCtl;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 first_valuator; /* first valuator to change */
+ CARD8 num_valuators; /* number of valuators to change*/
+ CARD8 pad1,pad2;
+} xDeviceResolutionCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ INT32 min_x;
+ INT32 max_x;
+ INT32 min_y;
+ INT32 max_y;
+ CARD32 flip_x;
+ CARD32 flip_y;
+ CARD32 rotation;
+ CARD32 button_threshold;
+} xDeviceAbsCalibCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD32 offset_x;
+ CARD32 offset_y;
+ INT32 width;
+ INT32 height;
+ INT32 screen;
+ CARD32 following;
+} xDeviceAbsAreaCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD8 status;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceCoreCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD8 enable;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceEnableCtl;
+
+/**********************************************************
+ *
+ * Input extension events.
+ *
+ * DeviceValuator
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ CARD8 deviceid;
+ CARD16 sequenceNumber B16;
+ KeyButMask device_state B16;
+ CARD8 num_valuators;
+ CARD8 first_valuator;
+ INT32 valuator0 B32;
+ INT32 valuator1 B32;
+ INT32 valuator2 B32;
+ INT32 valuator3 B32;
+ INT32 valuator4 B32;
+ INT32 valuator5 B32;
+ } deviceValuator;
+
+/**********************************************************
+ *
+ * DeviceKeyButtonPointer.
+ *
+ * Used for: DeviceKeyPress, DeviceKeyRelease,
+ * DeviceButtonPress, DeviceButtonRelease,
+ * ProximityIn, ProximityOut
+ * DeviceMotionNotify,
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ Window root B32;
+ Window event B32;
+ Window child B32;
+ INT16 root_x B16;
+ INT16 root_y B16;
+ INT16 event_x B16;
+ INT16 event_y B16;
+ KeyButMask state B16;
+ BOOL same_screen;
+ CARD8 deviceid;
+ } deviceKeyButtonPointer;
+
+/**********************************************************
+ *
+ * DeviceFocus.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ Window window B32;
+ BYTE mode;
+ CARD8 deviceid;
+ BYTE pad1, pad2;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ } deviceFocus;
+
+/**********************************************************
+ *
+ * DeviceStateNotify.
+ *
+ * Note that the two high-order bits in the classes_reported
+ * field are the proximity state (InProximity or OutOfProximity),
+ * and the device mode (Absolute or Relative), respectively.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 num_keys;
+ CARD8 num_buttons;
+ CARD8 num_valuators;
+ CARD8 classes_reported;
+ CARD8 buttons[4];
+ CARD8 keys[4];
+ INT32 valuator0 B32;
+ INT32 valuator1 B32;
+ INT32 valuator2 B32;
+ } deviceStateNotify;
+
+/**********************************************************
+ *
+ * DeviceKeyStateNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 keys[28];
+ } deviceKeyStateNotify;
+
+/**********************************************************
+ *
+ * DeviceButtonStateNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 buttons[28];
+ } deviceButtonStateNotify;
+
+/**********************************************************
+ *
+ * DeviceMappingNotify.
+ * Fields must be kept in sync with core mappingnotify event.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 request;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+ Time time B32;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } deviceMappingNotify;
+
+/**********************************************************
+ *
+ * ChangeDeviceNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 request;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } changeDeviceNotify;
+
+/**********************************************************
+ *
+ * devicePresenceNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE pad00;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */
+ BYTE deviceid;
+ CARD16 control B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+ } devicePresenceNotify;
+
+#undef Window
+#undef Time
+#undef KeyCode
+
+#endif
diff --git a/X11/extensions/XKB.h b/X11/extensions/XKB.h
new file mode 100644
index 000000000..a91531719
--- /dev/null
+++ b/X11/extensions/XKB.h
@@ -0,0 +1,788 @@
+/* $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/include/extensions/XKB.h,v 1.5tsi Exp $ */
+
+#ifndef _XKB_H_
+#define _XKB_H_
+
+ /*
+ * XKB request codes, used in:
+ * - xkbReqType field of all requests
+ * - requestMinor field of some events
+ */
+#define X_kbUseExtension 0
+#define X_kbSelectEvents 1
+#define X_kbBell 3
+#define X_kbGetState 4
+#define X_kbLatchLockState 5
+#define X_kbGetControls 6
+#define X_kbSetControls 7
+#define X_kbGetMap 8
+#define X_kbSetMap 9
+#define X_kbGetCompatMap 10
+#define X_kbSetCompatMap 11
+#define X_kbGetIndicatorState 12
+#define X_kbGetIndicatorMap 13
+#define X_kbSetIndicatorMap 14
+#define X_kbGetNamedIndicator 15
+#define X_kbSetNamedIndicator 16
+#define X_kbGetNames 17
+#define X_kbSetNames 18
+#define X_kbGetGeometry 19
+#define X_kbSetGeometry 20
+#define X_kbPerClientFlags 21
+#define X_kbListComponents 22
+#define X_kbGetKbdByName 23
+#define X_kbGetDeviceInfo 24
+#define X_kbSetDeviceInfo 25
+#define X_kbSetDebuggingFlags 101
+
+ /*
+ * In the X sense, XKB reports only one event.
+ * The type field of all XKB events is XkbEventCode
+ */
+#define XkbEventCode 0
+#define XkbNumberEvents (XkbEventCode+1)
+
+ /*
+ * XKB has a minor event code so it can use one X event code for
+ * multiple purposes.
+ * - reported in the xkbType field of all XKB events.
+ * - XkbSelectEventDetails: Indicates the event for which event details
+ * are being changed
+ */
+#define XkbNewKeyboardNotify 0
+#define XkbMapNotify 1
+#define XkbStateNotify 2
+#define XkbControlsNotify 3
+#define XkbIndicatorStateNotify 4
+#define XkbIndicatorMapNotify 5
+#define XkbNamesNotify 6
+#define XkbCompatMapNotify 7
+#define XkbBellNotify 8
+#define XkbActionMessage 9
+#define XkbAccessXNotify 10
+#define XkbExtensionDeviceNotify 11
+
+ /*
+ * Event Mask:
+ * - XkbSelectEvents: Specifies event interest.
+ */
+#define XkbNewKeyboardNotifyMask (1L << 0)
+#define XkbMapNotifyMask (1L << 1)
+#define XkbStateNotifyMask (1L << 2)
+#define XkbControlsNotifyMask (1L << 3)
+#define XkbIndicatorStateNotifyMask (1L << 4)
+#define XkbIndicatorMapNotifyMask (1L << 5)
+#define XkbNamesNotifyMask (1L << 6)
+#define XkbCompatMapNotifyMask (1L << 7)
+#define XkbBellNotifyMask (1L << 8)
+#define XkbActionMessageMask (1L << 9)
+#define XkbAccessXNotifyMask (1L << 10)
+#define XkbExtensionDeviceNotifyMask (1L << 11)
+#define XkbAllEventsMask (0xFFF)
+
+ /*
+ * NewKeyboardNotify event details:
+ */
+#define XkbNKN_KeycodesMask (1L << 0)
+#define XkbNKN_GeometryMask (1L << 1)
+#define XkbNKN_DeviceIDMask (1L << 2)
+#define XkbAllNewKeyboardEventsMask (0x7)
+
+ /*
+ * AccessXNotify event types:
+ * - The 'what' field of AccessXNotify events reports the
+ * reason that the event was generated.
+ */
+#define XkbAXN_SKPress 0
+#define XkbAXN_SKAccept 1
+#define XkbAXN_SKReject 2
+#define XkbAXN_SKRelease 3
+#define XkbAXN_BKAccept 4
+#define XkbAXN_BKReject 5
+#define XkbAXN_AXKWarning 6
+
+ /*
+ * AccessXNotify details:
+ * - Used as an event detail mask to limit the conditions under which
+ * AccessXNotify events are reported
+ */
+#define XkbAXN_SKPressMask (1L << 0)
+#define XkbAXN_SKAcceptMask (1L << 1)
+#define XkbAXN_SKRejectMask (1L << 2)
+#define XkbAXN_SKReleaseMask (1L << 3)
+#define XkbAXN_BKAcceptMask (1L << 4)
+#define XkbAXN_BKRejectMask (1L << 5)
+#define XkbAXN_AXKWarningMask (1L << 6)
+#define XkbAllAccessXEventsMask (0xf)
+
+ /*
+ * Miscellaneous event details:
+ * - event detail masks for assorted events that don't reall
+ * have any details.
+ */
+#define XkbAllStateEventsMask XkbAllStateComponentsMask
+#define XkbAllMapEventsMask XkbAllMapComponentsMask
+#define XkbAllControlEventsMask XkbAllControlsMask
+#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask
+#define XkbAllNameEventsMask XkbAllNamesMask
+#define XkbAllCompatMapEventsMask XkbAllCompatMask
+#define XkbAllBellEventsMask (1L << 0)
+#define XkbAllActionMessagesMask (1L << 0)
+
+ /*
+ * XKB reports one error: BadKeyboard
+ * A further reason for the error is encoded into to most significant
+ * byte of the resourceID for the error:
+ * XkbErr_BadDevice - the device in question was not found
+ * XkbErr_BadClass - the device was found but it doesn't belong to
+ * the appropriate class.
+ * XkbErr_BadId - the device was found and belongs to the right
+ * class, but not feedback with a matching id was
+ * found.
+ * The low byte of the resourceID for this error contains the device
+ * id, class specifier or feedback id that failed.
+ */
+#define XkbKeyboard 0
+#define XkbNumberErrors 1
+
+#define XkbErr_BadDevice 0xff
+#define XkbErr_BadClass 0xfe
+#define XkbErr_BadId 0xfd
+
+ /*
+ * Keyboard Components Mask:
+ * - Specifies the components that follow a GetKeyboardByNameReply
+ */
+#define XkbClientMapMask (1L << 0)
+#define XkbServerMapMask (1L << 1)
+#define XkbCompatMapMask (1L << 2)
+#define XkbIndicatorMapMask (1L << 3)
+#define XkbNamesMask (1L << 4)
+#define XkbGeometryMask (1L << 5)
+#define XkbControlsMask (1L << 6)
+#define XkbAllComponentsMask (0x7f)
+
+ /*
+ * State detail mask:
+ * - The 'changed' field of StateNotify events reports which of
+ * the keyboard state components have changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which StateNotify events are reported.
+ */
+#define XkbModifierStateMask (1L << 0)
+#define XkbModifierBaseMask (1L << 1)
+#define XkbModifierLatchMask (1L << 2)
+#define XkbModifierLockMask (1L << 3)
+#define XkbGroupStateMask (1L << 4)
+#define XkbGroupBaseMask (1L << 5)
+#define XkbGroupLatchMask (1L << 6)
+#define XkbGroupLockMask (1L << 7)
+#define XkbCompatStateMask (1L << 8)
+#define XkbGrabModsMask (1L << 9)
+#define XkbCompatGrabModsMask (1L << 10)
+#define XkbLookupModsMask (1L << 11)
+#define XkbCompatLookupModsMask (1L << 12)
+#define XkbPointerButtonMask (1L << 13)
+#define XkbAllStateComponentsMask (0x3fff)
+
+ /*
+ * Controls detail masks:
+ * The controls specified in XkbAllControlsMask:
+ * - The 'changed' field of ControlsNotify events reports which of
+ * the keyboard controls have changed.
+ * - The 'changeControls' field of the SetControls request specifies
+ * the controls for which values are to be changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which ControlsNotify events are reported.
+ *
+ * The controls specified in the XkbAllBooleanCtrlsMask:
+ * - The 'enabledControls' field of ControlsNotify events reports the
+ * current status of the boolean controls.
+ * - The 'enabledControlsChanges' field of ControlsNotify events reports
+ * any boolean controls that have been turned on or off.
+ * - The 'affectEnabledControls' and 'enabledControls' fields of the
+ * kbSetControls request change the set of enabled controls.
+ * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
+ * an XkbControlsRec specify the controls to be changed if the keyboard
+ * times out and the values to which they should be changed.
+ * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
+ * request specifies the specify the controls to be reset when the
+ * client exits and the values to which they should be reset.
+ * - The 'ctrls' field of an indicator map specifies the controls
+ * that drive the indicator.
+ * - Specifies the boolean controls affected by the SetControls and
+ * LockControls key actions.
+ */
+#define XkbRepeatKeysMask (1L << 0)
+#define XkbSlowKeysMask (1L << 1)
+#define XkbBounceKeysMask (1L << 2)
+#define XkbStickyKeysMask (1L << 3)
+#define XkbMouseKeysMask (1L << 4)
+#define XkbMouseKeysAccelMask (1L << 5)
+#define XkbAccessXKeysMask (1L << 6)
+#define XkbAccessXTimeoutMask (1L << 7)
+#define XkbAccessXFeedbackMask (1L << 8)
+#define XkbAudibleBellMask (1L << 9)
+#define XkbOverlay1Mask (1L << 10)
+#define XkbOverlay2Mask (1L << 11)
+#define XkbIgnoreGroupLockMask (1L << 12)
+#define XkbGroupsWrapMask (1L << 27)
+#define XkbInternalModsMask (1L << 28)
+#define XkbIgnoreLockModsMask (1L << 29)
+#define XkbPerKeyRepeatMask (1L << 30)
+#define XkbControlsEnabledMask (1L << 31)
+
+#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)
+
+#define XkbAllBooleanCtrlsMask (0x00001FFF)
+#define XkbAllControlsMask (0xF8001FFF)
+#define XkbAllControlEventsMask XkbAllControlsMask
+
+ /*
+ * AccessX Options Mask
+ * - The 'accessXOptions' field of an XkbControlsRec specifies the
+ * AccessX options that are currently in effect.
+ * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
+ * fields of an XkbControlsRec specify the Access X options to be
+ * changed if the keyboard times out and the values to which they
+ * should be changed.
+ */
+#define XkbAX_SKPressFBMask (1L << 0)
+#define XkbAX_SKAcceptFBMask (1L << 1)
+#define XkbAX_FeatureFBMask (1L << 2)
+#define XkbAX_SlowWarnFBMask (1L << 3)
+#define XkbAX_IndicatorFBMask (1L << 4)
+#define XkbAX_StickyKeysFBMask (1L << 5)
+#define XkbAX_TwoKeysMask (1L << 6)
+#define XkbAX_LatchToLockMask (1L << 7)
+#define XkbAX_SKReleaseFBMask (1L << 8)
+#define XkbAX_SKRejectFBMask (1L << 9)
+#define XkbAX_BKRejectFBMask (1L << 10)
+#define XkbAX_DumbBellFBMask (1L << 11)
+#define XkbAX_FBOptionsMask (0xF3F)
+#define XkbAX_SKOptionsMask (0x0C0)
+#define XkbAX_AllOptionsMask (0xFFF)
+
+ /*
+ * XkbUseCoreKbd is used to specify the core keyboard without having
+ * to look up its X input extension identifier.
+ * XkbUseCorePtr is used to specify the core pointer without having
+ * to look up its X input extension identifier.
+ * XkbDfltXIClass is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * device class.
+ * XkbDfltXIId is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * feedback identifier.
+ * XkbAllXIClasses is used to get information about all device indicators,
+ * whether they're part of the indicator feedback class
+ * or the keyboard feedback class.
+ * XkbAllXIIds is used to get information about all device indicator
+ * feedbacks without having to list them.
+ * XkbXINone is used to indicate that no class or id has been specified.
+ * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
+ * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
+ * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
+ * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
+ * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
+ * XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
+ * including the default.
+ * XkbSingleXIId(i) True if 'i' specifies exactly one device
+ * identifier, including the default.
+ */
+#define XkbUseCoreKbd 0x0100
+#define XkbUseCorePtr 0x0200
+#define XkbDfltXIClass 0x0300
+#define XkbDfltXIId 0x0400
+#define XkbAllXIClasses 0x0500
+#define XkbAllXIIds 0x0600
+#define XkbXINone 0xff00
+
+#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==LedFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==BellFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIId(c) (((c)&(~0xff))==0)
+#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
+#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
+
+#define XkbNoModifier 0xff
+#define XkbNoShiftLevel 0xff
+#define XkbNoShape 0xff
+#define XkbNoIndicator 0xff
+
+#define XkbNoModifierMask 0
+#define XkbAllModifiersMask 0xff
+#define XkbAllVirtualModsMask 0xffff
+
+#define XkbNumKbdGroups 4
+#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
+
+#define XkbMaxMouseKeysBtn 4
+
+ /*
+ * Group Index and Mask:
+ * - Indices into the kt_index array of a key type.
+ * - Mask specifies types to be changed for XkbChangeTypesOfKey
+ */
+#define XkbGroup1Index 0
+#define XkbGroup2Index 1
+#define XkbGroup3Index 2
+#define XkbGroup4Index 3
+#define XkbAnyGroup 254
+#define XkbAllGroups 255
+
+#define XkbGroup1Mask (1<<0)
+#define XkbGroup2Mask (1<<1)
+#define XkbGroup3Mask (1<<2)
+#define XkbGroup4Mask (1<<3)
+#define XkbAnyGroupMask (1<<7)
+#define XkbAllGroupsMask (0xf)
+
+ /*
+ * BuildCoreState: Given a keyboard group and a modifier state,
+ * construct the value to be reported an event.
+ * GroupForCoreState: Given the state reported in an event,
+ * determine the keyboard group.
+ * IsLegalGroup: Returns TRUE if 'g' is a valid group index.
+ */
+#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
+#define XkbGroupForCoreState(s) (((s)>>13)&0x3)
+#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
+
+ /*
+ * GroupsWrap values:
+ * - The 'groupsWrap' field of an XkbControlsRec specifies the
+ * treatment of out of range groups.
+ * - Bits 6 and 7 of the group info field of a key symbol map
+ * specify the interpretation of out of range groups for the
+ * corresponding key.
+ */
+#define XkbWrapIntoRange (0x00)
+#define XkbClampIntoRange (0x40)
+#define XkbRedirectIntoRange (0x80)
+
+ /*
+ * Action flags: Reported in the 'flags' field of most key actions.
+ * Interpretation depends on the type of the action; not all actions
+ * accept all flags.
+ *
+ * Option Used for Actions
+ * ------ ----------------
+ * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
+ * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
+ * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * UseModMapMods SetMods, LatchMods, LockMods, ISOLock
+ * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
+ * UseDfltButton PtrBtn, LockPtrBtn
+ * NoAcceleration MovePtr
+ * MoveAbsoluteX MovePtr
+ * MoveAbsoluteY MovePtr
+ * ISODfltIsGroup ISOLock
+ * ISONoAffectMods ISOLock
+ * ISONoAffectGroup ISOLock
+ * ISONoAffectPtr ISOLock
+ * ISONoAffectCtrls ISOLock
+ * MessageOnPress ActionMessage
+ * MessageOnRelease ActionMessage
+ * MessageGenKeyEvent ActionMessage
+ * AffectDfltBtn SetPtrDflt
+ * DfltBtnAbsolute SetPtrDflt
+ * SwitchApplication SwitchScreen
+ * SwitchAbsolute SwitchScreen
+ */
+
+#define XkbSA_ClearLocks (1L << 0)
+#define XkbSA_LatchToLock (1L << 1)
+
+#define XkbSA_LockNoLock (1L << 0)
+#define XkbSA_LockNoUnlock (1L << 1)
+
+#define XkbSA_UseModMapMods (1L << 2)
+
+#define XkbSA_GroupAbsolute (1L << 2)
+#define XkbSA_UseDfltButton 0
+
+#define XkbSA_NoAcceleration (1L << 0)
+#define XkbSA_MoveAbsoluteX (1L << 1)
+#define XkbSA_MoveAbsoluteY (1L << 2)
+
+#define XkbSA_ISODfltIsGroup (1L << 7)
+#define XkbSA_ISONoAffectMods (1L << 6)
+#define XkbSA_ISONoAffectGroup (1L << 5)
+#define XkbSA_ISONoAffectPtr (1L << 4)
+#define XkbSA_ISONoAffectCtrls (1L << 3)
+#define XkbSA_ISOAffectMask (0x78)
+
+#define XkbSA_MessageOnPress (1L << 0)
+#define XkbSA_MessageOnRelease (1L << 1)
+#define XkbSA_MessageGenKeyEvent (1L << 2)
+
+#define XkbSA_AffectDfltBtn 1
+#define XkbSA_DfltBtnAbsolute (1L << 2)
+
+#define XkbSA_SwitchApplication (1L << 0)
+#define XkbSA_SwitchAbsolute (1L << 2)
+
+ /*
+ * The following values apply to the SA_DeviceValuator
+ * action only. Valuator operations specify the action
+ * to be taken. Values specified in the action are
+ * multiplied by 2^scale before they are applied.
+ */
+#define XkbSA_IgnoreVal (0x00)
+#define XkbSA_SetValMin (0x10)
+#define XkbSA_SetValCenter (0x20)
+#define XkbSA_SetValMax (0x30)
+#define XkbSA_SetValRelative (0x40)
+#define XkbSA_SetValAbsolute (0x50)
+#define XkbSA_ValOpMask (0x70)
+#define XkbSA_ValScaleMask (0x07)
+#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
+#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
+
+ /*
+ * Action types: specifies the type of a key action. Reported in the
+ * type field of all key actions.
+ */
+#define XkbSA_NoAction 0x00
+#define XkbSA_SetMods 0x01
+#define XkbSA_LatchMods 0x02
+#define XkbSA_LockMods 0x03
+#define XkbSA_SetGroup 0x04
+#define XkbSA_LatchGroup 0x05
+#define XkbSA_LockGroup 0x06
+#define XkbSA_MovePtr 0x07
+#define XkbSA_PtrBtn 0x08
+#define XkbSA_LockPtrBtn 0x09
+#define XkbSA_SetPtrDflt 0x0a
+#define XkbSA_ISOLock 0x0b
+#define XkbSA_Terminate 0x0c
+#define XkbSA_SwitchScreen 0x0d
+#define XkbSA_SetControls 0x0e
+#define XkbSA_LockControls 0x0f
+#define XkbSA_ActionMessage 0x10
+#define XkbSA_RedirectKey 0x11
+#define XkbSA_DeviceBtn 0x12
+#define XkbSA_LockDeviceBtn 0x13
+#define XkbSA_DeviceValuator 0x14
+#define XkbSA_LastAction XkbSA_DeviceValuator
+#define XkbSA_NumActions (XkbSA_LastAction+1)
+
+#define XkbSA_XFree86Private 0x86
+
+ /*
+ * Specifies the key actions that clear latched groups or modifiers.
+ */
+#define XkbSA_BreakLatch \
+ ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
+ (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
+ (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
+ (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
+
+ /*
+ * Macros to classify key actions
+ */
+#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
+#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
+#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
+
+
+ /*
+ * Key Behavior Qualifier:
+ * KB_Permanent indicates that the behavior describes an unalterable
+ * characteristic of the keyboard, not an XKB software-simulation of
+ * the listed behavior.
+ * Key Behavior Types:
+ * Specifies the behavior of the underlying key.
+ */
+#define XkbKB_Permanent 0x80
+#define XkbKB_OpMask 0x7f
+
+#define XkbKB_Default 0x00
+#define XkbKB_Lock 0x01
+#define XkbKB_RadioGroup 0x02
+#define XkbKB_Overlay1 0x03
+#define XkbKB_Overlay2 0x04
+
+#define XkbKB_RGAllowNone 0x80
+
+ /*
+ * Various macros which describe the range of legal keycodes.
+ */
+#define XkbMinLegalKeyCode 8
+#define XkbMaxLegalKeyCode 255
+#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)
+#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
+/* Seems kinda silly to check that an unsigned char is <= 255... */
+#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
+
+ /*
+ * Assorted constants and limits.
+ */
+#define XkbNumModifiers 8
+#define XkbNumVirtualMods 16
+#define XkbNumIndicators 32
+#define XkbAllIndicatorsMask (0xffffffff)
+#define XkbMaxRadioGroups 32
+#define XkbAllRadioGroupsMask (0xffffffff)
+#define XkbMaxShiftLevel 63
+#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)
+#define XkbRGMaxMembers 12
+#define XkbActionMessageLength 6
+#define XkbKeyNameLength 4
+#define XkbMaxRedirectCount 8
+
+#define XkbGeomPtsPerMM 10
+#define XkbGeomMaxColors 32
+#define XkbGeomMaxLabelColors 3
+#define XkbGeomMaxPriority 255
+
+ /*
+ * Key Type index and mask for the four standard key types.
+ */
+#define XkbOneLevelIndex 0
+#define XkbTwoLevelIndex 1
+#define XkbAlphabeticIndex 2
+#define XkbKeypadIndex 3
+#define XkbLastRequiredType XkbKeypadIndex
+#define XkbNumRequiredTypes (XkbLastRequiredType+1)
+#define XkbMaxKeyTypes 255
+
+#define XkbOneLevelMask (1<<0)
+#define XkbTwoLevelMask (1<<1)
+#define XkbAlphabeticMask (1<<2)
+#define XkbKeypadMask (1<<3)
+#define XkbAllRequiredTypes (0xf)
+
+#define XkbShiftLevel(n) ((n)-1)
+#define XkbShiftLevelMask(n) (1<<((n)-1))
+
+ /*
+ * Extension name and version information
+ */
+#define XkbName "XKEYBOARD"
+#define XkbMajorVersion 1
+#define XkbMinorVersion 0
+
+ /*
+ * Explicit map components:
+ * - Used in the 'explicit' field of an XkbServerMap. Specifies
+ * the keyboard components that should _not_ be updated automatically
+ * in response to core protocol keyboard mapping requests.
+ */
+#define XkbExplicitKeyTypesMask (0x0f)
+#define XkbExplicitKeyType1Mask (1<<0)
+#define XkbExplicitKeyType2Mask (1<<1)
+#define XkbExplicitKeyType3Mask (1<<2)
+#define XkbExplicitKeyType4Mask (1<<3)
+#define XkbExplicitInterpretMask (1<<4)
+#define XkbExplicitAutoRepeatMask (1<<5)
+#define XkbExplicitBehaviorMask (1<<6)
+#define XkbExplicitVModMapMask (1<<7)
+#define XkbAllExplicitMask (0xff)
+
+ /*
+ * Map components masks:
+ * Those in AllMapComponentsMask:
+ * - Specifies the individual fields to be loaded or changed for the
+ * GetMap and SetMap requests.
+ * Those in ClientInfoMask:
+ * - Specifies the components to be allocated by XkbAllocClientMap.
+ * Those in ServerInfoMask:
+ * - Specifies the components to be allocated by XkbAllocServerMap.
+ */
+#define XkbKeyTypesMask (1<<0)
+#define XkbKeySymsMask (1<<1)
+#define XkbModifierMapMask (1<<2)
+#define XkbExplicitComponentsMask (1<<3)
+#define XkbKeyActionsMask (1<<4)
+#define XkbKeyBehaviorsMask (1<<5)
+#define XkbVirtualModsMask (1<<6)
+#define XkbVirtualModMapMask (1<<7)
+
+#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)
+#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)
+#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)
+
+ /*
+ * Symbol interpretations flags:
+ * - Used in the flags field of a symbol interpretation
+ */
+#define XkbSI_AutoRepeat (1<<0)
+#define XkbSI_LockingKey (1<<1)
+
+ /*
+ * Symbol interpretations match specification:
+ * - Used in the match field of a symbol interpretation to specify
+ * the conditions under which an interpretation is used.
+ */
+#define XkbSI_LevelOneOnly (0x80)
+#define XkbSI_OpMask (0x7f)
+#define XkbSI_NoneOf (0)
+#define XkbSI_AnyOfOrNone (1)
+#define XkbSI_AnyOf (2)
+#define XkbSI_AllOf (3)
+#define XkbSI_Exactly (4)
+
+ /*
+ * Indicator map flags:
+ * - Used in the flags field of an indicator map to indicate the
+ * conditions under which and indicator can be changed and the
+ * effects of changing the indicator.
+ */
+#define XkbIM_NoExplicit (1L << 7)
+#define XkbIM_NoAutomatic (1L << 6)
+#define XkbIM_LEDDrivesKB (1L << 5)
+
+ /*
+ * Indicator map component specifications:
+ * - Used by the 'which_groups' and 'which_mods' fields of an indicator
+ * map to specify which keyboard components should be used to drive
+ * the indicator.
+ */
+#define XkbIM_UseBase (1L << 0)
+#define XkbIM_UseLatched (1L << 1)
+#define XkbIM_UseLocked (1L << 2)
+#define XkbIM_UseEffective (1L << 3)
+#define XkbIM_UseCompat (1L << 4)
+
+#define XkbIM_UseNone 0
+#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\
+ |XkbIM_UseEffective)
+#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)
+
+ /*
+ * Compatibility Map Compontents:
+ * - Specifies the components to be allocated in XkbAllocCompatMap.
+ */
+#define XkbSymInterpMask (1<<0)
+#define XkbGroupCompatMask (1<<1)
+#define XkbAllCompatMask (0x3)
+
+ /*
+ * Names component mask:
+ * - Specifies the names to be loaded or changed for the GetNames and
+ * SetNames requests.
+ * - Specifies the names that have changed in a NamesNotify event.
+ * - Specifies the names components to be allocated by XkbAllocNames.
+ */
+#define XkbKeycodesNameMask (1<<0)
+#define XkbGeometryNameMask (1<<1)
+#define XkbSymbolsNameMask (1<<2)
+#define XkbPhysSymbolsNameMask (1<<3)
+#define XkbTypesNameMask (1<<4)
+#define XkbCompatNameMask (1<<5)
+#define XkbKeyTypeNamesMask (1<<6)
+#define XkbKTLevelNamesMask (1<<7)
+#define XkbIndicatorNamesMask (1<<8)
+#define XkbKeyNamesMask (1<<9)
+#define XkbKeyAliasesMask (1<<10)
+#define XkbVirtualModNamesMask (1<<11)
+#define XkbGroupNamesMask (1<<12)
+#define XkbRGNamesMask (1<<13)
+#define XkbComponentNamesMask (0x3f)
+#define XkbAllNamesMask (0x3fff)
+
+ /*
+ * GetByName components:
+ * - Specifies desired or necessary components to GetKbdByName request.
+ * - Reports the components that were found in a GetKbdByNameReply
+ */
+#define XkbGBN_TypesMask (1L << 0)
+#define XkbGBN_CompatMapMask (1L << 1)
+#define XkbGBN_ClientSymbolsMask (1L << 2)
+#define XkbGBN_ServerSymbolsMask (1L << 3)
+#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)
+#define XkbGBN_IndicatorMapMask (1L << 4)
+#define XkbGBN_KeyNamesMask (1L << 5)
+#define XkbGBN_GeometryMask (1L << 6)
+#define XkbGBN_OtherNamesMask (1L << 7)
+#define XkbGBN_AllComponentsMask (0xff)
+
+ /*
+ * ListComponents flags
+ */
+#define XkbLC_Hidden (1L << 0)
+#define XkbLC_Default (1L << 1)
+#define XkbLC_Partial (1L << 2)
+
+#define XkbLC_AlphanumericKeys (1L << 8)
+#define XkbLC_ModifierKeys (1L << 9)
+#define XkbLC_KeypadKeys (1L << 10)
+#define XkbLC_FunctionKeys (1L << 11)
+#define XkbLC_AlternateGroup (1L << 12)
+
+ /*
+ * X Input Extension Interactions
+ * - Specifies the possible interactions between XKB and the X input
+ * extension
+ * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
+ * XKB information about an extension device.
+ * - Reports the list of supported optional features in the reply to
+ * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
+ * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
+ * events to indicate an attempt to use an unsupported feature.
+ */
+#define XkbXI_KeyboardsMask (1L << 0)
+#define XkbXI_ButtonActionsMask (1L << 1)
+#define XkbXI_IndicatorNamesMask (1L << 2)
+#define XkbXI_IndicatorMapsMask (1L << 3)
+#define XkbXI_IndicatorStateMask (1L << 4)
+#define XkbXI_UnsupportedFeatureMask (1L << 15)
+#define XkbXI_AllFeaturesMask (0x001f)
+#define XkbXI_AllDeviceFeaturesMask (0x001e)
+
+#define XkbXI_IndicatorsMask (0x001c)
+#define XkbAllExtensionDeviceEventsMask (0x801f)
+
+ /*
+ * Per-Client Flags:
+ * - Specifies flags to be changed by the PerClientFlags request.
+ */
+#define XkbPCF_DetectableAutoRepeatMask (1L << 0)
+#define XkbPCF_GrabsUseXKBStateMask (1L << 1)
+#define XkbPCF_AutoResetControlsMask (1L << 2)
+#define XkbPCF_LookupStateWhenGrabbed (1L << 3)
+#define XkbPCF_SendEventUsesXKBState (1L << 4)
+#define XkbPCF_AllFlagsMask (0x1F)
+
+ /*
+ * Debugging flags and controls
+ */
+#define XkbDF_DisableLocks (1<<0)
+
+#endif /* _XKB_H_ */
diff --git a/X11/extensions/XKBbells.h b/X11/extensions/XKBbells.h
new file mode 100644
index 000000000..16a9275ea
--- /dev/null
+++ b/X11/extensions/XKBbells.h
@@ -0,0 +1,143 @@
+#ifndef _XKBBELLS_H_
+#define _XKBBELLS_H_ 1
+
+/* $Xorg: XKBbells.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+/* $XFree86$ */
+
+#define XkbBN_Info "Info"
+#define XkbBN_Warning "Warning"
+#define XkbBN_MinorError "MinorError"
+#define XkbBN_MajorError "MajorError"
+#define XkbBN_BadValue "BadValue"
+#define XkbBN_InvalidLocation "InvalidLocation"
+#define XkbBN_Question "Question"
+#define XkbBN_Start "Start"
+#define XkbBN_End "End"
+#define XkbBN_Success "Success"
+#define XkbBN_Failure "Failure"
+#define XkbBN_Wait "Wait"
+#define XkbBN_Proceed "Proceed"
+#define XkbBN_Ignore "Ignore"
+#define XkbBN_Iconify "Iconify"
+#define XkbBN_Deiconify "Deconify"
+#define XkbBN_Open "Open"
+#define XkbBN_Close "Close"
+#define XkbBN_TerminalBell "TerminalBell"
+#define XkbBN_MarginBell "MarginBell"
+#define XkbBN_CursorStuck "CursorStuck"
+#define XkbBN_NewMail "NewMail"
+#define XkbBN_LaunchApp "LaunchApp"
+#define XkbBN_AppDeath "AppDeath"
+#define XkbBN_ImAlive "ImAlive"
+#define XkbBN_ClockChimeHour "ClockChimeHour"
+#define XkbBN_ClockChimeHalf "ClockChimeHalf"
+#define XkbBN_ClockChimeQuarter "ClockChimeQuarter"
+#define XkbBN_RepeatingLastBell "RepeatingLastBell"
+#define XkbBN_ComposeFail "ComposeFail"
+#define XkbBN_AX_FeatureOn "AX_FeatureOn"
+#define XkbBN_AX_FeatureOff "AX_FeatureOff"
+#define XkbBN_AX_FeatureChange "AX_FeatureChange"
+#define XkbBN_AX_IndicatorOn "AX_IndicatorOn"
+#define XkbBN_AX_IndicatorOff "AX_IndicatorOff"
+#define XkbBN_AX_IndicatorChange "AX_IndicatorChange"
+#define XkbBN_AX_SlowKeysWarning "AX_SlowKeysWarning"
+#define XkbBN_AX_SlowKeyPress "AX_SlowKeyPress"
+#define XkbBN_AX_SlowKeyAccept "AX_SlowKeyAccept"
+#define XkbBN_AX_SlowKeyReject "AX_SlowKeyReject"
+#define XkbBN_AX_SlowKeyRelease "AX_SlowKeyRelease"
+#define XkbBN_AX_BounceKeyReject "AX_BounceKeyReject"
+#define XkbBN_AX_StickyLatch "AX_StickyLatch"
+#define XkbBN_AX_StickyLock "AX_StickyLock"
+#define XkbBN_AX_StickyUnlock "AX_StickyUnlock"
+
+#define XkbBI_Info 0
+#define XkbBI_Warning 1
+#define XkbBI_MinorError 2
+#define XkbBI_MajorError 3
+#define XkbBI_BadValue 4
+#define XkbBI_InvalidLocation 5
+#define XkbBI_Question 6
+#define XkbBI_Start 7
+#define XkbBI_End 8
+#define XkbBI_Success 9
+#define XkbBI_Failure 10
+#define XkbBI_Wait 11
+#define XkbBI_Proceed 12
+#define XkbBI_Ignore 13
+#define XkbBI_Iconify 14
+#define XkbBI_Deiconify 15
+#define XkbBI_Open 16
+#define XkbBI_Close 17
+#define XkbBI_TerminalBell 18
+#define XkbBI_MarginBell 19
+#define XkbBI_CursorStuck 20
+#define XkbBI_NewMail 21
+#define XkbBI_LaunchApp 22
+#define XkbBI_AppDeath 23
+#define XkbBI_ImAlive 24
+#define XkbBI_ClockChimeHour 25
+#define XkbBI_ClockChimeHalf 26
+#define XkbBI_ClockChimeQuarter 27
+#define XkbBI_RepeatingLastBell 28
+#define XkbBI_ComposeFail 29
+#define XkbBI_AX_FeatureOn 30
+#define XkbBI_AX_FeatureOff 31
+#define XkbBI_AX_FeatureChange 32
+#define XkbBI_AX_IndicatorOn 33
+#define XkbBI_AX_IndicatorOff 34
+#define XkbBI_AX_IndicatorChange 35
+#define XkbBI_AX_SlowKeysWarning 36
+#define XkbBI_AX_SlowKeyPress 37
+#define XkbBI_AX_SlowKeyAccept 38
+#define XkbBI_AX_SlowKeyReject 39
+#define XkbBI_AX_SlowKeyRelease 40
+#define XkbBI_AX_BounceKeyReject 41
+#define XkbBI_AX_StickyLatch 42
+#define XkbBI_AX_StickyLock 43
+#define XkbBI_AX_StickyUnlock 44
+#define XkbBI_NumBells 45
+
+_XFUNCPROTOBEGIN
+
+extern Bool XkbStdBell(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ int /* bellDef */
+);
+
+extern Bool XkbStdBellEvent(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ int /* bellDef */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBBELLS_H_ */
diff --git a/X11/extensions/XKBconfig.h b/X11/extensions/XKBconfig.h
new file mode 100644
index 000000000..fbc6a600e
--- /dev/null
+++ b/X11/extensions/XKBconfig.h
@@ -0,0 +1,280 @@
+#ifndef _XKBCONFIG_H_
+#define _XKBCONFIG_H_ 1
+
+/* $Xorg: XKBconfig.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+/* $XFree86: xc/lib/xkbfile/XKBconfig.h,v 3.5 2001/01/17 19:43:39 dawes Exp $ */
+
+
+typedef struct _XkbConfigRtrn *XkbConfigRtrnPtr;
+typedef struct _XkbConfigField *XkbConfigFieldPtr;
+typedef struct _XkbConfigFields *XkbConfigFieldsPtr;
+
+typedef Bool (*XkbConfigParseFunc)(
+ FILE * /* file */,
+ XkbConfigFieldsPtr /* fields */,
+ XkbConfigFieldPtr /* field */,
+ XkbDescPtr /* xkb */,
+ XkbConfigRtrnPtr /* rtrn */
+);
+
+#define XkbCF_Check 0
+#define XkbCF_Apply 1
+#define XkbCF_CleanUp 2
+#define XkbCF_Destroy 3
+
+typedef Bool (*XkbConfigFinishFunc)(
+ XkbConfigFieldsPtr /* fields */,
+ XkbDescPtr /* xkb */,
+ XkbConfigRtrnPtr /* rtrn */,
+ int /* what */
+);
+
+typedef struct _XkbConfigRtrnPriv {
+ int cfg_id;
+ XPointer priv;
+ struct _XkbConfigRtrnPriv * next;
+} XkbConfigRtrnPrivRec,*XkbConfigRtrnPrivPtr;
+
+typedef struct _XkbConfigModInfo {
+ Bool replace;
+ unsigned char mods;
+ unsigned char mods_clear;
+ unsigned short vmods;
+ unsigned short vmods_clear;
+} XkbConfigModInfoRec,*XkbConfigModInfoPtr;
+
+typedef struct _XkbConfigUnboundMod {
+ unsigned char what;
+ unsigned char mods;
+ unsigned short vmods;
+ short merge;
+ char * name;
+} XkbConfigUnboundModRec,*XkbConfigUnboundModPtr;
+
+#define XkbCF_MergeSet 0
+#define XkbCF_MergeAdd 1
+#define XkbCF_MergeRemove 2
+
+#define XkbCF_InitialMods (1L<<0)
+#define XkbCF_InternalMods (1L<<1)
+#define XkbCF_IgnoreLockMods (1L<<2)
+#define XkbCF_InitialCtrls (1L<<3)
+#define XkbCF_AccessXTimeout (1L<<4)
+#define XkbCF_AccessXTimeoutCtrlsOn (1L<<5)
+#define XkbCF_AccessXTimeoutCtrlsOff (1L<<6)
+#define XkbCF_AccessXTimeoutOptsOn (1L<<7)
+#define XkbCF_AccessXTimeoutOptsOff (1L<<8)
+#define XkbCF_GroupsWrap (1L<<9)
+#define XkbCF_InitialOpts (1L<<10)
+
+typedef struct _XkbConfigRtrn {
+ unsigned defined;
+ int error;
+ int line;
+
+ int click_volume;
+ int bell_volume;
+ int bell_pitch;
+ int bell_duration;
+ int repeat_delay;
+ int repeat_interval;
+
+ char * rules_file;
+ char * model;
+ char * layout;
+ char * variant;
+ char * options;
+
+ char * keymap;
+ char * keycodes;
+ char * geometry;
+ char * phys_symbols;
+ char * symbols;
+ char * types;
+ char * compat;
+
+ Bool replace_initial_ctrls;
+ unsigned long initial_ctrls;
+ unsigned long initial_ctrls_clear;
+
+ Bool replace_initial_opts;
+ unsigned short initial_opts;
+ unsigned short initial_opts_clear;
+
+ XkbConfigModInfoRec initial_mods;
+ XkbConfigModInfoRec internal_mods;
+ XkbConfigModInfoRec ignore_lock_mods;
+
+ short num_unbound_mods;
+ short sz_unbound_mods;
+ XkbConfigUnboundModPtr unbound_mods;
+
+ int groups_wrap;
+ int slow_keys_delay;
+ int debounce_delay;
+ int mk_delay;
+ int mk_interval;
+ int mk_time_to_max;
+ int mk_max_speed;
+ int mk_curve;
+ int ax_timeout;
+
+ Bool replace_axt_ctrls_on;
+ Bool replace_axt_ctrls_off;
+ unsigned long axt_ctrls_on;
+ unsigned long axt_ctrls_off;
+ unsigned long axt_ctrls_ignore;
+
+ Bool replace_axt_opts_off;
+ Bool replace_axt_opts_on;
+ unsigned short axt_opts_off;
+ unsigned short axt_opts_on;
+ unsigned short axt_opts_ignore;
+ XkbConfigRtrnPrivPtr priv;
+} XkbConfigRtrnRec;
+
+typedef struct _XkbConfigField {
+ char * field;
+ unsigned char field_id;
+} XkbConfigFieldRec;
+
+typedef struct _XkbConfigFields {
+ unsigned short cfg_id;
+ unsigned short num_fields;
+ XkbConfigFieldPtr fields;
+ XkbConfigParseFunc parser;
+ XkbConfigFinishFunc finish;
+ XPointer priv;
+ struct _XkbConfigFields *next;
+} XkbConfigFieldsRec;
+
+#define XkbCF_EOF -1
+#define XkbCF_Unknown 0
+#define XkbCF_EOL 1
+#define XkbCF_Semi 2
+#define XkbCF_Equals 3
+#define XkbCF_PlusEquals 4
+#define XkbCF_MinusEquals 5
+#define XkbCF_Plus 6
+#define XkbCF_Minus 7
+#define XkbCF_String 10
+#define XkbCF_Ident 11
+#define XkbCF_Integer 12
+
+#define XkbCF_UnterminatedString 100
+#define XkbCF_BadAlloc 101
+#define XkbCF_MissingIdent 102
+#define XkbCF_MissingEquals 103
+#define XkbCF_ExpectedEOS 104
+#define XkbCF_ExpectedBoolean 105
+#define XkbCF_ExpectedInteger 106
+#define XkbCF_ExpectedString 107
+#define XkbCF_ExpectedModifier 108
+#define XkbCF_ExpectedControl 109
+#define XkbCF_ExpectedAXOption 110
+#define XkbCF_ExpectedOperator 111
+#define XkbCF_ExpectedOORGroupBehavior 112
+
+typedef union {
+ int ival;
+ char * str;
+} XkbCFScanResultRec,*XkbCFScanResultPtr;
+
+extern XkbConfigFieldsPtr XkbCFDflts;
+
+_XFUNCPROTOBEGIN
+
+extern int XkbCFScan(
+ FILE * /* file */,
+ XkbCFScanResultPtr /* val_rtrn */,
+ XkbConfigRtrnPtr /* rtrn */
+);
+
+extern XkbConfigFieldsPtr XkbCFDup(
+ XkbConfigFieldsPtr /* fields */
+);
+
+extern XkbConfigFieldsPtr XkbCFFree(
+ XkbConfigFieldsPtr /* fields */,
+ Bool /* all */
+);
+
+extern XkbConfigUnboundModPtr XkbCFAddModByName(
+ XkbConfigRtrnPtr /* rtrn */,
+ int /* what */,
+ char * /* name */,
+ Bool /* merge */,
+ XkbConfigUnboundModPtr /* last */
+);
+
+extern Bool XkbCFBindMods(
+ XkbConfigRtrnPtr /* rtrn */,
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbCFApplyMods(
+ XkbConfigRtrnPtr /* rtrn */,
+ int /* what */,
+ XkbConfigModInfoPtr /* info */
+);
+
+extern Bool XkbCFApplyRtrnValues(
+ XkbConfigRtrnPtr /* rtrn */,
+ XkbConfigFieldsPtr /* fields */,
+ XkbDescPtr /* xkb */
+);
+
+extern XkbConfigRtrnPrivPtr XkbCFAddPrivate(
+ XkbConfigRtrnPtr /* rtrn */,
+ XkbConfigFieldsPtr /* fields */,
+ XPointer /* ptr */
+);
+
+extern void XkbCFFreeRtrn(
+ XkbConfigRtrnPtr /* rtrn */,
+ XkbConfigFieldsPtr /* fields */,
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbCFParse(
+ FILE * /* file */,
+ XkbConfigFieldsPtr /* fields */,
+ XkbDescPtr /* xkb */,
+ XkbConfigRtrnPtr /* rtrn */
+);
+
+extern void XkbCFReportError(
+ FILE * /* file */,
+ char * /* name */,
+ int /* error */,
+ int /* line */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBCONFIG_H_ */
diff --git a/X11/extensions/XKBfile.h b/X11/extensions/XKBfile.h
new file mode 100644
index 000000000..bbd7e6fcd
--- /dev/null
+++ b/X11/extensions/XKBfile.h
@@ -0,0 +1,494 @@
+/* $XFree86: xc/lib/xkbfile/XKBfile.h,v 3.6 2003/10/24 16:33:09 tsi Exp $ */
+
+#ifndef _XKBFILE_H_
+#define _XKBFILE_H_ 1
+
+/* $Xorg: XKBfile.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+/***====================================================================***/
+
+#define XkbXKMFile 0
+#define XkbCFile 1
+#define XkbXKBFile 2
+#define XkbMessage 3
+
+#define XkbMapDefined (1<<0)
+#define XkbStateDefined (1<<1)
+
+typedef struct _XkbFileInfo {
+ unsigned type;
+ unsigned defined;
+ XkbDescPtr xkb;
+} XkbFileInfo,*XkbFileInfoPtr;
+
+typedef void (*XkbFileAddOnFunc)(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ int /* fileSection */,
+ void * /* priv */
+);
+
+/***====================================================================***/
+
+#define _XkbSuccess 0
+#define _XkbErrMissingNames 1
+#define _XkbErrMissingTypes 2
+#define _XkbErrMissingReqTypes 3
+#define _XkbErrMissingSymbols 4
+#define _XkbErrMissingVMods 5
+#define _XkbErrMissingIndicators 6
+#define _XkbErrMissingCompatMap 7
+#define _XkbErrMissingSymInterps 8
+#define _XkbErrMissingGeometry 9
+#define _XkbErrIllegalDoodad 10
+#define _XkbErrIllegalTOCType 11
+#define _XkbErrIllegalContents 12
+#define _XkbErrEmptyFile 13
+#define _XkbErrFileNotFound 14
+#define _XkbErrFileCannotOpen 15
+#define _XkbErrBadValue 16
+#define _XkbErrBadMatch 17
+#define _XkbErrBadTypeName 18
+#define _XkbErrBadTypeWidth 19
+#define _XkbErrBadFileType 20
+#define _XkbErrBadFileVersion 21
+#define _XkbErrBadFileFormat 22
+#define _XkbErrBadAlloc 23
+#define _XkbErrBadLength 24
+#define _XkbErrXReqFailure 25
+#define _XkbErrBadImplementation 26
+
+extern char * _XkbErrMessages[];
+extern unsigned _XkbErrCode;
+extern char * _XkbErrLocation;
+extern unsigned _XkbErrData;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern char * XkbIndentText(
+ unsigned /* size */
+);
+
+extern char * XkbAtomText(
+ Display * /* dpy */,
+ Atom /* atm */,
+ unsigned /* format */
+);
+
+extern char * XkbKeysymText(
+ KeySym /* sym */,
+ unsigned /* format */
+);
+
+extern char * XkbStringText(
+ char * /* str */,
+ unsigned /* format */
+);
+
+extern char * XkbKeyNameText(
+ char * /* name */,
+ unsigned /* format */
+);
+
+extern char *
+XkbModIndexText(
+ unsigned /* ndx */,
+ unsigned /* format */
+);
+
+extern char *
+XkbModMaskText(
+ unsigned /* mask */,
+ unsigned /* format */
+);
+
+extern char * XkbVModIndexText(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ unsigned /* ndx */,
+ unsigned /* format */
+);
+
+extern char * XkbVModMaskText(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ unsigned /* modMask */,
+ unsigned /* mask */,
+ unsigned /* format */
+);
+
+extern char * XkbConfigText(
+ unsigned /* config */,
+ unsigned /* format */
+);
+
+extern char * XkbSIMatchText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbIMWhichStateMaskText(
+ unsigned /* use_which */,
+ unsigned /* format */
+);
+
+extern char * XkbAccessXDetailText(
+ unsigned /* state */,
+ unsigned /* format */
+);
+
+extern char * XkbNKNDetailMaskText(
+ unsigned /* detail */,
+ unsigned /* format */
+);
+
+extern char * XkbControlsMaskText(
+ unsigned /* ctrls */,
+ unsigned /* format */
+);
+
+extern char * XkbGeomFPText(
+ int /* val */,
+ unsigned /* format */
+);
+
+extern char * XkbDoodadTypeText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbActionTypeText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbActionText(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbAction * /* action */,
+ unsigned /* format */
+);
+
+extern char * XkbBehaviorText(
+ XkbDescPtr /* xkb */,
+ XkbBehavior * /* behavior */,
+ unsigned /* format */
+);
+
+/***====================================================================***/
+
+#define _XkbKSLower (1<<0)
+#define _XkbKSUpper (1<<1)
+
+#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower)
+#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper)
+#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
+#define XkbKSIsDeadKey(k) \
+ (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
+
+extern unsigned _XkbKSCheckCase(
+ KeySym /* sym */
+);
+
+extern int XkbFindKeycodeByName(
+ XkbDescPtr /* xkb */,
+ char * /* name */,
+ Bool /* use_aliases */
+);
+
+extern Bool XkbLookupGroupAndLevel(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int * /* mods_inout */,
+ int * /* grp_inout */,
+ int * /* lvl_rtrn */
+);
+
+/***====================================================================***/
+
+#ifndef XKB_IN_SERVER
+
+extern Bool XkbLookupCanonicalRGBColor(
+ char * /* def */,
+ XColor * /* color */
+);
+
+#endif
+
+/***====================================================================***/
+
+extern char * XkbAtomGetString(
+ Display * /* dpy */,
+ Atom /* atm */
+);
+
+extern Atom XkbInternAtom(
+ Display * /* dpy */,
+ char * /* name */,
+ Bool /* onlyIfExists */
+);
+
+extern Status XkbChangeKbdDisplay(
+ Display * /* newDpy */,
+ XkbFileInfo * /* result */
+);
+
+extern Atom XkbChangeAtomDisplay(
+ Display * /* oldDpy */,
+ Display * /* newDpy */,
+ Atom /* atm */
+);
+
+extern void XkbInitAtoms(
+ Display * /* dpy */
+);
+
+/***====================================================================***/
+
+#ifdef _XKBGEOM_H_
+
+#define XkbDW_Unknown 0
+#define XkbDW_Doodad 1
+#define XkbDW_Section 2
+typedef struct _XkbDrawable {
+ int type;
+ int priority;
+ union {
+ XkbDoodadPtr doodad;
+ XkbSectionPtr section;
+ } u;
+ struct _XkbDrawable * next;
+} XkbDrawableRec,*XkbDrawablePtr;
+
+extern XkbDrawablePtr
+XkbGetOrderedDrawables(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */
+);
+
+extern void
+XkbFreeOrderedDrawables(
+ XkbDrawablePtr /* draw */
+);
+
+#endif
+
+/***====================================================================***/
+
+extern unsigned XkbConvertGetByNameComponents(
+ Bool /* toXkm */,
+ unsigned /* orig */
+);
+
+extern unsigned XkbConvertXkbComponents(
+ Bool /* toXkm */,
+ unsigned /* orig */
+);
+
+extern Bool XkbDetermineFileType(
+ XkbFileInfo * /* xkb */,
+ int /* format */,
+ int * /* opts_missing */
+);
+
+extern Bool XkbNameMatchesPattern(
+ char * /* name */,
+ char * /* pattern */
+);
+
+/***====================================================================***/
+
+extern Bool XkbWriteXKBKeycodes(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBKeyTypes(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBCompatMap(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBSymbols(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBGeometry(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBSemantics(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBLayout(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBKeymap(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBFile(
+ FILE * /* file */,
+ XkbFileInfo * /* result */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteCFile(
+ FILE * /* file */,
+ char * /* name */,
+ XkbFileInfo * /* info */
+);
+
+extern Bool XkbWriteXKMFile(
+ FILE * /* file */,
+ XkbFileInfo * /* result */
+);
+
+extern Bool XkbWriteToServer(
+ XkbFileInfo * /* result */
+);
+
+extern void XkbEnsureSafeMapName(
+ char * /* name */
+);
+
+extern Bool XkbWriteXKBKeymapForNames(
+ FILE * /* file */,
+ XkbComponentNamesPtr /* names */,
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ unsigned /* want */,
+ unsigned /* need */
+);
+
+extern Status XkbMergeFile(
+ XkbDescPtr /* xkb */,
+ XkbFileInfo /* finfo */
+);
+
+/***====================================================================***/
+
+extern Bool XkmProbe(
+ FILE * /* file */
+);
+
+extern unsigned XkbReadFromServer(
+ Display * /* dpy */,
+ unsigned /* need */,
+ unsigned /* want */,
+ XkbFileInfo * /* result */
+);
+
+extern unsigned XkmReadFile(
+ FILE * /* file */,
+ unsigned /* need */,
+ unsigned /* want */,
+ XkbFileInfo * /* result */
+);
+
+#ifdef _XKMFORMAT_H_
+
+extern Bool XkmReadTOC(
+ FILE * /* file */,
+ xkmFileInfo * /* file_info */,
+ int /* max_toc */,
+ xkmSectionInfo * /* toc */
+);
+
+extern xkmSectionInfo *XkmFindTOCEntry(
+ xkmFileInfo * /* finfo */,
+ xkmSectionInfo * /* toc */,
+ unsigned /* type */
+);
+
+extern Bool XkmReadFileSection(
+ FILE * /* file */,
+ xkmSectionInfo * /* toc */,
+ XkbFileInfo * /* result */,
+ unsigned * /* loaded_rtrn */
+);
+
+extern char * XkmReadFileSectionName(
+ FILE * /* file */,
+ xkmSectionInfo * /* toc */
+);
+
+#endif /* _XKMFORMAT_H */
+
+_XFUNCPROTOEND
+
+#endif /* _XKBFILE_H_ */
diff --git a/X11/extensions/XKBgeom.h b/X11/extensions/XKBgeom.h
new file mode 100644
index 000000000..89f902fba
--- /dev/null
+++ b/X11/extensions/XKBgeom.h
@@ -0,0 +1,659 @@
+/* $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $ */
+
+#ifndef _XKBGEOM_H_
+#define _XKBGEOM_H_
+
+#include <X11/extensions/XKBstr.h>
+
+#ifdef XKB_IN_SERVER
+#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias
+#define XkbAddGeomColor SrvXkbAddGeomColor
+#define XkbAddGeomDoodad SrvXkbAddGeomDoodad
+#define XkbAddGeomKey SrvXkbAddGeomKey
+#define XkbAddGeomOutline SrvXkbAddGeomOutline
+#define XkbAddGeomOverlay SrvXkbAddGeomOverlay
+#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow
+#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey
+#define XkbAddGeomProperty SrvXkbAddGeomProperty
+#define XkbAddGeomRow SrvXkbAddGeomRow
+#define XkbAddGeomSection SrvXkbAddGeomSection
+#define XkbAddGeomShape SrvXkbAddGeomShape
+#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases
+#define XkbAllocGeomColors SrvXkbAllocGeomColors
+#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads
+#define XkbAllocGeomKeys SrvXkbAllocGeomKeys
+#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines
+#define XkbAllocGeomPoints SrvXkbAllocGeomPoints
+#define XkbAllocGeomProps SrvXkbAllocGeomProps
+#define XkbAllocGeomRows SrvXkbAllocGeomRows
+#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads
+#define XkbAllocGeomSections SrvXkbAllocGeomSections
+#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays
+#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows
+#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys
+#define XkbAllocGeomShapes SrvXkbAllocGeomShapes
+#define XkbAllocGeometry SrvXkbAllocGeometry
+#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases
+#define XkbFreeGeomColors SrvXkbFreeGeomColors
+#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads
+#define XkbFreeGeomProperties SrvXkbFreeGeomProperties
+#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys
+#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows
+#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays
+#define XkbFreeGeomKeys SrvXkbFreeGeomKeys
+#define XkbFreeGeomRows SrvXkbFreeGeomRows
+#define XkbFreeGeomSections SrvXkbFreeGeomSections
+#define XkbFreeGeomPoints SrvXkbFreeGeomPoints
+#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines
+#define XkbFreeGeomShapes SrvXkbFreeGeomShapes
+#define XkbFreeGeometry SrvXkbFreeGeometry
+#endif
+
+typedef struct _XkbProperty {
+ char *name;
+ char *value;
+} XkbPropertyRec,*XkbPropertyPtr;
+
+typedef struct _XkbColor {
+ unsigned int pixel;
+ char * spec;
+} XkbColorRec,*XkbColorPtr;
+
+typedef struct _XkbPoint {
+ short x;
+ short y;
+} XkbPointRec, *XkbPointPtr;
+
+typedef struct _XkbBounds {
+ short x1,y1;
+ short x2,y2;
+} XkbBoundsRec, *XkbBoundsPtr;
+#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
+#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
+
+typedef struct _XkbOutline {
+ unsigned short num_points;
+ unsigned short sz_points;
+ unsigned short corner_radius;
+ XkbPointPtr points;
+} XkbOutlineRec, *XkbOutlinePtr;
+
+typedef struct _XkbShape {
+ Atom name;
+ unsigned short num_outlines;
+ unsigned short sz_outlines;
+ XkbOutlinePtr outlines;
+ XkbOutlinePtr approx;
+ XkbOutlinePtr primary;
+ XkbBoundsRec bounds;
+} XkbShapeRec, *XkbShapePtr;
+#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
+
+typedef struct _XkbShapeDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short color_ndx;
+ unsigned short shape_ndx;
+} XkbShapeDoodadRec, *XkbShapeDoodadPtr;
+#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbTextDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ short width;
+ short height;
+ unsigned short color_ndx;
+ char * text;
+ char * font;
+} XkbTextDoodadRec, *XkbTextDoodadPtr;
+#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbIndicatorDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short shape_ndx;
+ unsigned short on_color_ndx;
+ unsigned short off_color_ndx;
+} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr;
+#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
+#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
+#define XkbSetIndicatorDoodadOnColor(g,d,c) \
+ ((d)->on_color_ndx= (c)-&(g)->colors[0])
+#define XkbSetIndicatorDoodadOffColor(g,d,c) \
+ ((d)->off_color_ndx= (c)-&(g)->colors[0])
+#define XkbSetIndicatorDoodadShape(g,d,s) \
+ ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbLogoDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short color_ndx;
+ unsigned short shape_ndx;
+ char * logo_name;
+} XkbLogoDoodadRec, *XkbLogoDoodadPtr;
+#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbAnyDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+} XkbAnyDoodadRec, *XkbAnyDoodadPtr;
+
+typedef union _XkbDoodad {
+ XkbAnyDoodadRec any;
+ XkbShapeDoodadRec shape;
+ XkbTextDoodadRec text;
+ XkbIndicatorDoodadRec indicator;
+ XkbLogoDoodadRec logo;
+} XkbDoodadRec, *XkbDoodadPtr;
+
+#define XkbUnknownDoodad 0
+#define XkbOutlineDoodad 1
+#define XkbSolidDoodad 2
+#define XkbTextDoodad 3
+#define XkbIndicatorDoodad 4
+#define XkbLogoDoodad 5
+
+typedef struct _XkbKey {
+ XkbKeyNameRec name;
+ short gap;
+ unsigned char shape_ndx;
+ unsigned char color_ndx;
+} XkbKeyRec, *XkbKeyPtr;
+#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
+#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
+#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
+#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbRow {
+ short top;
+ short left;
+ unsigned short num_keys;
+ unsigned short sz_keys;
+ int vertical;
+ XkbKeyPtr keys;
+ XkbBoundsRec bounds;
+} XkbRowRec, *XkbRowPtr;
+
+typedef struct _XkbSection {
+ Atom name;
+ unsigned char priority;
+ short top;
+ short left;
+ unsigned short width;
+ unsigned short height;
+ short angle;
+ unsigned short num_rows;
+ unsigned short num_doodads;
+ unsigned short num_overlays;
+ unsigned short sz_rows;
+ unsigned short sz_doodads;
+ unsigned short sz_overlays;
+ XkbRowPtr rows;
+ XkbDoodadPtr doodads;
+ XkbBoundsRec bounds;
+ struct _XkbOverlay *overlays;
+} XkbSectionRec, *XkbSectionPtr;
+
+typedef struct _XkbOverlayKey {
+ XkbKeyNameRec over;
+ XkbKeyNameRec under;
+} XkbOverlayKeyRec,*XkbOverlayKeyPtr;
+
+typedef struct _XkbOverlayRow {
+ unsigned short row_under;
+ unsigned short num_keys;
+ unsigned short sz_keys;
+ XkbOverlayKeyPtr keys;
+} XkbOverlayRowRec,*XkbOverlayRowPtr;
+
+typedef struct _XkbOverlay {
+ Atom name;
+ XkbSectionPtr section_under;
+ unsigned short num_rows;
+ unsigned short sz_rows;
+ XkbOverlayRowPtr rows;
+ XkbBoundsPtr bounds;
+} XkbOverlayRec,*XkbOverlayPtr;
+
+typedef struct _XkbGeometry {
+ Atom name;
+ unsigned short width_mm;
+ unsigned short height_mm;
+ char * label_font;
+ XkbColorPtr label_color;
+ XkbColorPtr base_color;
+ unsigned short sz_properties;
+ unsigned short sz_colors;
+ unsigned short sz_shapes;
+ unsigned short sz_sections;
+ unsigned short sz_doodads;
+ unsigned short sz_key_aliases;
+ unsigned short num_properties;
+ unsigned short num_colors;
+ unsigned short num_shapes;
+ unsigned short num_sections;
+ unsigned short num_doodads;
+ unsigned short num_key_aliases;
+ XkbPropertyPtr properties;
+ XkbColorPtr colors;
+ XkbShapePtr shapes;
+ XkbSectionPtr sections;
+ XkbDoodadPtr doodads;
+ XkbKeyAliasPtr key_aliases;
+} XkbGeometryRec;
+#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
+
+#define XkbGeomPropertiesMask (1<<0)
+#define XkbGeomColorsMask (1<<1)
+#define XkbGeomShapesMask (1<<2)
+#define XkbGeomSectionsMask (1<<3)
+#define XkbGeomDoodadsMask (1<<4)
+#define XkbGeomKeyAliasesMask (1<<5)
+#define XkbGeomAllMask (0x3f)
+
+typedef struct _XkbGeometrySizes {
+ unsigned int which;
+ unsigned short num_properties;
+ unsigned short num_colors;
+ unsigned short num_shapes;
+ unsigned short num_sections;
+ unsigned short num_doodads;
+ unsigned short num_key_aliases;
+} XkbGeometrySizesRec,*XkbGeometrySizesPtr;
+
+_XFUNCPROTOBEGIN
+
+extern XkbPropertyPtr
+XkbAddGeomProperty(
+ XkbGeometryPtr /* geom */,
+ char * /* name */,
+ char * /* value */
+);
+
+extern XkbKeyAliasPtr
+XkbAddGeomKeyAlias(
+ XkbGeometryPtr /* geom */,
+ char * /* alias */,
+ char * /* real */
+);
+
+extern XkbColorPtr
+XkbAddGeomColor(
+ XkbGeometryPtr /* geom */,
+ char * /* spec */,
+ unsigned int /* pixel */
+);
+
+extern XkbOutlinePtr
+XkbAddGeomOutline(
+ XkbShapePtr /* shape */,
+ int /* sz_points */
+);
+
+extern XkbShapePtr
+XkbAddGeomShape(
+ XkbGeometryPtr /* geom */,
+ Atom /* name */,
+ int /* sz_outlines */
+);
+
+extern XkbKeyPtr
+XkbAddGeomKey(
+ XkbRowPtr /* row */
+);
+
+extern XkbRowPtr
+XkbAddGeomRow(
+ XkbSectionPtr /* section */,
+ int /* sz_keys */
+);
+
+extern XkbSectionPtr
+XkbAddGeomSection(
+ XkbGeometryPtr /* geom */,
+ Atom /* name */,
+ int /* sz_rows */,
+ int /* sz_doodads */,
+ int /* sz_overlays */
+);
+
+extern XkbOverlayPtr
+XkbAddGeomOverlay(
+ XkbSectionPtr /* section */,
+ Atom /* name */,
+ int /* sz_rows */
+);
+
+extern XkbOverlayRowPtr
+XkbAddGeomOverlayRow(
+ XkbOverlayPtr /* overlay */,
+ int /* row_under */,
+ int /* sz_keys */
+);
+
+extern XkbOverlayKeyPtr
+XkbAddGeomOverlayKey(
+ XkbOverlayPtr /* overlay */,
+ XkbOverlayRowPtr /* row */,
+ char * /* over */,
+ char * /* under */
+);
+
+extern XkbDoodadPtr
+XkbAddGeomDoodad(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */,
+ Atom /* name */
+);
+
+
+extern void
+XkbFreeGeomKeyAliases(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomColors(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomDoodads(
+ XkbDoodadPtr /* doodads */,
+ int /* nDoodads */,
+ Bool /* freeAll */
+);
+
+
+extern void
+XkbFreeGeomProperties(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayKeys(
+ XkbOverlayRowPtr /* row */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayRows(
+ XkbOverlayPtr /* overlay */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlays(
+ XkbSectionPtr /* section */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomKeys(
+ XkbRowPtr /* row */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomRows(
+ XkbSectionPtr /* section */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomSections(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+
+extern void
+XkbFreeGeomPoints(
+ XkbOutlinePtr /* outline */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOutlines(
+ XkbShapePtr /* shape */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomShapes(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeometry(
+ XkbGeometryPtr /* geom */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status
+XkbAllocGeomProps(
+ XkbGeometryPtr /* geom */,
+ int /* nProps */
+);
+
+extern Status
+XkbAllocGeomKeyAliases(
+ XkbGeometryPtr /* geom */,
+ int /* nAliases */
+);
+
+extern Status
+XkbAllocGeomColors(
+ XkbGeometryPtr /* geom */,
+ int /* nColors */
+);
+
+extern Status
+XkbAllocGeomShapes(
+ XkbGeometryPtr /* geom */,
+ int /* nShapes */
+);
+
+extern Status
+XkbAllocGeomSections(
+ XkbGeometryPtr /* geom */,
+ int /* nSections */
+);
+
+extern Status
+XkbAllocGeomOverlays(
+ XkbSectionPtr /* section */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayRows(
+ XkbOverlayPtr /* overlay */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayKeys(
+ XkbOverlayRowPtr /* row */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomDoodads(
+ XkbGeometryPtr /* geom */,
+ int /* nDoodads */
+);
+
+extern Status
+XkbAllocGeomSectionDoodads(
+ XkbSectionPtr /* section */,
+ int /* nDoodads */
+);
+
+extern Status
+XkbAllocGeomOutlines(
+ XkbShapePtr /* shape */,
+ int /* nOL */
+);
+
+extern Status
+XkbAllocGeomRows(
+ XkbSectionPtr /* section */,
+ int /* nRows */
+);
+
+extern Status
+XkbAllocGeomPoints(
+ XkbOutlinePtr /* ol */,
+ int /* nPts */
+);
+
+extern Status
+XkbAllocGeomKeys(
+ XkbRowPtr /* row */,
+ int /* nKeys */
+);
+
+extern Status
+XkbAllocGeometry(
+ XkbDescPtr /* xkb */,
+ XkbGeometrySizesPtr /* sizes */
+);
+
+extern Status
+XkbSetGeometry(
+ Display * /* dpy */,
+ unsigned /* deviceSpec */,
+ XkbGeometryPtr /* geom */
+);
+
+extern Bool
+XkbComputeShapeTop(
+ XkbShapePtr /* shape */,
+ XkbBoundsPtr /* bounds */
+);
+
+extern Bool
+XkbComputeShapeBounds(
+ XkbShapePtr /* shape */
+);
+
+extern Bool
+XkbComputeRowBounds(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */,
+ XkbRowPtr /* row */
+);
+
+extern Bool
+XkbComputeSectionBounds(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */
+);
+
+extern char *
+XkbFindOverlayForKey(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* wanted */,
+ char * /* under */
+);
+
+extern Status
+XkbGetGeometry(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status
+XkbGetNamedGeometry(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ Atom /* name */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBSTR_H_ */
diff --git a/X11/extensions/XKBproto.h b/X11/extensions/XKBproto.h
new file mode 100644
index 000000000..97dd4d262
--- /dev/null
+++ b/X11/extensions/XKBproto.h
@@ -0,0 +1,1282 @@
+/* $Xorg: XKBproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBPROTO_H_
+#define _XKBPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/XKB.h>
+
+#define Window CARD32
+#define Atom CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define XkbPaddedSize(n) ((((unsigned int)(n)+3) >> 2) << 2)
+
+typedef struct _xkbUseExtension {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBUseExtension */
+ CARD16 length B16;
+ CARD16 wantedMajor B16;
+ CARD16 wantedMinor B16;
+} xkbUseExtensionReq;
+#define sz_xkbUseExtensionReq 8
+
+typedef struct _xkbUseExtensionReply {
+ BYTE type; /* X_Reply */
+ BOOL supported;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 serverMajor B16;
+ CARD16 serverMinor B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbUseExtensionReply;
+#define sz_xkbUseExtensionReply 32
+
+typedef struct _xkbSelectEvents {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBSelectEvents */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 affectWhich B16;
+ CARD16 clear B16;
+ CARD16 selectAll B16;
+ CARD16 affectMap B16;
+ CARD16 map B16;
+} xkbSelectEventsReq;
+#define sz_xkbSelectEventsReq 16
+
+typedef struct _xkbBell {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBBell */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 bellClass B16;
+ CARD16 bellID B16;
+ INT8 percent;
+ BOOL forceSound;
+ BOOL eventOnly;
+ CARD8 pad1;
+ INT16 pitch B16;
+ INT16 duration B16;
+ CARD16 pad2 B16;
+ Atom name B32;
+ Window window B32;
+} xkbBellReq;
+#define sz_xkbBellReq 28
+
+typedef struct _xkbGetState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+} xkbGetStateReq;
+#define sz_xkbGetStateReq 8
+
+typedef struct _xkbGetStateReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 mods;
+ CARD8 baseMods;
+ CARD8 latchedMods;
+ CARD8 lockedMods;
+ CARD8 group;
+ CARD8 lockedGroup;
+ INT16 baseGroup B16;
+ INT16 latchedGroup B16;
+ CARD8 compatState;
+ CARD8 grabMods;
+ CARD8 compatGrabMods;
+ CARD8 lookupMods;
+ CARD8 compatLookupMods;
+ CARD8 pad1;
+ CARD16 ptrBtnState B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+} xkbGetStateReply;
+#define sz_xkbGetStateReply 32
+
+typedef struct _xkbLatchLockState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBLatchLockState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 affectModLocks;
+ CARD8 modLocks;
+ BOOL lockGroup;
+ CARD8 groupLock;
+ CARD8 affectModLatches;
+ CARD8 modLatches;
+ CARD8 pad;
+ BOOL latchGroup;
+ INT16 groupLatch B16;
+} xkbLatchLockStateReq;
+#define sz_xkbLatchLockStateReq 16
+
+typedef struct _xkbGetControls {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetControls */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+} xkbGetControlsReq;
+#define sz_xkbGetControlsReq 8
+
+typedef struct _xkbGetControlsReply {
+ BYTE type; /* X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 mkDfltBtn;
+ CARD8 numGroups;
+ CARD8 groupsWrap;
+ CARD8 internalMods;
+ CARD8 ignoreLockMods;
+ CARD8 internalRealMods;
+ CARD8 ignoreLockRealMods;
+ CARD8 pad1;
+ CARD16 internalVMods B16;
+ CARD16 ignoreLockVMods B16;
+ CARD16 repeatDelay B16;
+ CARD16 repeatInterval B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD16 mkDelay B16;
+ CARD16 mkInterval B16;
+ CARD16 mkTimeToMax B16;
+ CARD16 mkMaxSpeed B16;
+ INT16 mkCurve B16;
+ CARD16 axOptions B16;
+ CARD16 axTimeout B16;
+ CARD16 axtOptsMask B16;
+ CARD16 axtOptsValues B16;
+ CARD16 pad2 B16;
+ CARD32 axtCtrlsMask B32;
+ CARD32 axtCtrlsValues B32;
+ CARD32 enabledCtrls B32;
+ BYTE perKeyRepeat[XkbPerKeyBitArraySize];
+} xkbGetControlsReply;
+#define sz_xkbGetControlsReply 92
+
+typedef struct _xkbSetControls {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetControls */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 affectInternalMods;
+ CARD8 internalMods;
+ CARD8 affectIgnoreLockMods;
+ CARD8 ignoreLockMods;
+ CARD16 affectInternalVMods B16;
+ CARD16 internalVMods B16;
+ CARD16 affectIgnoreLockVMods B16;
+ CARD16 ignoreLockVMods B16;
+ CARD8 mkDfltBtn;
+ CARD8 groupsWrap;
+ CARD16 axOptions B16;
+ CARD16 pad1 B16;
+ CARD32 affectEnabledCtrls B32;
+ CARD32 enabledCtrls B32;
+ CARD32 changeCtrls B32;
+ CARD16 repeatDelay B16;
+ CARD16 repeatInterval B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD16 mkDelay B16;
+ CARD16 mkInterval B16;
+ CARD16 mkTimeToMax B16;
+ CARD16 mkMaxSpeed B16;
+ INT16 mkCurve B16;
+ CARD16 axTimeout B16;
+ CARD32 axtCtrlsMask B32;
+ CARD32 axtCtrlsValues B32;
+ CARD16 axtOptsMask B16;
+ CARD16 axtOptsValues B16;
+ BYTE perKeyRepeat[XkbPerKeyBitArraySize];
+} xkbSetControlsReq;
+#define sz_xkbSetControlsReq 100
+
+typedef struct _xkbKTMapEntryWireDesc {
+ BOOL active;
+ CARD8 mask;
+ CARD8 level;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD16 pad B16;
+} xkbKTMapEntryWireDesc;
+#define sz_xkbKTMapEntryWireDesc 8
+
+typedef struct _xkbKTSetMapEntryWireDesc {
+ CARD8 level;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+} xkbKTSetMapEntryWireDesc;
+#define sz_xkbKTSetMapEntryWireDesc 4
+
+typedef struct _xkbModsWireDesc {
+ CARD8 mask; /* GetMap only */
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+} xkbModsWireDesc;
+#define sz_xkbModsWireDesc 4
+
+typedef struct _xkbKeyTypeWireDesc {
+ CARD8 mask;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD8 numLevels;
+ CARD8 nMapEntries;
+ BOOL preserve;
+ CARD8 pad;
+} xkbKeyTypeWireDesc;
+#define sz_xkbKeyTypeWireDesc 8
+
+typedef struct _xkbSymMapWireDesc {
+ CARD8 ktIndex[XkbNumKbdGroups];
+ CARD8 groupInfo;
+ CARD8 width;
+ CARD16 nSyms B16;
+} xkbSymMapWireDesc;
+#define sz_xkbSymMapWireDesc 8
+
+typedef struct _xkbVModMapWireDesc {
+ KeyCode key;
+ CARD8 pad;
+ CARD16 vmods B16;
+} xkbVModMapWireDesc;
+#define sz_xkbVModMapWireDesc 4
+
+typedef struct _xkbBehaviorWireDesc {
+ CARD8 key;
+ CARD8 type;
+ CARD8 data;
+ CARD8 pad;
+} xkbBehaviorWireDesc;
+#define sz_xkbBehaviorWireDesc 4
+
+typedef struct _xkbActionWireDesc {
+ CARD8 type;
+ CARD8 data[7];
+} xkbActionWireDesc;
+#define sz_xkbActionWireDesc 8
+
+typedef struct _xkbGetMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 full B16;
+ CARD16 partial B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD16 virtualMods B16;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD16 pad1 B16;
+} xkbGetMapReq;
+#define sz_xkbGetMapReq 28
+
+typedef struct _xkbGetMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 pad1 B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD16 present B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 totalTypes;
+ KeyCode firstKeySym;
+ CARD16 totalSyms B16;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD16 totalActs B16;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD8 totalKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ CARD8 totalKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ CARD8 totalModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD8 totalVModMapKeys;
+ CARD8 pad2;
+ CARD16 virtualMods B16;
+} xkbGetMapReply;
+#define sz_xkbGetMapReply 40
+
+#define XkbSetMapResizeTypes (1L<<0)
+#define XkbSetMapRecomputeActions (1L<<1)
+#define XkbSetMapAllFlags (0x3)
+
+typedef struct _xkbSetMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 present B16;
+ CARD16 flags B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ CARD16 totalSyms B16;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ CARD16 totalActs B16;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD8 totalKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ CARD8 totalKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ CARD8 totalModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD8 totalVModMapKeys;
+ CARD16 virtualMods B16;
+} xkbSetMapReq;
+#define sz_xkbSetMapReq 36
+
+typedef struct _xkbSymInterpretWireDesc {
+ CARD32 sym B32;
+ CARD8 mods;
+ CARD8 match;
+ CARD8 virtualMod;
+ CARD8 flags;
+ xkbActionWireDesc act;
+} xkbSymInterpretWireDesc;
+#define sz_xkbSymInterpretWireDesc 16
+
+typedef struct _xkbGetCompatMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetCompatMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 groups;
+ BOOL getAllSI;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+} xkbGetCompatMapReq;
+#define sz_xkbGetCompatMapReq 12
+
+typedef struct _xkbGetCompatMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 groups;
+ CARD8 pad1;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 nTotalSI B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetCompatMapReply;
+#define sz_xkbGetCompatMapReply 32
+
+typedef struct _xkbSetCompatMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetCompatMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 pad1;
+ BOOL recomputeActions;
+ BOOL truncateSI;
+ CARD8 groups;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 pad2 B16;
+} xkbSetCompatMapReq;
+#define sz_xkbSetCompatMapReq 16
+
+typedef struct _xkbGetIndicatorState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetIndicatorState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+} xkbGetIndicatorStateReq;
+#define sz_xkbGetIndicatorStateReq 8
+
+typedef struct _xkbGetIndicatorStateReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 state B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetIndicatorStateReply;
+#define sz_xkbGetIndicatorStateReply 32
+
+typedef struct _xkbGetIndicatorMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetIndicatorMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ CARD32 which B32;
+} xkbGetIndicatorMapReq;
+#define sz_xkbGetIndicatorMapReq 12
+
+typedef struct _xkbGetIndicatorMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 which B32;
+ CARD32 realIndicators B32;
+ CARD8 nIndicators;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetIndicatorMapReply;
+#define sz_xkbGetIndicatorMapReply 32
+
+typedef struct _xkbIndicatorMapWireDesc {
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 mods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+} xkbIndicatorMapWireDesc;
+#define sz_xkbIndicatorMapWireDesc 12
+
+typedef struct _xkbSetIndicatorMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetIndicatorMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+ CARD32 which B32;
+} xkbSetIndicatorMapReq;
+#define sz_xkbSetIndicatorMapReq 12
+
+typedef struct _xkbGetNamedIndicator {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBGetNamedIndicator */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD16 pad1 B16;
+ Atom indicator B32;
+} xkbGetNamedIndicatorReq;
+#define sz_xkbGetNamedIndicatorReq 16
+
+typedef struct _xkbGetNamedIndicatorReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom indicator B32;
+ BOOL found;
+ BOOL on;
+ BOOL realIndicator;
+ CARD8 ndx;
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 mods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+ BOOL supported;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbGetNamedIndicatorReply;
+#define sz_xkbGetNamedIndicatorReply 32
+
+typedef struct _xkbSetNamedIndicator {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBSetNamedIndicator */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD16 pad1 B16;
+ Atom indicator B32;
+ BOOL setState;
+ BOOL on;
+ BOOL setMap;
+ BOOL createMap;
+ CARD8 pad2;
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+} xkbSetNamedIndicatorReq;
+#define sz_xkbSetNamedIndicatorReq 32
+
+typedef struct _xkbGetNames {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetNames */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ CARD32 which B32;
+} xkbGetNamesReq;
+#define sz_xkbGetNamesReq 12
+
+typedef struct _xkbGetNamesReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 which B32;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 nTypes;
+ CARD8 groupNames;
+ CARD16 virtualMods B16;
+ KeyCode firstKey;
+ CARD8 nKeys;
+ CARD32 indicators B32;
+ CARD8 nRadioGroups;
+ CARD8 nKeyAliases;
+ CARD16 nKTLevels B16;
+ CARD32 pad3 B32;
+} xkbGetNamesReply;
+#define sz_xkbGetNamesReply 32
+
+typedef struct _xkbSetNames {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetNames */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 virtualMods B16;
+ CARD32 which B32;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 firstKTLevel;
+ CARD8 nKTLevels;
+ CARD32 indicators B32;
+ CARD8 groupNames;
+ CARD8 nRadioGroups;
+ KeyCode firstKey;
+ CARD8 nKeys;
+ CARD8 nKeyAliases;
+ CARD8 pad1;
+ CARD16 totalKTLevelNames B16;
+} xkbSetNamesReq;
+#define sz_xkbSetNamesReq 28
+
+typedef struct _xkbPointWireDesc {
+ INT16 x B16;
+ INT16 y B16;
+} xkbPointWireDesc;
+#define sz_xkbPointWireDesc 4
+
+typedef struct _xkbOutlineWireDesc {
+ CARD8 nPoints;
+ CARD8 cornerRadius;
+ CARD16 pad B16;
+} xkbOutlineWireDesc;
+#define sz_xkbOutlineWireDesc 4
+
+typedef struct _xkbShapeWireDesc {
+ Atom name B32;
+ CARD8 nOutlines;
+ CARD8 primaryNdx;
+ CARD8 approxNdx;
+ CARD8 pad;
+} xkbShapeWireDesc;
+#define sz_xkbShapeWireDesc 8
+
+typedef struct _xkbSectionWireDesc {
+ Atom name B32;
+ INT16 top B16;
+ INT16 left B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ INT16 angle B16;
+ CARD8 priority;
+ CARD8 nRows;
+ CARD8 nDoodads;
+ CARD8 nOverlays;
+ CARD16 pad B16;
+} xkbSectionWireDesc;
+#define sz_xkbSectionWireDesc 20
+
+typedef struct _xkbRowWireDesc {
+ INT16 top B16;
+ INT16 left B16;
+ CARD8 nKeys;
+ BOOL vertical;
+ CARD16 pad B16;
+} xkbRowWireDesc;
+#define sz_xkbRowWireDesc 8
+
+typedef struct _xkbKeyWireDesc {
+ CARD8 name[XkbKeyNameLength];
+ INT16 gap B16;
+ CARD8 shapeNdx;
+ CARD8 colorNdx;
+} xkbKeyWireDesc;
+#define sz_xkbKeyWireDesc 8
+
+typedef struct _xkbOverlayWireDesc {
+ Atom name B32;
+ CARD8 nRows;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbOverlayWireDesc;
+#define sz_xkbOverlayWireDesc 8
+
+typedef struct _xkbOverlayRowWireDesc {
+ CARD8 rowUnder;
+ CARD8 nKeys;
+ CARD16 pad1 B16;
+} xkbOverlayRowWireDesc;
+#define sz_xkbOverlayRowWireDesc 4
+
+typedef struct _xkbOverlayKeyWireDesc {
+ CARD8 over[XkbKeyNameLength];
+ CARD8 under[XkbKeyNameLength];
+} xkbOverlayKeyWireDesc;
+#define sz_xkbOverlayKeyWireDesc 8
+
+typedef struct _xkbShapeDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 colorNdx;
+ CARD8 shapeNdx;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xkbShapeDoodadWireDesc;
+#define sz_xkbShapeDoodadWireDesc 20
+
+typedef struct _xkbTextDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 colorNdx;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbTextDoodadWireDesc;
+#define sz_xkbTextDoodadWireDesc 20
+
+typedef struct _xkbIndicatorDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 shapeNdx;
+ CARD8 onColorNdx;
+ CARD8 offColorNdx;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+} xkbIndicatorDoodadWireDesc;
+#define sz_xkbIndicatorDoodadWireDesc 20
+
+typedef struct _xkbLogoDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 colorNdx;
+ CARD8 shapeNdx;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xkbLogoDoodadWireDesc;
+#define sz_xkbLogoDoodadWireDesc 20
+
+typedef struct _xkbAnyDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbAnyDoodadWireDesc;
+#define sz_xkbAnyDoodadWireDesc 20
+
+typedef union _xkbDoodadWireDesc {
+ xkbAnyDoodadWireDesc any;
+ xkbShapeDoodadWireDesc shape;
+ xkbTextDoodadWireDesc text;
+ xkbIndicatorDoodadWireDesc indicator;
+ xkbLogoDoodadWireDesc logo;
+} xkbDoodadWireDesc;
+#define sz_xkbDoodadWireDesc 20
+
+typedef struct _xkbGetGeometry {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetGeometry */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ Atom name B32;
+} xkbGetGeometryReq;
+#define sz_xkbGetGeometryReq 12
+
+typedef struct _xkbGetGeometryReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom name B32;
+ BOOL found;
+ CARD8 pad;
+ CARD16 widthMM B16;
+ CARD16 heightMM B16;
+ CARD16 nProperties B16;
+ CARD16 nColors B16;
+ CARD16 nShapes B16;
+ CARD16 nSections B16;
+ CARD16 nDoodads B16;
+ CARD16 nKeyAliases B16;
+ CARD8 baseColorNdx;
+ CARD8 labelColorNdx;
+} xkbGetGeometryReply;
+#define sz_xkbGetGeometryReply 32
+
+typedef struct _xkbSetGeometry {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetGeometry */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 nShapes;
+ CARD8 nSections;
+ Atom name B32;
+ CARD16 widthMM B16;
+ CARD16 heightMM B16;
+ CARD16 nProperties B16;
+ CARD16 nColors B16;
+ CARD16 nDoodads B16;
+ CARD16 nKeyAliases B16;
+ CARD8 baseColorNdx;
+ CARD8 labelColorNdx;
+ CARD16 pad B16;
+} xkbSetGeometryReq;
+#define sz_xkbSetGeometryReq 28
+
+typedef struct _xkbPerClientFlags {
+ CARD8 reqType;
+ CARD8 xkbReqType;/* always X_KBPerClientFlags */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+ CARD32 change B32;
+ CARD32 value B32;
+ CARD32 ctrlsToChange B32;
+ CARD32 autoCtrls B32;
+ CARD32 autoCtrlValues B32;
+} xkbPerClientFlagsReq;
+#define sz_xkbPerClientFlagsReq 28
+
+typedef struct _xkbPerClientFlagsReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 supported B32;
+ CARD32 value B32;
+ CARD32 autoCtrls B32;
+ CARD32 autoCtrlValues B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xkbPerClientFlagsReply;
+#define sz_xkbPerClientFlagsReply 32
+
+typedef struct _xkbListComponents {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBListComponents */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 maxNames B16;
+} xkbListComponentsReq;
+#define sz_xkbListComponentsReq 8
+
+typedef struct _xkbListComponentsReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nKeymaps B16;
+ CARD16 nKeycodes B16;
+ CARD16 nTypes B16;
+ CARD16 nCompatMaps B16;
+ CARD16 nSymbols B16;
+ CARD16 nGeometries B16;
+ CARD16 extra B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbListComponentsReply;
+#define sz_xkbListComponentsReply 32
+
+typedef struct _xkbGetKbdByName {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetKbdByName */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 need B16; /* combination of XkbGBN_* */
+ CARD16 want B16; /* combination of XkbGBN_* */
+ BOOL load;
+ CARD8 pad;
+} xkbGetKbdByNameReq;
+#define sz_xkbGetKbdByNameReq 12
+
+typedef struct _xkbGetKbdByNameReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ BOOL loaded;
+ BOOL newKeyboard;
+ CARD16 found B16; /* combination of XkbGBN_* */
+ CARD16 reported B16; /* combination of XkbAllComponents */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbGetKbdByNameReply;
+#define sz_xkbGetKbdByNameReply 32
+
+typedef struct _xkbDeviceLedsWireDesc {
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD32 namesPresent B32;
+ CARD32 mapsPresent B32;
+ CARD32 physIndicators B32;
+ CARD32 state B32;
+} xkbDeviceLedsWireDesc;
+#define sz_xkbDeviceLedsWireDesc 20
+
+typedef struct _xkbGetDeviceInfo {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetDeviceInfo */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 wanted B16;
+ BOOL allBtns;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD8 pad;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+} xkbGetDeviceInfoReq;
+#define sz_xkbGetDeviceInfoReq 16
+
+typedef struct _xkbGetDeviceInfoReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 present B16;
+ CARD16 supported B16;
+ CARD16 unsupported B16;
+ CARD16 nDeviceLedFBs B16;
+ CARD8 firstBtnWanted;
+ CARD8 nBtnsWanted;
+ CARD8 firstBtnRtrn;
+ CARD8 nBtnsRtrn;
+ CARD8 totalBtns;
+ BOOL hasOwnState;
+ CARD16 dfltKbdFB B16;
+ CARD16 dfltLedFB B16;
+ CARD16 pad B16;
+ Atom devType B32;
+} xkbGetDeviceInfoReply;
+#define sz_xkbGetDeviceInfoReply 32
+
+typedef struct _xkbSetDeviceInfo {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetDeviceInfo */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD16 change B16;
+ CARD16 nDeviceLedFBs B16;
+} xkbSetDeviceInfoReq;
+#define sz_xkbSetDeviceInfoReq 12
+
+typedef struct _xkbSetDebuggingFlags {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetDebuggingFlags */
+ CARD16 length B16;
+ CARD16 msgLength B16;
+ CARD16 pad B16;
+ CARD32 affectFlags B32;
+ CARD32 flags B32;
+ CARD32 affectCtrls B32;
+ CARD32 ctrls B32;
+} xkbSetDebuggingFlagsReq;
+#define sz_xkbSetDebuggingFlagsReq 24
+
+typedef struct _xkbSetDebuggingFlagsReply {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 currentFlags B32;
+ CARD32 currentCtrls B32;
+ CARD32 supportedFlags B32;
+ CARD32 supportedCtrls B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xkbSetDebuggingFlagsReply;
+#define sz_xkbSetDebuggingFlagsReply 32
+
+ /*
+ * X KEYBOARD EXTENSION EVENT STRUCTURES
+ */
+
+typedef struct _xkbAnyEvent {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xkbAnyEvent;
+#define sz_xkbAnyEvent 32
+
+typedef struct _xkbNewKeyboardNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 oldDeviceID;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ KeyCode oldMinKeyCode;
+ KeyCode oldMaxKeyCode;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+ CARD16 changed B16;
+ CARD8 detail;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbNewKeyboardNotify;
+#define sz_xkbNewKeyboardNotify 32
+
+typedef struct _xkbMapNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 ptrBtnActions;
+ CARD16 changed B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD16 virtualMods B16;
+ CARD16 pad1 B16;
+} xkbMapNotify;
+#define sz_xkbMapNotify 32
+
+typedef struct _xkbStateNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 mods;
+ CARD8 baseMods;
+ CARD8 latchedMods;
+ CARD8 lockedMods;
+ CARD8 group;
+ INT16 baseGroup B16;
+ INT16 latchedGroup B16;
+ CARD8 lockedGroup;
+ CARD8 compatState;
+ CARD8 grabMods;
+ CARD8 compatGrabMods;
+ CARD8 lookupMods;
+ CARD8 compatLookupMods;
+ CARD16 ptrBtnState B16;
+ CARD16 changed B16;
+ KeyCode keycode;
+ CARD8 eventType;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+} xkbStateNotify;
+#define sz_xkbStateNotify 32
+
+typedef struct _xkbControlsNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 numGroups;
+ CARD16 pad1 B16;
+ CARD32 changedControls B32;
+ CARD32 enabledControls B32;
+ CARD32 enabledControlChanges B32;
+ KeyCode keycode;
+ CARD8 eventType;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+ CARD32 pad2 B32;
+} xkbControlsNotify;
+#define sz_xkbControlsNotify 32
+
+typedef struct _xkbIndicatorNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 state B32;
+ CARD32 changed B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbIndicatorNotify;
+#define sz_xkbIndicatorNotify 32
+
+typedef struct _xkbNamesNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 changed B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 firstLevelName;
+ CARD8 nLevelNames;
+ CARD8 pad2;
+ CARD8 nRadioGroups;
+ CARD8 nAliases;
+ CARD8 changedGroupNames;
+ CARD16 changedVirtualMods B16;
+ CARD8 firstKey;
+ CARD8 nKeys;
+ CARD32 changedIndicators B32;
+ CARD32 pad3 B32;
+} xkbNamesNotify;
+#define sz_xkbNamesNotify 32
+
+typedef struct _xkbCompatMapNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 changedGroups;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 nTotalSI B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbCompatMapNotify;
+#define sz_xkbCompatMapNotify 32
+
+typedef struct _xkbBellNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 bellClass;
+ CARD8 bellID;
+ CARD8 percent;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+ Atom name B32;
+ Window window B32;
+ BOOL eventOnly;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+} xkbBellNotify;
+#define sz_xkbBellNotify 32
+
+typedef struct _xkbActionMessage {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ KeyCode keycode;
+ BOOL press;
+ BOOL keyEventFollows;
+ CARD8 mods;
+ CARD8 group;
+ CARD8 message[8];
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbActionMessage;
+#define sz_xkbActionMessage 32
+
+typedef struct _xkbAccessXNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ KeyCode keycode;
+ CARD16 detail B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbAccessXNotify;
+#define sz_xkbAccessXNotify 32
+
+typedef struct _xkbExtensionDeviceNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 reason B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD32 ledsDefined B32;
+ CARD32 ledState B32;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD16 supported B16;
+ CARD16 unsupported B16;
+ CARD16 pad3 B16;
+} xkbExtensionDeviceNotify;
+#define sz_xkbExtensionDeviceNotify 32
+
+typedef struct _xkbEvent {
+ union {
+ xkbAnyEvent any;
+ xkbNewKeyboardNotify new_kbd;
+ xkbMapNotify map;
+ xkbStateNotify state;
+ xkbControlsNotify ctrls;
+ xkbIndicatorNotify indicators;
+ xkbNamesNotify names;
+ xkbCompatMapNotify compat;
+ xkbBellNotify bell;
+ xkbActionMessage message;
+ xkbAccessXNotify accessx;
+ xkbExtensionDeviceNotify device;
+ } u;
+} xkbEvent;
+#define sz_xkbEvent 32
+
+#undef Window
+#undef Atom
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _XKBPROTO_H_ */
diff --git a/X11/extensions/XKBrules.h b/X11/extensions/XKBrules.h
new file mode 100644
index 000000000..0d77ca323
--- /dev/null
+++ b/X11/extensions/XKBrules.h
@@ -0,0 +1,201 @@
+#ifndef _XKBRULES_H_
+#define _XKBRULES_H_ 1
+
+/* $Xorg: XKBrules.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+/* $XFree86: xc/lib/xkbfile/XKBrules.h,v 3.5 2002/11/26 01:43:25 dawes Exp $ */
+
+/***====================================================================***/
+
+typedef struct _XkbRF_VarDefs {
+ char * model;
+ char * layout;
+ char * variant;
+ char * options;
+ unsigned short sz_extra;
+ unsigned short num_extra;
+ char * extra_names;
+ char ** extra_values;
+} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr;
+
+typedef struct _XkbRF_VarDesc {
+ char * name;
+ char * desc;
+} XkbRF_VarDescRec, *XkbRF_VarDescPtr;
+
+typedef struct _XkbRF_DescribeVars {
+ int sz_desc;
+ int num_desc;
+ XkbRF_VarDescPtr desc;
+} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr;
+
+typedef struct _XkbRF_Rule {
+ int number;
+ int layout_num;
+ int variant_num;
+ char * model;
+ char * layout;
+ char * variant;
+ char * option;
+ /* yields */
+ char * keycodes;
+ char * symbols;
+ char * types;
+ char * compat;
+ char * geometry;
+ char * keymap;
+ unsigned flags;
+} XkbRF_RuleRec,*XkbRF_RulePtr;
+
+typedef struct _XkbRF_Group {
+ int number;
+ char * name;
+ char * words;
+} XkbRF_GroupRec, *XkbRF_GroupPtr;
+
+#define XkbRF_PendingMatch (1L<<1)
+#define XkbRF_Option (1L<<2)
+#define XkbRF_Append (1L<<3)
+#define XkbRF_Normal (1L<<4)
+#define XkbRF_Invalid (1L<<5)
+
+typedef struct _XkbRF_Rules {
+ XkbRF_DescribeVarsRec models;
+ XkbRF_DescribeVarsRec layouts;
+ XkbRF_DescribeVarsRec variants;
+ XkbRF_DescribeVarsRec options;
+ unsigned short sz_extra;
+ unsigned short num_extra;
+ char ** extra_names;
+ XkbRF_DescribeVarsPtr extra;
+
+ unsigned short sz_rules;
+ unsigned short num_rules;
+ XkbRF_RulePtr rules;
+ unsigned short sz_groups;
+ unsigned short num_groups;
+ XkbRF_GroupPtr groups;
+} XkbRF_RulesRec, *XkbRF_RulesPtr;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern Bool XkbRF_GetComponents(
+ XkbRF_RulesPtr /* rules */,
+ XkbRF_VarDefsPtr /* var_defs */,
+ XkbComponentNamesPtr /* names */
+);
+
+extern XkbRF_RulePtr XkbRF_AddRule(
+ XkbRF_RulesPtr /* rules */
+);
+
+extern XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules);
+
+extern Bool XkbRF_LoadRules(
+ FILE * /* file */,
+ XkbRF_RulesPtr /* rules */
+);
+
+extern Bool XkbRF_LoadRulesByName(
+ char * /* base */,
+ char * /* locale */,
+ XkbRF_RulesPtr /* rules */
+);
+
+/***====================================================================***/
+
+extern XkbRF_VarDescPtr XkbRF_AddVarDesc(
+ XkbRF_DescribeVarsPtr /* vars */
+);
+
+extern XkbRF_VarDescPtr XkbRF_AddVarDescCopy(
+ XkbRF_DescribeVarsPtr /* vars */,
+ XkbRF_VarDescPtr /* copy_from */
+);
+
+extern XkbRF_DescribeVarsPtr XkbRF_AddVarToDescribe(
+ XkbRF_RulesPtr /* rules */,
+ char * /* name */
+);
+
+extern Bool XkbRF_LoadDescriptions(
+ FILE * /* file */,
+ XkbRF_RulesPtr /* rules */
+);
+
+extern Bool XkbRF_LoadDescriptionsByName(
+ char * /* base */,
+ char * /* locale */,
+ XkbRF_RulesPtr /* rules */
+);
+
+extern XkbRF_RulesPtr XkbRF_Load(
+ char * /* base */,
+ char * /* locale */,
+ Bool /* wantDesc */,
+ Bool /* wantRules */
+);
+
+extern XkbRF_RulesPtr XkbRF_Create(
+ int /* sz_rules */,
+ int /* sz_extra */
+);
+
+/***====================================================================***/
+
+extern void XkbRF_Free(
+ XkbRF_RulesPtr /* rules */,
+ Bool /* freeRules */
+);
+
+
+/***====================================================================***/
+
+#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
+#define _XKB_RF_NAMES_PROP_MAXLEN 1024
+
+#ifndef XKB_IN_SERVER
+
+extern Bool XkbRF_GetNamesProp(
+ Display * /* dpy */,
+ char ** /* rules_file_rtrn */,
+ XkbRF_VarDefsPtr /* var_defs_rtrn */
+);
+
+extern Bool XkbRF_SetNamesProp(
+ Display * /* dpy */,
+ char * /* rules_file */,
+ XkbRF_VarDefsPtr /* var_defs */
+);
+
+#endif
+
+_XFUNCPROTOEND
+
+#endif /* _XKBRULES_H_ */
diff --git a/X11/extensions/XKBsrv.h b/X11/extensions/XKBsrv.h
new file mode 100644
index 000000000..49630af1d
--- /dev/null
+++ b/X11/extensions/XKBsrv.h
@@ -0,0 +1,1187 @@
+/* $Xorg: XKBsrv.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/* $XdotOrg: $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.22 2002/11/20 04:49:01 dawes Exp $ */
+
+#ifndef _XKBSRV_H_
+#define _XKBSRV_H_
+
+#ifdef XKB_IN_SERVER
+#define XkbAllocClientMap SrvXkbAllocClientMap
+#define XkbAllocServerMap SrvXkbAllocServerMap
+#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
+#define XkbAddKeyType SrvXkbAddKeyType
+#define XkbCopyKeyType SrvXkbCopyKeyType
+#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
+#define XkbFreeClientMap SrvXkbFreeClientMap
+#define XkbFreeServerMap SrvXkbFreeServerMap
+#define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes
+#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
+#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
+#define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore
+#define XkbResizeKeyActions SrvXkbResizeKeyActions
+#define XkbResizeKeySyms SrvXkbResizeKeySyms
+#define XkbResizeKeyType SrvXkbResizeKeyType
+#define XkbAllocCompatMap SrvXkbAllocCompatMap
+#define XkbAllocControls SrvXkbAllocControls
+#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
+#define XkbAllocKeyboard SrvXkbAllocKeyboard
+#define XkbAllocNames SrvXkbAllocNames
+#define XkbFreeCompatMap SrvXkbFreeCompatMap
+#define XkbFreeControls SrvXkbFreeControls
+#define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps
+#define XkbFreeKeyboard SrvXkbFreeKeyboard
+#define XkbFreeNames SrvXkbFreeNames
+#define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo
+#define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo
+#define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo
+#define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions
+#define XkbLatchModifiers SrvXkbLatchModifiers
+#define XkbLatchGroup SrvXkbLatchGroup
+#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
+#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
+#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
+#define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods
+#define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods
+#endif
+
+#include <X11/extensions/XKBstr.h>
+#include <X11/extensions/XKBproto.h>
+#include "inputstr.h"
+
+typedef struct _XkbInterest {
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest * next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec,*XkbInterestPtr;
+
+typedef struct _XkbRadioGroup {
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
+} XkbRadioGroupRec, *XkbRadioGroupPtr;
+
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec,*XkbEventCausePtr;
+#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
+ (c)->mjr= (c)->mnr= 0; \
+ (c)->client= NULL; }
+#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
+ (c)->mjr= (j),(c)->mnr= (n);\
+ (c)->client= (cl); }
+#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
+#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
+#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
+
+#define _OFF_TIMER 0
+#define _KRG_WARN_TIMER 1
+#define _KRG_TIMER 2
+#define _SK_TIMEOUT_TIMER 3
+#define _ALL_TIMEOUT_TIMER 4
+
+#define _BEEP_NONE 0
+#define _BEEP_FEATURE_ON 1
+#define _BEEP_FEATURE_OFF 2
+#define _BEEP_FEATURE_CHANGE 3
+#define _BEEP_SLOW_WARN 4
+#define _BEEP_SLOW_PRESS 5
+#define _BEEP_SLOW_ACCEPT 6
+#define _BEEP_SLOW_REJECT 7
+#define _BEEP_SLOW_RELEASE 8
+#define _BEEP_STICKY_LATCH 9
+#define _BEEP_STICKY_LOCK 10
+#define _BEEP_STICKY_UNLOCK 11
+#define _BEEP_LED_ON 12
+#define _BEEP_LED_OFF 13
+#define _BEEP_LED_CHANGE 14
+#define _BEEP_BOUNCE_REJECT 15
+
+typedef struct _XkbSrvInfo {
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+} XkbSrvInfoRec, *XkbSrvInfoPtr;
+
+#define XkbSLI_IsDefault (1L<<0)
+#define XkbSLI_HasOwnState (1L<<1)
+
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom * names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
+} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
+
+/*
+ * Settings for xkbClientFlags field (used by DIX)
+ * These flags _must_ not overlap with XkbPCF_*
+ */
+#define _XkbClientInitialized (1<<15)
+
+#define _XkbWantsDetectableAutoRepeat(c)\
+ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
+
+/*
+ * Settings for flags field
+ */
+#define _XkbStateNotifyInProgress (1<<0)
+
+typedef struct
+{
+ ProcessInputProc processInputProc;
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \
+ device->public.processInputProc = oldprocs->processInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
+
+/***====================================================================***/
+
+
+/***====================================================================***/
+
+#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
+#define XkbAllFilteredEventsMask \
+ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
+
+/***====================================================================***/
+
+extern int XkbReqCode;
+extern int XkbEventBase;
+extern int XkbKeyboardErrorCode;
+extern int XkbDisableLockActions;
+extern char * XkbBaseDirectory;
+extern char * XkbBinDirectory;
+extern char * XkbInitialMap;
+extern int _XkbClientMajor;
+extern int _XkbClientMinor;
+extern unsigned int XkbXIUnsupported;
+
+extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed;
+extern Bool noXkbExtension;
+extern Bool XkbWantRulesProp;
+
+extern pointer XkbLastRepeatEvent;
+
+extern CARD32 xkbDebugFlags;
+extern CARD32 xkbDebugCtrls;
+
+#define _XkbAlloc(s) xalloc((s))
+#define _XkbCalloc(n,s) Xcalloc((n)*(s))
+#define _XkbRealloc(o,s) Xrealloc((o),(s))
+#define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
+#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
+#define _XkbTypedRealloc(o,n,t) \
+ ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
+#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
+#define _XkbFree(p) Xfree(p)
+
+#define _XkbLibError(c,l,d) \
+ { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
+#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
+#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
+#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
+
+extern int DeviceKeyPress,DeviceKeyRelease;
+extern int DeviceButtonPress,DeviceButtonRelease;
+
+#ifdef XINPUT
+#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
+#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
+#else
+#define _XkbIsPressEvent(t) ((t)==KeyPress)
+#define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
+#endif
+
+#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
+ ((k)<=(c)->curKeySyms.maxKeyCode))
+#define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
+ (c)->curKeySyms.minKeyCode+1)
+
+#define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
+#undef IsKeypadKey
+#define IsKeypadKey(s) XkbKSIsKeypad(s)
+
+#define Status int
+#define XPointer pointer
+#define Display struct _XDisplay
+
+#ifndef True
+#define True 1
+#define False 0
+#endif
+
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#else
+#define PATH_MAX 1024
+#endif
+#endif
+
+_XFUNCPROTOBEGIN
+
+extern void XkbUseMsg(
+ void
+);
+
+extern int XkbProcessArguments(
+ int /* argc */,
+ char ** /* argv */,
+ int /* i */
+);
+
+extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+
+extern void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern DeviceIntPtr _XkbLookupAnyDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupKeyboard(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupBellDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupLedDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupButtonDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nNewActions */
+);
+
+extern void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern Status XkbCopyKeyType(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */
+);
+
+extern Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern void XkbSetActionKeyMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* mods */
+);
+
+extern Bool XkbCheckActionVMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern Bool XkbApplyVModChanges(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyVModChangesToAllDevices(
+ DeviceIntPtr /* dev */,
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbEventCausePtr /* cause */
+);
+
+extern unsigned int XkbMaskForVMask(
+ XkbDescPtr /* xkb */,
+ unsigned int /* vmask */
+);
+
+extern Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtua_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern unsigned int XkbAdjustGroup(
+ int /* group */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern void XkbUpdateKeyTypesFromCore(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */
+);
+
+extern void XkbUpdateDescActions(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbUpdateActions(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateCoreDescription(
+ DeviceIntPtr /* keybd */,
+ Bool /* resize */
+);
+
+extern void XkbApplyMappingChange(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* request */,
+ KeyCode /* firstKey */,
+ CARD8 /* num */,
+ ClientPtr /* client */
+);
+
+extern void XkbSetIndicators(
+ DeviceIntPtr /* pXDev */,
+ CARD32 /* affect */,
+ CARD32 /* values */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* changed */,
+ Bool /* check_edevs */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */,
+ unsigned int /* needed_parts */
+);
+
+extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ unsigned int /* class */,
+ unsigned int /* id */,
+ unsigned int /* needed_parts */
+);
+
+extern void XkbApplyLedNameChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_names */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyLedMapChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_maps */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyLedStateChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_leds */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateLedAutoState(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* maps_to_check */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbFlushLedEvents(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ XkbSrvLedInfoPtr /* sli */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateAllDeviceIndicators(
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern unsigned int XkbIndicatorsToUpdate(
+ DeviceIntPtr /* dev */,
+ unsigned long /* state_changes */,
+ Bool /* enabled_ctrl_changes */
+);
+
+extern void XkbComputeDerivedState(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern void XkbCheckSecondaryEffects(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* which */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbCheckIndicatorMaps(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* which */
+);
+
+extern unsigned int XkbStateChangedFlags(
+ XkbStatePtr /* old */,
+ XkbStatePtr /* new */
+);
+
+extern void XkbSendStateNotify(
+ DeviceIntPtr /* kbd */,
+ xkbStateNotify * /* pSN */
+);
+
+extern void XkbSendMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbMapNotify * /* ev */
+);
+
+extern int XkbComputeControlsNotify(
+ DeviceIntPtr /* kbd */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */,
+ xkbControlsNotify * /* pCN */,
+ Bool /* forceCtrlProc */
+);
+
+extern void XkbSendControlsNotify(
+ DeviceIntPtr /* kbd */,
+ xkbControlsNotify * /* ev */
+);
+
+extern void XkbSendCompatMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern void XkbSendIndicatorNotify(
+ DeviceIntPtr /* kbd */,
+ int /* xkbType */,
+ xkbIndicatorNotify * /* ev */
+);
+
+extern void XkbHandleBell(
+ BOOL /* force */,
+ BOOL /* eventOnly */,
+ DeviceIntPtr /* kbd */,
+ CARD8 /* percent */,
+ pointer /* ctrl */,
+ CARD8 /* class */,
+ Atom /* name */,
+ WindowPtr /* pWin */,
+ ClientPtr /* pClient */
+);
+
+extern void XkbSendAccessXNotify(
+ DeviceIntPtr /* kbd */,
+ xkbAccessXNotify * /* pEv */
+);
+
+extern void XkbSendNamesNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNamesNotify * /* ev */
+);
+
+extern void XkbSendCompatNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern void XkbSendActionMessage(
+ DeviceIntPtr /* kbd */,
+ xkbActionMessage * /* ev */
+);
+
+extern void XkbSendExtensionDeviceNotify(
+ DeviceIntPtr /* kbd */,
+ ClientPtr /* client */,
+ xkbExtensionDeviceNotify * /* ev */
+);
+
+extern void XkbSendNotification(
+ DeviceIntPtr /* kbd */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbProcessKeyboardEvent(
+ struct _xEvent * /* xE */,
+ DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void XkbProcessOtherEvent(
+ struct _xEvent * /* xE */,
+ DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void XkbHandleActions(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ struct _xEvent * /* xE */,
+ int /* count */
+);
+
+extern Bool XkbEnableDisableControls(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned long /* change */,
+ unsigned long /* newValues */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void AccessXInit(
+ DeviceIntPtr /* dev */
+);
+
+extern Bool AccessXFilterPressEvent(
+ register struct _xEvent * /* xE */,
+ register DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern Bool AccessXFilterReleaseEvent(
+ register struct _xEvent * /* xE */,
+ register DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void AccessXCancelRepeatKey(
+ XkbSrvInfoPtr /* xkbi */,
+ KeyCode /* key */
+);
+
+extern void AccessXComputeCurveFactor(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledId */
+);
+
+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
+ unsigned int /* deviceSpec */,
+ unsigned int /* nButtons */,
+ unsigned int /* szLeds */
+);
+
+extern void XkbFreeDeviceInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* which */,
+ Bool /* freeDevI */
+);
+
+extern Status XkbResizeDeviceButtonActions(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* newTotal */
+);
+
+extern XkbInterestPtr XkbFindClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern XkbInterestPtr XkbAddClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */,
+ XID /* id */
+);
+
+extern int XkbRemoveClient(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern int XkbRemoveResourceClient(
+ DevicePtr /* inDev */,
+ XID /* id */
+);
+
+extern int XkbDDXInitDevice(
+ DeviceIntPtr /* dev */
+);
+
+extern int XkbDDXAccessXBeep(
+ DeviceIntPtr /* dev */,
+ unsigned int /* what */,
+ unsigned int /* which */
+);
+
+extern void XkbDDXKeyClick(
+ DeviceIntPtr /* dev */,
+ int /* keycode */,
+ int /* synthetic */
+);
+
+extern int XkbDDXUsesSoftRepeat(
+ DeviceIntPtr /* dev */
+);
+
+extern void XkbDDXKeybdCtrlProc(
+ DeviceIntPtr /* dev */,
+ KeybdCtrl * /* ctrl */
+);
+
+extern void XkbDDXChangeControls(
+ DeviceIntPtr /* dev */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */
+);
+
+extern void XkbDDXUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* newState */
+);
+
+extern void XkbDDXUpdateDeviceIndicators(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ CARD32 /* newState */
+);
+
+extern void XkbDDXFakePointerButton(
+ int /* event */,
+ int /* button */
+);
+
+extern void XkbDDXFakePointerMotion(
+ unsigned int /* flags */,
+ int /* x */,
+ int /* y */
+);
+
+extern void XkbDDXFakeDeviceButton(
+ DeviceIntPtr /* dev */,
+ Bool /* press */,
+ int /* button */
+);
+
+extern int XkbDDXTerminateServer(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern int XkbDDXSwitchScreen(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern int XkbDDXPrivate(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern void XkbDisableComputedAutoRepeats(
+ DeviceIntPtr /* pXDev */,
+ unsigned int /* key */
+);
+
+extern void XkbSetRepeatKeys(
+ DeviceIntPtr /* pXDev */,
+ int /* key */,
+ int /* onoff */
+);
+
+extern int XkbLatchModifiers(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* mask */,
+ CARD8 /* latches */
+);
+
+extern int XkbLatchGroup(
+ DeviceIntPtr /* pXDev */,
+ int /* group */
+);
+
+extern void XkbClearAllLatchesAndLocks(
+ DeviceIntPtr /* dev */,
+ XkbSrvInfoPtr /* xkbi */,
+ Bool /* genEv */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbSetRulesDflts(
+ char * /* rulesFile */,
+ char * /* model */,
+ char * /* layout */,
+ char * /* variant */,
+ char * /* options */
+);
+
+extern void XkbInitDevice(
+ DeviceIntPtr /* pXDev */
+);
+
+extern Bool XkbInitKeyboardDeviceStruct(
+ DeviceIntPtr /* pXDev */,
+ XkbComponentNamesPtr /* pNames */,
+ KeySymsPtr /* pSyms */,
+ CARD8 /* pMods */[],
+ BellProcPtr /* bellProc */,
+ KbdCtrlProcPtr /* ctrlProc */
+);
+
+extern int SProcXkbDispatch(
+ ClientPtr /* client */
+);
+
+extern XkbGeometryPtr XkbLookupNamedGeometry(
+ DeviceIntPtr /* dev */,
+ Atom /* name */,
+ Bool * /* shouldFree */
+);
+
+extern char * _XkbDupString(
+ char * /* str */
+);
+
+extern void XkbConvertCase(
+ KeySym /* sym */,
+ KeySym * /* lower */,
+ KeySym * /* upper */
+);
+
+extern Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+extern int XkbFinishDeviceInit(
+ DeviceIntPtr /* pXDev */
+);
+
+extern void XkbFreeSrvLedInfo(
+ XkbSrvLedInfoPtr /* sli */
+);
+
+extern void XkbFreeInfo(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* nGroups */,
+ unsigned int /* groups */,
+ int * /* newTypesIn */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern XkbKeyTypePtr XkbAddKeyType(
+ XkbDescPtr /* xkb */,
+ Atom /* name */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* num_lvls */
+);
+
+extern Status XkbInitCanonicalKeyTypes(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* keypadVMod */
+);
+
+extern int XkbKeyTypesForCoreSymbols(
+ XkbDescPtr /* xkb */,
+ int /* map_width */,
+ KeySym * /* core_syms */,
+ unsigned int /* protected */,
+ int * /* types_inout */,
+ KeySym * /* xkb_syms_rtrn */
+);
+
+extern Bool XkbApplyCompatMapToKey(
+ XkbDescPtr /* xkb */,
+ KeyCode /* key */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateMapFromCore(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first_key */,
+ int /* num_keys */,
+ int /* map_width */,
+ KeySym * /* core_keysyms */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbFreeControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateActionVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern void XkbUpdateKeyTypeVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbSendNewKeyboardNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNewKeyboardNotify * /* pNKN */
+);
+
+#ifdef XKBSRV_NEED_FILE_FUNCS
+
+#include <X11/extensions/XKMformat.h>
+#include <X11/extensions/XKBfile.h>
+#include <X11/extensions/XKBrules.h>
+
+#define _XkbListKeymaps 0
+#define _XkbListKeycodes 1
+#define _XkbListTypes 2
+#define _XkbListCompat 3
+#define _XkbListSymbols 4
+#define _XkbListGeometry 5
+#define _XkbListNumComponents 6
+
+typedef struct _XkbSrvListInfo {
+ int szPool;
+ int nPool;
+ char * pool;
+
+ int maxRtrn;
+ int nTotal;
+
+ char * pattern[_XkbListNumComponents];
+ int nFound[_XkbListNumComponents];
+} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
+
+char *
+XkbGetRulesDflts(
+ XkbRF_VarDefsPtr /* defs */
+);
+
+extern void XkbSetRulesUsed(
+ XkbRF_VarDefsPtr /* defs */
+);
+
+
+extern Status XkbDDXList(
+ DeviceIntPtr /* dev */,
+ XkbSrvListInfoPtr /* listing */,
+ ClientPtr /* client */
+);
+
+extern unsigned int XkbDDXLoadKeymapByNames(
+ DeviceIntPtr /* keybd */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ XkbFileInfoPtr /* finfoRtrn */,
+ char * /* keymapNameRtrn */,
+ int /* keymapNameRtrnLen */
+);
+
+extern Bool XkbDDXNamesFromRules(
+ DeviceIntPtr /* keybd */,
+ char * /* rules */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */
+);
+
+extern FILE *XkbDDXOpenConfigFile(
+ char * /* mapName */,
+ char * /* fileNameRtrn */,
+ int /* fileNameRtrnLen */
+);
+
+extern Bool XkbDDXApplyConfig(
+ XPointer /* cfg_in */,
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern XPointer XkbDDXPreloadConfig(
+ char ** /* rulesFileRtrn */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */,
+ DeviceIntPtr /* dev */
+);
+
+extern int _XkbStrCaseCmp(
+ char * /* str1 */,
+ char * /* str2 */
+);
+
+#endif /* XKBSRV_NEED_FILE_FUNCS */
+
+
+_XFUNCPROTOEND
+
+#define XkbAtomGetString(d,s) NameForAtom(s)
+
+#endif /* _XKBSRV_H_ */
+
+
diff --git a/X11/extensions/XKBstr.h b/X11/extensions/XKBstr.h
new file mode 100644
index 000000000..bc63f4923
--- /dev/null
+++ b/X11/extensions/XKBstr.h
@@ -0,0 +1,614 @@
+/* $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSTR_H_
+#define _XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
+#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
+ (int)(((h)<<8)|(l)&0x7fff))
+#else
+#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
+#endif
+
+ /*
+ * Common data structures and access macros
+ */
+
+typedef struct _XkbStateRec {
+ unsigned char group;
+ unsigned char locked_group;
+ unsigned short base_group;
+ unsigned short latched_group;
+ unsigned char mods;
+ unsigned char base_mods;
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+ unsigned char compat_state;
+ unsigned char grab_mods;
+ unsigned char compat_grab_mods;
+ unsigned char lookup_mods;
+ unsigned char compat_lookup_mods;
+ unsigned short ptr_buttons;
+} XkbStateRec,*XkbStatePtr;
+#define XkbModLocks(s) ((s)->locked_mods)
+#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
+#define XkbGroupLock(s) ((s)->locked_group)
+#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
+#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec,*XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom * level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+ /*
+ * Structures and access macros used primarily by the server
+ */
+
+typedef struct _XkbBehavior {
+ unsigned char type;
+ unsigned char data;
+} XkbBehavior;
+
+#define XkbAnyActionDataSize 7
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbModAction;
+#define XkbModActionVMods(a) \
+ ((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define XkbSetModActionVMods(a,v) \
+ (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+
+typedef struct _XkbGroupAction {
+ unsigned char type;
+ unsigned char flags;
+ char group_XXX;
+} XkbGroupAction;
+#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
+#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
+} XkbPtrAction;
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
+} XkbPtrDfltAction;
+#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
+#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
+
+typedef struct _XkbSwitchScreenAction {
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
+} XkbSwitchScreenAction;
+#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
+#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
+
+typedef struct _XkbCtrlsAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
+} XkbCtrlsAction;
+#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
+ ((a)->ctrls2=(((c)>>16)&0xff)),\
+ ((a)->ctrls1=(((c)>>8)&0xff)),\
+ ((a)->ctrls0=((c)&0xff)))
+#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+ (((unsigned int)(a)->ctrls2)<<16)|\
+ (((unsigned int)(a)->ctrls1)<<8)|\
+ ((unsigned int)((a)->ctrls0)))
+
+typedef struct _XkbMessageAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
+} XkbMessageAction;
+
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
+} XkbRedirectKeyAction;
+
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
+} XkbDeviceValuatorAction;
+
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
+} XkbAction;
+
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
+#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
+
+typedef struct _XkbServerMapRec {
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
+
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
+#else
+ unsigned char *explicit;
+#endif
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+ /*
+ * Structures and access macros used primarily by clients
+ */
+
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
+
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
+
+ unsigned char *modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
+#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
+#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+ /*
+ * Compatibility structures and access macros
+ */
+
+typedef struct _XkbSymInterpretRec {
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec,*XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+ unsigned char flags;
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+ (((i)->which_groups&&(i)->groups)||\
+ ((i)->which_mods&&(i)->mods.mask)||\
+ ((i)->ctrls)))
+#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
+ ((i)->which_mods)||((i)->ctrls))
+
+
+typedef struct _XkbIndicatorRec {
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec,*XkbIndicatorPtr;
+
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec,*XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec,*XkbKeyAliasPtr;
+
+ /*
+ * Names for everything
+ */
+typedef struct _XkbNamesRec {
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec,*XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ struct _XDisplay * dpy;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
+} XkbDescRec, *XkbDescPtr;
+#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
+#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
+#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
+#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions(d,k)?\
+ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
+#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
+#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
+ ((k)<=(d)->max_key_code))
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
+typedef struct _XkbMapChanges {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec,*XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec,*XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec,*XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec,*XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
+typedef struct _XkbComponentNames {
+ char * keymap;
+ char * keycodes;
+ char * types;
+ char * compat;
+ char * symbols;
+ char * geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+ unsigned short flags;
+ char * name;
+} XkbComponentNameRec,*XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
+typedef struct _XkbDeviceLedInfo {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+ char * name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction * btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+
+#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
+#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
+
+typedef struct _XkbDeviceLedChanges {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+
+#endif /* _XKBSTR_H_ */
diff --git a/X11/extensions/XKM.h b/X11/extensions/XKM.h
new file mode 100644
index 000000000..c6c9f5195
--- /dev/null
+++ b/X11/extensions/XKM.h
@@ -0,0 +1,70 @@
+/* $Xorg: XKM.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+#ifndef XKM_H
+#define XKM_H 1
+
+#define XkmFileVersion 15
+
+#define XkmIllegalFile -1
+#define XkmSemanticsFile 20
+#define XkmLayoutFile 21
+#define XkmKeymapFile 22
+#define XkmGeometryFile 23
+
+#define XkmTypesIndex 0
+#define XkmCompatMapIndex 1
+#define XkmSymbolsIndex 2
+#define XkmIndicatorsIndex 3
+#define XkmKeyNamesIndex 4
+#define XkmGeometryIndex 5
+#define XkmVirtualModsIndex 6
+#define XkmLastIndex XkmVirtualModsIndex
+
+#define XkmTypesMask (1<<0)
+#define XkmCompatMapMask (1<<1)
+#define XkmSymbolsMask (1<<2)
+#define XkmIndicatorsMask (1<<3)
+#define XkmKeyNamesMask (1<<4)
+#define XkmGeometryMask (1<<5)
+#define XkmVirtualModsMask (1<<6)
+#define XkmLegalIndexMask (0x7f)
+#define XkmAllIndicesMask (0x7f)
+
+#define XkmSemanticsRequired (XkmCompatMapMask)
+#define XkmSemanticsOptional (XkmTypesMask|XkmVirtualModsMask|XkmIndicatorsMask)
+#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional)
+#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask)
+#define XkmLayoutOptional (XkmVirtualModsMask|XkmGeometryMask)
+#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional)
+#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired)
+#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired))
+#define XkmKeymapLegal (XkmKeymapRequired|XkmKeymapOptional)
+
+#define XkmLegalSection(m) (((m)&(~XkmKeymapLegal))==0)
+#define XkmSingleSection(m) (XkmLegalSection(m)&&(((m)&(~(m)+1))==(m)))
+
+#endif /* XKM_H */
diff --git a/X11/extensions/XKMformat.h b/X11/extensions/XKMformat.h
new file mode 100644
index 000000000..154da5694
--- /dev/null
+++ b/X11/extensions/XKMformat.h
@@ -0,0 +1,301 @@
+/* $Xorg: XKMformat.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+/* $XFree86$ */
+
+#ifndef _XKMFORMAT_H_
+#define _XKMFORMAT_H_ 1
+
+#include <X11/extensions/XKB.h>
+#include <X11/extensions/XKBproto.h>
+#include <X11/extensions/XKM.h>
+
+typedef struct _xkmFileInfo {
+ CARD8 type;
+ CARD8 min_kc;
+ CARD8 max_kc;
+ CARD8 num_toc;
+ CARD16 present B16;
+ CARD16 pad B16;
+} xkmFileInfo;
+#define sz_xkmFileInfo 8
+
+typedef struct _xkmSectionInfo {
+ CARD16 type B16;
+ CARD16 format B16;
+ CARD16 size B16;
+ CARD16 offset B16;
+} xkmSectionInfo;
+#define sz_xkmSectionInfo 8
+
+typedef struct _xkmKeyTypeDesc {
+ CARD8 realMods;
+ CARD8 numLevels;
+ CARD16 virtualMods B16;
+ CARD8 nMapEntries;
+ CARD8 nLevelNames;
+ CARD8 preserve;
+ CARD8 pad;
+} xkmKeyTypeDesc;
+#define sz_xkmKeyTypeDesc 8
+
+typedef struct _xkmKTMapEntryDesc {
+ CARD8 level;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+} xkmKTMapEntryDesc;
+#define sz_xkmKTMapEntryDesc 4
+
+typedef struct _xkmModsDesc {
+ CARD8 realMods;
+ CARD8 pad;
+ CARD16 virtualMods B16;
+} xkmModsDesc;
+#define sz_xkmModsDesc 4
+
+typedef struct _xkmVModMapDesc {
+ CARD8 key;
+ CARD8 pad;
+ CARD16 vmods B16;
+} xkmVModMapDesc;
+#define sz_xkmVModMapDesc 4
+
+typedef struct _xkmSymInterpretDesc {
+ CARD32 sym B32;
+ CARD8 mods;
+ CARD8 match;
+ CARD8 virtualMod;
+ CARD8 flags;
+ CARD8 actionType;
+ CARD8 actionData[7];
+} xkmSymInterpretDesc;
+#define sz_xkmSymInterpretDesc 16
+
+typedef struct _xkmBehaviorDesc {
+ CARD8 type;
+ CARD8 data;
+ CARD16 pad B16;
+} xkmBehaviorDesc;
+#define sz_xkmBehaviorDesc 4
+
+typedef struct _xkmActionDesc {
+ CARD8 type;
+ CARD8 data[7];
+} xkmActionDesc;
+#define sz_xkmActionDesc 8
+
+#define XkmKeyHasTypes (0x0f)
+#define XkmKeyHasGroup1Type (1<<0)
+#define XkmKeyHasGroup2Type (1<<1)
+#define XkmKeyHasGroup3Type (1<<2)
+#define XkmKeyHasGroup4Type (1<<3)
+#define XkmKeyHasActions (1<<4)
+#define XkmKeyHasBehavior (1<<5)
+#define XkmRepeatingKey (1<<6)
+#define XkmNonRepeatingKey (1<<7)
+
+typedef struct _xkmKeySymMapDesc {
+ CARD8 width;
+ CARD8 num_groups;
+ CARD8 modifier_map;
+ CARD8 flags;
+} xkmKeySymMapDesc;
+#define sz_xkmKeySymMapDesc 4
+
+typedef struct _xkmIndicatorMapDesc {
+ CARD8 indicator;
+ CARD8 flags;
+ CARD8 which_mods;
+ CARD8 real_mods;
+ CARD16 vmods B16;
+ CARD8 which_groups;
+ CARD8 groups;
+ CARD32 ctrls B32;
+} xkmIndicatorMapDesc;
+#define sz_xkmIndicatorMapDesc 12
+
+typedef struct _xkmGeometryDesc {
+ CARD16 width_mm B16;
+ CARD16 height_mm B16;
+ CARD8 base_color_ndx;
+ CARD8 label_color_ndx;
+ CARD16 num_properties B16;
+ CARD16 num_colors B16;
+ CARD16 num_shapes B16;
+ CARD16 num_sections B16;
+ CARD16 num_doodads B16;
+ CARD16 num_key_aliases B16;
+ CARD16 pad1 B16;
+} xkmGeometryDesc;
+#define sz_xkmGeometryDesc 20
+
+typedef struct _xkmPointDesc {
+ INT16 x B16;
+ INT16 y B16;
+} xkmPointDesc;
+#define sz_xkmPointDesc 4
+
+typedef struct _xkmOutlineDesc {
+ CARD8 num_points;
+ CARD8 corner_radius;
+ CARD16 pad B16;
+} xkmOutlineDesc;
+#define sz_xkmOutlineDesc 4
+
+typedef struct _xkmShapeDesc {
+ CARD8 num_outlines;
+ CARD8 primary_ndx;
+ CARD8 approx_ndx;
+ CARD8 pad;
+} xkmShapeDesc;
+#define sz_xkmShapeDesc 4
+
+typedef struct _xkmSectionDesc {
+ INT16 top B16;
+ INT16 left B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ INT16 angle B16;
+ CARD8 priority;
+ CARD8 num_rows;
+ CARD8 num_doodads;
+ CARD8 num_overlays;
+ CARD16 pad2 B16;
+} xkmSectionDesc;
+#define sz_xkmSectionDesc 16
+
+typedef struct _xkmRowDesc {
+ INT16 top B16;
+ INT16 left B16;
+ CARD8 num_keys;
+ BOOL vertical;
+ CARD16 pad B16;
+} xkmRowDesc;
+#define sz_xkmRowDesc 8
+
+typedef struct _xkmKeyDesc {
+ CARD8 name[XkbKeyNameLength];
+ INT16 gap B16;
+ CARD8 shape_ndx;
+ CARD8 color_ndx;
+} xkmKeyDesc;
+#define sz_xkmKeyDesc 8
+
+typedef struct _xkmOverlayDesc {
+ CARD8 num_rows;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkmOverlayDesc;
+#define sz_xkmOverlayDesc 4
+
+typedef struct _xkmOverlayRowDesc {
+ CARD8 row_under;
+ CARD8 num_keys;
+ CARD16 pad B16;
+} xkmOverlayRowDesc;
+#define sz_xkmOverlayRowDesc 4
+
+typedef struct _xkmOverlayKeyDesc {
+ char over[XkbKeyNameLength];
+ char under[XkbKeyNameLength];
+} xkmOverlayKeyDesc;
+#define sz_xkmOverlayKeyDesc 8
+
+typedef struct _xkmShapeDoodadDesc {
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 color_ndx;
+ CARD8 shape_ndx;
+ CARD16 pad B16;
+ CARD32 pad1 B32;
+} xkmShapeDoodadDesc;
+#define sz_xkmShapeDoodadDesc 16
+
+typedef struct _xkmTextDoodadDesc {
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 color_ndx;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkmTextDoodadDesc;
+#define sz_xkmTextDoodadDesc 16
+
+typedef struct _xkmIndicatorDoodadDesc {
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ CARD8 shape_ndx;
+ CARD8 on_color_ndx;
+ CARD8 off_color_ndx;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+} xkmIndicatorDoodadDesc;
+#define sz_xkmIndicatorDoodadDesc 16
+
+typedef struct _xkmLogoDoodadDesc {
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 color_ndx;
+ CARD8 shape_ndx;
+ CARD16 pad B16;
+ CARD32 pad1 B32;
+} xkmLogoDoodadDesc;
+#define sz_xkmLogoDoodadDesc 16
+
+typedef struct _xkmAnyDoodadDesc {
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkmAnyDoodadDesc;
+#define sz_xkmAnyDoodadDesc 16
+
+typedef union _xkmDoodadDesc {
+ xkmAnyDoodadDesc any;
+ xkmShapeDoodadDesc shape;
+ xkmTextDoodadDesc text;
+ xkmIndicatorDoodadDesc indicator;
+ xkmLogoDoodadDesc logo;
+} xkmDoodadDesc;
+#define sz_xkmDoodadDesc 16
+
+#endif /* _XKMFORMAT_H_ */
diff --git a/X11/extensions/XLbx.h b/X11/extensions/XLbx.h
new file mode 100644
index 000000000..01d44f090
--- /dev/null
+++ b/X11/extensions/XLbx.h
@@ -0,0 +1,155 @@
+/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */
+
+#ifndef _XLBX_H_
+#define _XLBX_H_
+
+#include <X11/Xfuncproto.h>
+
+/*
+ * NOTE: any changes or additions to the opcodes needs to be reflected
+ * in the lbxCacheable array in Xserver/lbx/lbxmain.c
+ */
+
+#define X_LbxQueryVersion 0
+#define X_LbxStartProxy 1
+#define X_LbxStopProxy 2
+#define X_LbxSwitch 3
+#define X_LbxNewClient 4
+#define X_LbxCloseClient 5
+#define X_LbxModifySequence 6
+#define X_LbxAllowMotion 7
+#define X_LbxIncrementPixel 8
+#define X_LbxDelta 9
+#define X_LbxGetModifierMapping 10
+#define X_LbxInvalidateTag 12
+#define X_LbxPolyPoint 13
+#define X_LbxPolyLine 14
+#define X_LbxPolySegment 15
+#define X_LbxPolyRectangle 16
+#define X_LbxPolyArc 17
+#define X_LbxFillPoly 18
+#define X_LbxPolyFillRectangle 19
+#define X_LbxPolyFillArc 20
+#define X_LbxGetKeyboardMapping 21
+#define X_LbxQueryFont 22
+#define X_LbxChangeProperty 23
+#define X_LbxGetProperty 24
+#define X_LbxTagData 25
+
+#define X_LbxCopyArea 26
+#define X_LbxCopyPlane 27
+#define X_LbxPolyText8 28
+#define X_LbxPolyText16 29
+#define X_LbxImageText8 30
+#define X_LbxImageText16 31
+
+#define X_LbxQueryExtension 32
+#define X_LbxPutImage 33
+#define X_LbxGetImage 34
+
+#define X_LbxBeginLargeRequest 35
+#define X_LbxLargeRequestData 36
+#define X_LbxEndLargeRequest 37
+
+#define X_LbxInternAtoms 38
+#define X_LbxGetWinAttrAndGeom 39
+
+#define X_LbxGrabCmap 40
+#define X_LbxReleaseCmap 41
+#define X_LbxAllocColor 42
+
+#define X_LbxSync 43
+
+#define LbxNumberReqs 44
+
+
+#define LbxEvent 0
+#define LbxQuickMotionDeltaEvent 1
+#define LbxNumberEvents 2
+
+/* This is always the master client */
+#define LbxMasterClientIndex 0
+
+/* LbxEvent lbxType sub-fields */
+#define LbxSwitchEvent 0
+#define LbxCloseEvent 1
+#define LbxDeltaEvent 2
+#define LbxInvalidateTagEvent 3
+#define LbxSendTagDataEvent 4
+#define LbxListenToOne 5
+#define LbxListenToAll 6
+#define LbxMotionDeltaEvent 7
+#define LbxReleaseCmapEvent 8
+#define LbxFreeCellsEvent 9
+
+/*
+ * Lbx image compression methods
+ *
+ * No compression is always assigned the value of 0.
+ *
+ * The rest of the compression method opcodes are assigned dynamically
+ * at option negotiation time.
+ */
+
+#define LbxImageCompressNone 0
+
+
+#define BadLbxClient 0
+#define LbxNumberErrors (BadLbxClient + 1)
+
+/* tagged data types */
+#define LbxTagTypeModmap 1
+#define LbxTagTypeKeymap 2
+#define LbxTagTypeProperty 3
+#define LbxTagTypeFont 4
+#define LbxTagTypeConnInfo 5
+
+#ifndef _XLBX_SERVER_
+
+#include <X11/Xdefs.h>
+#include <X11/Xlib.h>
+
+_XFUNCPROTOBEGIN
+
+Bool XLbxQueryExtension(
+ Display* /* dpy */,
+ int* /* requestp */,
+ int* /* event_basep */,
+ int* /* error_basep */
+);
+
+Bool XLbxQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */
+);
+
+int XLbxGetEventBase(Display *dpy);
+
+_XFUNCPROTOEND
+
+#endif
+
+#endif
diff --git a/X11/extensions/XResproto.h b/X11/extensions/XResproto.h
new file mode 100644
index 000000000..2f5563bce
--- /dev/null
+++ b/X11/extensions/XResproto.h
@@ -0,0 +1,130 @@
+/*
+ Copyright (c) 2002 XFree86 Inc
+*/
+/* $XFree86: xc/include/extensions/XResproto.h,v 1.1 2002/03/04 19:31:35 mvojkovi Exp $ */
+
+#ifndef _XRESPROTO_H
+#define _XRESPROTO_H
+
+#define XRES_MAJOR_VERSION 1
+#define XRES_MINOR_VERSION 0
+
+#define XRES_NAME "X-Resource"
+
+#define X_XResQueryVersion 0
+#define X_XResQueryClients 1
+#define X_XResQueryClientResources 2
+#define X_XResQueryClientPixmapBytes 3
+
+typedef struct {
+ CARD32 resource_base;
+ CARD32 resource_mask;
+} xXResClient;
+#define sz_xXResClient 8
+
+typedef struct {
+ CARD32 resource_type;
+ CARD32 count;
+} xXResType;
+#define sz_xXResType 8
+
+/* XResQueryVersion */
+
+typedef struct _XResQueryVersion {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+ CARD8 client_major;
+ CARD8 client_minor;
+ CARD16 unused B16;
+} xXResQueryVersionReq;
+#define sz_xXResQueryVersionReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 server_major B16;
+ CARD16 server_minor B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXResQueryVersionReply;
+#define sz_xXResQueryVersionReply 32
+
+/* XResQueryClients */
+
+typedef struct _XResQueryClients {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+} xXResQueryClientsReq;
+#define sz_xXResQueryClientsReq 4
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_clients B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXResQueryClientsReply;
+#define sz_xXResQueryClientsReply 32
+
+/* XResQueryClientResources */
+
+typedef struct _XResQueryClientResources {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+ CARD32 xid B32;
+} xXResQueryClientResourcesReq;
+#define sz_xXResQueryClientResourcesReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_types B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXResQueryClientResourcesReply;
+#define sz_xXResQueryClientResourcesReply 32
+
+/* XResQueryClientPixmapBytes */
+
+typedef struct _XResQueryClientPixmapBytes {
+ CARD8 reqType;
+ CARD8 XResReqType;
+ CARD16 length B16;
+ CARD32 xid B32;
+} xXResQueryClientPixmapBytesReq;
+#define sz_xXResQueryClientPixmapBytesReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 bytes B32;
+ CARD32 bytes_overflow B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXResQueryClientPixmapBytesReply;
+#define sz_xXResQueryClientPixmapBytesReply 32
+
+
+#endif /* _XRESPROTO_H */
diff --git a/X11/extensions/XShm.h b/X11/extensions/XShm.h
new file mode 100644
index 000000000..4ae14ca8b
--- /dev/null
+++ b/X11/extensions/XShm.h
@@ -0,0 +1,161 @@
+/* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 dawes Exp $ */
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _XSHM_H_
+#define _XSHM_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_ShmQueryVersion 0
+#define X_ShmAttach 1
+#define X_ShmDetach 2
+#define X_ShmPutImage 3
+#define X_ShmGetImage 4
+#define X_ShmCreatePixmap 5
+
+#define ShmCompletion 0
+#define ShmNumberEvents (ShmCompletion + 1)
+
+#define BadShmSeg 0
+#define ShmNumberErrors (BadShmSeg + 1)
+
+typedef unsigned long ShmSeg;
+
+#ifndef _XSHM_SERVER_
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable; /* drawable of request */
+ int major_code; /* ShmReqCode */
+ int minor_code; /* X_ShmPutImage */
+ ShmSeg shmseg; /* the ShmSeg used in the request */
+ unsigned long offset; /* the offset into ShmSeg used in the request */
+} XShmCompletionEvent;
+
+typedef struct {
+ ShmSeg shmseg; /* resource id */
+ int shmid; /* kernel id */
+ char *shmaddr; /* address in client */
+ Bool readOnly; /* how the server should attach it */
+} XShmSegmentInfo;
+
+_XFUNCPROTOBEGIN
+
+Bool XShmQueryExtension(
+ Display* /* dpy */
+);
+
+int XShmGetEventBase(
+ Display* /* dpy */
+);
+
+Bool XShmQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */,
+ Bool* /* sharedPixmaps */
+);
+
+int XShmPixmapFormat(
+ Display* /* dpy */
+);
+
+Status XShmAttach(
+ Display* /* dpy */,
+ XShmSegmentInfo* /* shminfo */
+);
+
+Status XShmDetach(
+ Display* /* dpy */,
+ XShmSegmentInfo* /* shminfo */
+);
+
+Status XShmPutImage(
+ Display* /* dpy */,
+ Drawable /* d */,
+ GC /* gc */,
+ XImage* /* image */,
+ int /* src_x */,
+ int /* src_y */,
+ int /* dst_x */,
+ int /* dst_y */,
+ unsigned int /* src_width */,
+ unsigned int /* src_height */,
+ Bool /* send_event */
+);
+
+Status XShmGetImage(
+ Display* /* dpy */,
+ Drawable /* d */,
+ XImage* /* image */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* plane_mask */
+);
+
+XImage *XShmCreateImage(
+ Display* /* dpy */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ char* /* data */,
+ XShmSegmentInfo* /* shminfo */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+Pixmap XShmCreatePixmap(
+ Display* /* dpy */,
+ Drawable /* d */,
+ char* /* data */,
+ XShmSegmentInfo* /* shminfo */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* depth */
+);
+
+_XFUNCPROTOEND
+
+#else /* _XSHM_SERVER_ */
+
+#include "screenint.h"
+#include "pixmap.h"
+#include "gc.h"
+
+extern void ShmRegisterFbFuncs(
+ ScreenPtr /* pScreen */
+);
+
+#endif
+
+#endif
diff --git a/X11/extensions/XTest.h b/X11/extensions/XTest.h
new file mode 100644
index 000000000..afb1849c3
--- /dev/null
+++ b/X11/extensions/XTest.h
@@ -0,0 +1,164 @@
+/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1992, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */
+
+#ifndef _XTEST_H_
+#define _XTEST_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_XTestGetVersion 0
+#define X_XTestCompareCursor 1
+#define X_XTestFakeInput 2
+#define X_XTestGrabControl 3
+
+#define XTestNumberEvents 0
+
+#define XTestNumberErrors 0
+
+#define XTestMajorVersion 2
+#define XTestMinorVersion 2
+
+#define XTestExtensionName "XTEST"
+
+#ifndef _XTEST_SERVER_
+
+#include <X11/extensions/XInput.h>
+
+_XFUNCPROTOBEGIN
+
+Bool XTestQueryExtension(
+ Display* /* dpy */,
+ int* /* event_basep */,
+ int* /* error_basep */,
+ int* /* majorp */,
+ int* /* minorp */
+);
+
+Bool XTestCompareCursorWithWindow(
+ Display* /* dpy */,
+ Window /* window */,
+ Cursor /* cursor */
+);
+
+Bool XTestCompareCurrentCursorWithWindow(
+ Display* /* dpy */,
+ Window /* window */
+);
+
+extern int XTestFakeKeyEvent(
+ Display* /* dpy */,
+ unsigned int /* keycode */,
+ Bool /* is_press */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeButtonEvent(
+ Display* /* dpy */,
+ unsigned int /* button */,
+ Bool /* is_press */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeMotionEvent(
+ Display* /* dpy */,
+ int /* screen */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeRelativeMotionEvent(
+ Display* /* dpy */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceKeyEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ unsigned int /* keycode */,
+ Bool /* is_press */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceButtonEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ unsigned int /* button */,
+ Bool /* is_press */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeProximityEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ Bool /* in_prox */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceMotionEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ Bool /* is_relative */,
+ int /* first_axis */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestGrabControl(
+ Display* /* dpy */,
+ Bool /* impervious */
+);
+
+void XTestSetGContextOfGC(
+ GC /* gc */,
+ GContext /* gid */
+);
+
+void XTestSetVisualIDOfVisual(
+ Visual* /* visual */,
+ VisualID /* visualid */
+);
+
+Status XTestDiscard(
+ Display* /* dpy */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XTEST_SERVER_ */
+
+#endif
diff --git a/X11/extensions/Xag.h b/X11/extensions/Xag.h
new file mode 100644
index 000000000..815f2b9f9
--- /dev/null
+++ b/X11/extensions/Xag.h
@@ -0,0 +1,114 @@
+/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */
+/*
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+*/
+/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _XAG_H_
+#define _XAG_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_XagQueryVersion 0
+#define X_XagCreate 1
+#define X_XagDestroy 2
+#define X_XagGetAttr 3
+#define X_XagQuery 4
+#define X_XagCreateAssoc 5
+#define X_XagDestroyAssoc 6
+
+#define XagBadAppGroup 0
+#define XagNumberErrors (XagBadAppGroup + 1)
+
+#define XagNsingleScreen 7
+#define XagNdefaultRoot 1
+#define XagNrootVisual 2
+#define XagNdefaultColormap 3
+#define XagNblackPixel 4
+#define XagNwhitePixel 5
+#define XagNappGroupLeader 6
+
+#ifndef _XAG_SERVER_
+
+#include <stdarg.h>
+
+_XFUNCPROTOBEGIN
+
+typedef XID XAppGroup;
+
+Bool XagQueryVersion(
+ Display* /* dpy */,
+ int* /* major_version */,
+ int* /* minor_version */
+);
+
+Status XagCreateEmbeddedApplicationGroup(
+ Display* /* dpy */,
+ VisualID /* root_visual */,
+ Colormap /* default_colormap */,
+ unsigned long /* black_pixel */,
+ unsigned long /* white_pixel */,
+ XAppGroup* /* app_group_return */
+);
+
+Status XagCreateNonembeddedApplicationGroup(
+ Display* /* dpy */,
+ XAppGroup* /* app_group_return */
+);
+
+Status XagDestroyApplicationGroup(
+ Display* /* dpy */,
+ XAppGroup /* app_group */
+);
+
+Status XagGetApplicationGroupAttributes(
+ Display* /* dpy */,
+ XAppGroup /* app_group */,
+ ...
+);
+
+Status XagQueryApplicationGroup(
+ Display* /* dpy */,
+ XID /* resource_base */,
+ XAppGroup* /* app_group_ret */
+);
+
+Status XagCreateAssociation(
+ Display* /* dpy */,
+ Window* /* window_ret */,
+ void* /* system_window */
+);
+
+Status XagDestroyAssociation(
+ Display* /* dpy */,
+ Window /* window */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XAG_SERVER_ */
+
+#endif /* _XAG_H_ */
+
diff --git a/X11/extensions/Xagstr.h b/X11/extensions/Xagstr.h
new file mode 100644
index 000000000..ffb5527a2
--- /dev/null
+++ b/X11/extensions/Xagstr.h
@@ -0,0 +1,182 @@
+/* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */
+/*
+Copyright 1996, 1998, 2001 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+*/
+/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _XAGSTR_H_ /* { */
+#define _XAGSTR_H_
+
+#include <X11/extensions/Xag.h>
+
+#define XAppGroup CARD32
+
+#define XAGNAME "XC-APPGROUP"
+
+#define XAG_MAJOR_VERSION 1 /* current version numbers */
+#define XAG_MINOR_VERSION 0
+
+#define XagWindowTypeX11 0
+#define XagWindowTypeMacintosh 1
+#define XagWindowTypeWin32 2
+#define XagWindowTypeWin16 3
+
+/*
+* Redefine some basic types used by structures defined herein. This allows
+* both the library and server to view communicated data as 32-bit entities,
+* thus preventing problems on 64-bit architectures where libXext sees this
+* data as 64 bits and the server sees it as 32 bits.
+*/
+
+#define Colormap CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct _XagQueryVersion {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagQueryVersion */
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXagQueryVersionReq;
+#define sz_xXagQueryVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD16 server_major_version B16;
+ CARD16 server_minor_version B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXagQueryVersionReply;
+#define sz_xXagQueryVersionReply 32
+
+/* Set AppGroup Attributes masks */
+#define XagSingleScreenMask 1 << 0
+#define XagDefaultRootMask 1 << XagNdefaultRoot
+#define XagRootVisualMask 1 << XagNrootVisual
+#define XagDefaultColormapMask 1 << XagNdefaultColormap
+#define XagBlackPixelMask 1 << XagNblackPixel
+#define XagWhitePixelMask 1 << XagNwhitePixel
+#define XagAppGroupLeaderMask 1 << XagNappGroupLeader
+
+typedef struct _XagCreate {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagCreate */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+ CARD32 attrib_mask B32; /* LISTofVALUE follows */
+} xXagCreateReq;
+#define sz_xXagCreateReq 12
+
+typedef struct _XagDestroy {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagDestroy */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+} xXagDestroyReq;
+#define sz_xXagDestroyReq 8
+
+typedef struct _XagGetAttr {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagGetAttr */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+} xXagGetAttrReq;
+#define sz_xXagGetAttrReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ Window default_root B32;
+ VisualID root_visual B32;
+ Colormap default_colormap B32;
+ CARD32 black_pixel B32;
+ CARD32 white_pixel B32;
+ BOOL single_screen;
+ BOOL app_group_leader;
+ CARD16 pad2 B16;
+} xXagGetAttrReply;
+#define sz_xXagGetAttrReply 32
+
+typedef struct _XagQuery {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagQuery */
+ CARD16 length B16;
+ CARD32 resource B32;
+} xXagQueryReq;
+#define sz_xXagQueryReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ XAppGroup app_group B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXagQueryReply;
+#define sz_xXagQueryReply 32
+
+typedef struct _XagCreateAssoc {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagCreateAssoc */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 window_type B16;
+ CARD16 system_window_len B16; /* LISTofCARD8 follows */
+} xXagCreateAssocReq;
+#define sz_xXagCreateAssocReq 12
+
+typedef struct _XagDestroyAssoc {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagDestroyAssoc */
+ CARD16 length B16;
+ Window window B32;
+} xXagDestroyAssocReq;
+#define sz_xXagDestroyAssocReq 8
+
+#undef XAppGroup
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef Window
+#undef Colormap
+#undef VisualID
+
+#endif /* } _XAGSTR_H_ */
+
diff --git a/X11/extensions/Xcup.h b/X11/extensions/Xcup.h
new file mode 100644
index 000000000..b1df039e6
--- /dev/null
+++ b/X11/extensions/Xcup.h
@@ -0,0 +1,69 @@
+/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1987, 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86$ */
+
+#ifndef _XCUP_H_
+#define _XCUP_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_XcupQueryVersion 0
+#define X_XcupGetReservedColormapEntries 1
+#define X_XcupStoreColors 2
+
+#define XcupNumberErrors 0
+
+#ifndef _XCUP_SERVER_
+
+_XFUNCPROTOBEGIN
+
+Bool XcupQueryVersion(
+ Display* /* dpy */,
+ int* /* major_version */,
+ int* /* minor_version */
+);
+
+Status XcupGetReservedColormapEntries(
+ Display* /* dpy */,
+ int /* screen */,
+ XColor** /* colors_out */,
+ int* /* ncolors */
+);
+
+Status XcupStoreColors(
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XColor* /* colors */,
+ int /* ncolors */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XCUP_SERVER_ */
+
+#endif /* _XCUP_H_ */
+
diff --git a/X11/extensions/Xcupstr.h b/X11/extensions/Xcupstr.h
new file mode 100644
index 000000000..f521c333c
--- /dev/null
+++ b/X11/extensions/Xcupstr.h
@@ -0,0 +1,109 @@
+/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+/*
+
+Copyright 1987, 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */
+
+#ifndef _XCUPSTR_H_ /* { */
+#define _XCUPSTR_H_
+
+#include <X11/extensions/Xcup.h>
+
+#define XCUPNAME "TOG-CUP"
+
+#define XCUP_MAJOR_VERSION 1 /* current version numbers */
+#define XCUP_MINOR_VERSION 0
+
+typedef struct _XcupQueryVersion {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupQueryVersion */
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXcupQueryVersionReq;
+#define sz_xXcupQueryVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD16 server_major_version B16;
+ CARD16 server_minor_version B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXcupQueryVersionReply;
+#define sz_xXcupQueryVersionReply 32
+
+typedef struct _XcupGetReservedColormapEntries {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */
+ CARD16 length B16;
+ CARD32 screen B32;
+} xXcupGetReservedColormapEntriesReq;
+#define sz_xXcupGetReservedColormapEntriesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXcupGetReservedColormapEntriesReply;
+#define sz_xXcupGetReservedColormapEntriesReply 32
+
+typedef struct _XcupStoreColors {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupStoreColors */
+ CARD16 length B16;
+ CARD32 cmap B32;
+} xXcupStoreColorsReq;
+#define sz_xXcupStoreColorsReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXcupStoreColorsReply;
+#define sz_xXcupStoreColorsReply 32
+
+#endif /* } _XCUPSTR_H_ */
+
diff --git a/X11/extensions/Xdbe.h b/X11/extensions/Xdbe.h
new file mode 100644
index 000000000..f9205a228
--- /dev/null
+++ b/X11/extensions/Xdbe.h
@@ -0,0 +1,136 @@
+/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995 Hewlett-Packard Company
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Hewlett-Packard
+ * Company shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization from the Hewlett-Packard Company.
+ *
+ * Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */
+
+#ifndef XDBE_H
+#define XDBE_H
+
+
+/* INCLUDES */
+
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/Xdbeproto.h>
+
+
+/* DEFINES */
+
+/* Errors */
+#define XdbeBadBuffer 0
+
+
+/* TYPEDEFS */
+
+typedef Drawable XdbeBackBuffer;
+
+typedef unsigned char XdbeSwapAction;
+
+typedef struct
+{
+ Window swap_window; /* window for which to swap buffers */
+ XdbeSwapAction swap_action; /* swap action to use for swap_window */
+}
+XdbeSwapInfo;
+
+typedef struct
+{
+ Window window; /* window that buffer belongs to */
+}
+XdbeBackBufferAttributes;
+
+typedef struct
+{
+ int type;
+ Display *display; /* display the event was read from */
+ XdbeBackBuffer buffer; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error base + XdbeBadBuffer */
+ unsigned char request_code; /* major opcode of failed request */
+ unsigned char minor_code; /* minor opcode of failed request */
+}
+XdbeBufferError;
+
+/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
+ * (for non-C++ builds) in X11/Xfuncproto.h.
+ */
+_XFUNCPROTOBEGIN
+
+extern Status XdbeQueryExtension(
+ Display* /* dpy */,
+ int* /* major_version_return */,
+ int* /* minor_version_return */
+);
+
+extern XdbeBackBuffer XdbeAllocateBackBufferName(
+ Display* /* dpy */,
+ Window /* window */,
+ XdbeSwapAction /* swap_action */
+);
+
+extern Status XdbeDeallocateBackBufferName(
+ Display* /* dpy */,
+ XdbeBackBuffer /* buffer */
+);
+
+extern Status XdbeSwapBuffers(
+ Display* /* dpy */,
+ XdbeSwapInfo* /* swap_info */,
+ int /* num_windows */
+);
+
+extern Status XdbeBeginIdiom(
+ Display* /* dpy */
+);
+
+extern Status XdbeEndIdiom(
+ Display* /* dpy */
+);
+
+extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
+ Display* /* dpy */,
+ Drawable* /* screen_specifiers */,
+ int* /* num_screens */
+);
+
+extern void XdbeFreeVisualInfo(
+ XdbeScreenVisualInfo* /* visual_info */
+);
+
+extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
+ Display* /* dpy */,
+ XdbeBackBuffer /* buffer */
+);
+
+_XFUNCPROTOEND
+
+#endif /* XDBE_H */
+
diff --git a/X11/extensions/Xdbeproto.h b/X11/extensions/Xdbeproto.h
new file mode 100644
index 000000000..8a8c55522
--- /dev/null
+++ b/X11/extensions/Xdbeproto.h
@@ -0,0 +1,277 @@
+/* $Xorg: Xdbeproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995 Hewlett-Packard Company
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Hewlett-Packard
+ * Company shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization from the Hewlett-Packard Company.
+ *
+ * Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+
+
+#ifndef XDBE_PROTO_H
+#define XDBE_PROTO_H
+
+/* INCLUDES */
+
+
+/* DEFINES */
+
+/* Values for swap_action field of XdbeSwapInfo structure */
+#define XdbeUndefined 0
+#define XdbeBackground 1
+#define XdbeUntouched 2
+#define XdbeCopied 3
+
+#ifdef NEED_DBE_PROTOCOL
+
+#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
+
+/* Current version numbers */
+#define DBE_MAJOR_VERSION 1
+#define DBE_MINOR_VERSION 0
+
+/* Used when adding extension; also used in Xdbe macros */
+#define DbeNumberEvents 0
+#define DbeBadBuffer 0
+#define DbeNumberErrors (DbeBadBuffer + 1)
+
+/* Request values used in (S)ProcDbeDispatch() */
+#define X_DbeGetVersion 0
+#define X_DbeAllocateBackBufferName 1
+#define X_DbeDeallocateBackBufferName 2
+#define X_DbeSwapBuffers 3
+#define X_DbeBeginIdiom 4
+#define X_DbeEndIdiom 5
+#define X_DbeGetVisualInfo 6
+#define X_DbeGetBackBufferAttributes 7
+
+typedef CARD8 xDbeSwapAction;
+typedef CARD32 xDbeBackBuffer;
+
+#endif /* NEED_DBE_PROTOCOL */
+
+
+/* TYPEDEFS */
+
+/* Client data types */
+
+/* XdbeVisualInfo and XdbeScreenVisualInfo are defined in this file,
+ * "Xdbeproto.h", rather than "Xdbe.h" because the server uses these data
+ * types.
+ */
+
+typedef struct
+{
+ VisualID visual; /* one visual ID that supports double-buffering */
+ int depth; /* depth of visual in bits */
+ int perflevel; /* performance level of visual */
+}
+XdbeVisualInfo;
+
+typedef struct
+{
+ int count; /* number of items in visual_depth */
+ XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
+}
+XdbeScreenVisualInfo;
+
+/* Protocol data types */
+
+#ifdef NEED_DBE_PROTOCOL
+
+typedef struct
+{
+ CARD32 window B32; /* window */
+ xDbeSwapAction swapAction; /* swap action */
+ CARD8 pad1; /* unused */
+ CARD16 pad2 B16;
+
+} xDbeSwapInfo;
+
+typedef struct
+{
+ CARD32 visualID B32; /* associated visual */
+ CARD8 depth; /* depth of visual */
+ CARD8 perfLevel; /* performance level hint */
+ CARD16 pad1 B16;
+
+} xDbeVisInfo;
+#define sz_xDbeVisInfo 8
+
+typedef struct
+{
+ CARD32 n B32; /* number of visual info items in list */
+
+} xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */
+
+typedef struct
+{
+ CARD32 window B32; /* window */
+
+} xDbeBufferAttributes;
+
+
+/* Requests and replies */
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeGetVersion (0) */
+ CARD16 length B16; /* request length: (2) */
+ CARD8 majorVersion; /* client-major-version */
+ CARD8 minorVersion; /* client-minor-version */
+ CARD16 unused B16; /* unused */
+
+} xDbeGetVersionReq;
+#define sz_xDbeGetVersionReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length: (0) */
+ CARD8 majorVersion; /* server-major-version */
+ CARD8 minorVersion; /* server-minor-version */
+ CARD16 pad1 B16; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+
+} xDbeGetVersionReply;
+#define sz_xDbeGetVersionReply 32
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeAllocateBackBufferName (1) */
+ CARD16 length B16; /* request length: (4) */
+ CARD32 window B32; /* window */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+ xDbeSwapAction swapAction; /* swap action hint */
+ CARD8 pad1; /* unused */
+ CARD16 pad2 B16;
+
+} xDbeAllocateBackBufferNameReq;
+#define sz_xDbeAllocateBackBufferNameReq 16
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeDeallocateBackBufferName (2) */
+ CARD16 length B16; /* request length: (2) */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+
+} xDbeDeallocateBackBufferNameReq;
+#define sz_xDbeDeallocateBackBufferNameReq 8
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeSwapBuffers (3) */
+ CARD16 length B16; /* request length: (2+2n) */
+ CARD32 n B32; /* n, number of window/swap action pairs */
+
+} xDbeSwapBuffersReq; /* followed by n window/swap action pairs */
+#define sz_xDbeSwapBuffersReq 8
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeBeginIdom (4) */
+ CARD16 length B16; /* request length: (1) */
+
+} xDbeBeginIdiomReq;
+#define sz_xDbeBeginIdiomReq 4
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeEndIdom (5) */
+ CARD16 length B16; /* request length: (1) */
+
+} xDbeEndIdiomReq;
+#define sz_xDbeEndIdiomReq 4
+
+typedef struct
+{
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 dbeReqType; /* always X_DbeGetVisualInfo (6) */
+ CARD16 length B16; /* request length: (2+n) */
+ CARD32 n B32; /* n, number of drawables in list */
+
+} xDbeGetVisualInfoReq; /* followed by n drawables */
+#define sz_xDbeGetVisualInfoReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length */
+ CARD32 m; /* m, number of visual infos in list */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+
+} xDbeGetVisualInfoReply; /* followed by m visual infos */
+#define sz_xDbeGetVisualInfoReply 32
+
+typedef struct
+{
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeGetBackBufferAttributes (7) */
+ CARD16 length B16; /* request length: (2) */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+
+} xDbeGetBackBufferAttributesReq;
+#define sz_xDbeGetBackBufferAttributesReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length: (0) */
+ CARD32 attributes; /* attributes */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+
+} xDbeGetBackBufferAttributesReply;
+#define sz_xDbeGetBackBufferAttributesReply 32
+
+#endif /* NEED_DBE_PROTOCOL */
+
+#endif /* XDBE_PROTO_H */
+
diff --git a/X11/extensions/Xeviestr.h b/X11/extensions/Xeviestr.h
new file mode 100644
index 000000000..e42eb4ed0
--- /dev/null
+++ b/X11/extensions/Xeviestr.h
@@ -0,0 +1,165 @@
+/* $XdotOrg: $ */
+/************************************************************
+
+Copyright 2003 Sun Microsystems, Inc.
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+************************************************************/
+
+#ifndef _XEVIESTR_H_
+#define _XEVIESTR_H_
+
+#define XEVIENAME "XEVIE"
+
+#define XEVIE_MAJOR_VERSION 1
+#define XEVIE_MINOR_VERSION 0
+
+#define X_XevieQueryVersion 0
+#define X_XevieStart 1
+#define X_XevieEnd 2
+#define X_XevieSend 3
+#define X_XevieSelectInput 4
+
+#define XevieNumberErrors 0
+
+typedef struct _XevieQueryVersion {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXevieQueryVersionReq;
+#define sz_xXevieQueryVersionReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD16 server_major_version B16;
+ CARD16 server_minor_version B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXevieQueryVersionReply;
+#define sz_xXevieQueryVersionReply 32
+
+typedef struct _XevieStart {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 screen B32;
+} xXevieStartReq;
+#define sz_xXevieStartReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieStartReply;
+#define sz_xXevieStartReply 32
+
+typedef struct _XevieEnd {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 cmap B32;
+} xXevieEndReq;
+#define sz_xXevieEndReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieEndReply;
+#define sz_xXevieEndReply 32
+
+typedef struct _XevieSend {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ xEvent event;
+ CARD32 dataType B32;
+} xXevieSendReq;
+#define sz_xXevieSendReq 104
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieSendReply;
+#define sz_xXevieSendReply 32
+
+typedef struct _XevieSelectInput {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 event_mask B32;
+} xXevieSelectInputReq;
+#define sz_xXevieSelectInputReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieSelectInputReply;
+#define sz_xXevieSelectInputReply 32
+
+#endif /* } _XEVIESTR_H_ */
+
diff --git a/X11/extensions/Xext.h b/X11/extensions/Xext.h
new file mode 100644
index 000000000..5b62c8b2d
--- /dev/null
+++ b/X11/extensions/Xext.h
@@ -0,0 +1,57 @@
+/*
+ * $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+/* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */
+
+#ifndef _XEXT_H_
+#define _XEXT_H_
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+extern int (*XSetExtensionErrorHandler(
+ int (*handler)(
+ Display *,
+ char *,
+ char *
+ )
+))(
+ Display *,
+ char *,
+ char *
+);
+
+extern int XMissingExtension(
+ Display* /* dpy */,
+ _Xconst char* /* ext_name */
+);
+
+_XFUNCPROTOEND
+
+#define X_EXTENSION_UNKNOWN "unknown"
+#define X_EXTENSION_MISSING "missing"
+
+#endif /* _XEXT_H_ */
diff --git a/X11/extensions/Xge.h b/X11/extensions/Xge.h
new file mode 100644
index 000000000..84fa250da
--- /dev/null
+++ b/X11/extensions/Xge.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Peter Hutterer, University of South Australia, NICTA
+ *
+ */
+
+
+/* XGE Client interfaces */
+
+#ifndef _XGE_H_
+#define _XGE_H_
+
+#include <X11/Xlib.h>
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+/**
+ * Generic Event mask.
+ * To be used whenever a list of masks per extension has to be provided.
+ */
+typedef struct {
+ CARD8 extension;
+ CARD8 pad0;
+ CARD16 pad1;
+ CARD32 evmask;
+} XGenericEventMask;
+
+Bool XGEQueryExtension(Display* dpy, int *event_basep, int *err_basep);
+Bool XGEQueryVersion(Display* dpy, int *major, int* minor);
+
+_XFUNCPROTOEND
+
+#endif /* _XGE_H_ */
diff --git a/X11/extensions/aclocal.m4 b/X11/extensions/aclocal.m4
new file mode 100644
index 000000000..a12ebd67a
--- /dev/null
+++ b/X11/extensions/aclocal.m4
@@ -0,0 +1,612 @@
+# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
+# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+
+AC_DEFUN([XORG_RELEASE_VERSION],[
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+ [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+ [Major version of this package])
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+ [$PVM],
+ [Minor version of this package])
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+ [$PVP],
+ [Patch version of this package])
+])
+
+# -*- Autoconf -*-
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.8.5])])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 11
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# -*- Autoconf -*-
+
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
diff --git a/X11/extensions/autogen.sh b/X11/extensions/autogen.sh
new file mode 100644
index 000000000..904cd6746
--- /dev/null
+++ b/X11/extensions/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/X11/extensions/bigreqsproto.pc.in b/X11/extensions/bigreqsproto.pc.in
new file mode 100644
index 000000000..e3adbfdac
--- /dev/null
+++ b/X11/extensions/bigreqsproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: BigReqsProto
+Description: BigReqs extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/bigreqstr.h b/X11/extensions/bigreqstr.h
new file mode 100644
index 000000000..fc31eb8ae
--- /dev/null
+++ b/X11/extensions/bigreqstr.h
@@ -0,0 +1,69 @@
+/* $Xorg: bigreqstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1992, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86$ */
+
+#ifndef _BIGREQSTR_H_
+#define _BIGREQSTR_H_
+
+#define X_BigReqEnable 0
+
+#define XBigReqNumberEvents 0
+
+#define XBigReqNumberErrors 0
+
+#define XBigReqExtensionName "BIG-REQUESTS"
+
+typedef struct {
+ CARD8 reqType; /* always XBigReqCode */
+ CARD8 brReqType; /* always X_BigReqEnable */
+ CARD16 length B16;
+} xBigReqEnableReq;
+#define sz_xBigReqEnableReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 max_request_size B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xBigReqEnableReply;
+#define sz_xBigReqEnableReply 32
+
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 zero B16;
+ CARD32 length B32;
+} xBigReq;
+
+#endif /* _BIGREQSTR_H_ */
diff --git a/X11/extensions/composite.h b/X11/extensions/composite.h
new file mode 100644
index 000000000..30b190fde
--- /dev/null
+++ b/X11/extensions/composite.h
@@ -0,0 +1,71 @@
+/*
+ * $Id: composite.h,v 1.4 2004/07/08 07:20:55 keithp Exp $
+ *
+ * Copyright © 2006 Sun Microsystems
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Sun Microsystems not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Sun Microsystems makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _COMPOSITE_H_
+#define _COMPOSITE_H_
+
+#include <X11/extensions/xfixeswire.h>
+
+#define COMPOSITE_NAME "Composite"
+#define COMPOSITE_MAJOR 0
+#define COMPOSITE_MINOR 4
+
+#define CompositeRedirectAutomatic 0
+#define CompositeRedirectManual 1
+
+#define X_CompositeQueryVersion 0
+#define X_CompositeRedirectWindow 1
+#define X_CompositeRedirectSubwindows 2
+#define X_CompositeUnredirectWindow 3
+#define X_CompositeUnredirectSubwindows 4
+#define X_CompositeCreateRegionFromBorderClip 5
+#define X_CompositeNameWindowPixmap 6
+#define X_CompositeGetOverlayWindow 7
+#define X_CompositeReleaseOverlayWindow 8
+
+#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1)
+
+#define CompositeNumberEvents 0
+
+#endif /* _COMPOSITE_H_ */
diff --git a/X11/extensions/compositeproto.h b/X11/extensions/compositeproto.h
new file mode 100644
index 000000000..c57628c9d
--- /dev/null
+++ b/X11/extensions/compositeproto.h
@@ -0,0 +1,191 @@
+/*
+ * $Id: compositeproto.h,v 1.4 2004/07/08 07:20:55 keithp Exp $
+ *
+ *
+ * Copyright © 2006 Sun Microsystems
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Sun Microsystems not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Sun Microsystems makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _COMPOSITEPROTO_H_
+#define _COMPOSITEPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/composite.h>
+
+#define Window CARD32
+#define Region CARD32
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xCompositeQueryVersionReq;
+
+#define sz_xCompositeQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xCompositeQueryVersionReply;
+
+#define sz_xCompositeQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeRedirectWindowReq;
+
+#define sz_xCompositeRedirectWindowReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeRedirectSubwindowsReq;
+
+#define sz_xCompositeRedirectSubwindowsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeUnredirectWindowReq;
+
+#define sz_xCompositeUnredirectWindowReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeUnredirectSubwindowsReq;
+
+#define sz_xCompositeUnredirectSubwindowsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Region region B32;
+ Window window B32;
+} xCompositeCreateRegionFromBorderClipReq;
+
+#define sz_xCompositeCreateRegionFromBorderClipReq 12
+
+/* Version 0.2 additions */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length;
+ Window window B32;
+ Pixmap pixmap B32;
+} xCompositeNameWindowPixmapReq;
+
+#define sz_xCompositeNameWindowPixmapReq 12
+
+/* Version 0.3 additions */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+} xCompositeGetOverlayWindowReq;
+
+#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq)
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window overlayWin B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xCompositeGetOverlayWindowReply;
+
+#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+} xCompositeReleaseOverlayWindowReq;
+
+#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq)
+
+#undef Window
+#undef Region
+
+#endif /* _COMPOSITEPROTO_H_ */
diff --git a/X11/extensions/compositeproto.pc.in b/X11/extensions/compositeproto.pc.in
new file mode 100644
index 000000000..634802232
--- /dev/null
+++ b/X11/extensions/compositeproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: CompositeExt
+Description: Composite extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/compositeproto.txt b/X11/extensions/compositeproto.txt
new file mode 100644
index 000000000..4b86621fa
--- /dev/null
+++ b/X11/extensions/compositeproto.txt
@@ -0,0 +1,339 @@
+ Composite Extension
+ Version 0.4
+ 2007-7-3
+ Keith Packard
+ keithp@keithp.com
+ Deron Johnson
+ deron.johnson@sun.com
+
+1. Introduction
+
+Many user interface operations would benefit from having pixel contents of
+window hierarchies available without respect to sibling and antecedent
+clipping. In addition, placing control over the composition of these pixel
+contents into a final screen image in an external application will enable
+a flexible system for dynamic application content presentation.
+
+2. Acknowledgements
+
+This small extension has been brewing for several years, contributors to
+both early prototypes and the final design include:
+
+ + Bill Haneman for motivating the ability to magnify occluded windows
+ with his work on accessibility
+
+ + Carsten Haitzler for Enlightenment, the original eye-candy window
+ manager which demonstrated that clever hacks are an awfully
+ close substitute for changes in the underlying system.
+
+ + Jim Gettys for key insights into the relationship between damage
+ events and per-window pixmap usage
+
+ + Mike Harris and Owen Taylor for figuring out what to call it.
+
+ + Deron Johnson for the Looking Glass implementation and
+ a prototype of the coordinate transformation mechanism.
+
+ + Ryan Lortie for helping figure out reasonable parent clipping
+ semantics in the presense of manual redirected children.
+
+3. Architecture
+
+The composite extension provides three related mechanisms:
+
+ 1. Per-hierarchy storage. The rendering of an entire hierarchy of windows
+ is redirected to off-screen storage. The pixels of that hierarchy
+ are available whenever it is viewable. Storage is automatically
+ reallocated when the top level window changes size. Contents beyond
+ the geometry of the top window are not preserved.
+
+ 2. Automatic shadow update. When a hierarchy is rendered off-screen,
+ the X server provides an automatic mechanism for presenting those
+ contents within the parent window. The implementation is free to
+ make this update lag behind actual rendering operations by an
+ unspecified amount of time. This automatic update mechanism may
+ be disabled so that the parent window contents can be completely
+ determined by an external application.
+
+ 3. External parent - child pointer coordinate transformation.
+ When a hierarchy is under manual compositing, the relationship
+ of coordinates within the parent to those in the child may
+ not be known within the X server. This mechanism provides
+ for redirection of these transformations through a client.
+
+Per-hierarchy storage may be created for individual windows or for all
+children of a window. Manual shadow update may be selected by only a single
+application for each window; manual update may also be selected on a
+per-window basis or for each child of a window. Detecting when to update
+may be done with the Damage extension.
+
+The off-screen storage includes the window contents, its borders and the
+contents of all descendants.
+
+3.1 NameWindowPixmap
+
+Version 0.2 of the protocol introduces a mechanism for associating an XID
+with the off-screen pixmap used to store these contents. This can be used
+to hold onto window contents after the window is unmapped (and hence animate
+it's disappearance), and also to access the border of the window, which is
+not reachable through the Window ID itself. A new pixmap is created each
+time the window is mapped or resized; as these events are nicely signalled
+with existing events, no additional notification is needed. The old pixmap
+will remain allocated as long as the Pixmap ID is left valid, it is
+important that the client use the FreePixmap request when it is done with
+the contents and to create a new name for the newly allocated pixmap.
+
+In automatic update mode, the X server is itself responsible for presenting
+the child window contents within the parent. It seems reasonable, then, for
+rendering to the parent window to be clipped so as not to interfere with any
+child window content. In an environment with a mixure of manual and
+automatic updating windows, rendering to the parent in the area nominally
+occupied by a manual update window should be able to affect parent pixel
+values in those areas, but such rendering should be clipped to automatic
+update windows, and presumably to other manual update windows managed by
+other applications. In any of these cases, it should be easy to ensure that
+rendering has no effect on any non-redirected windows.
+
+Instead of attempting to define new clipping modes for rendering, the
+Composite extension instead defines ClipByChildren rendering to the parent
+to exclude regions occupied by redirected windows (either automatic or
+manual). The CreateRegionFromBorderClip request can be used along with
+IncludeInferiors clipping modes to restrict manual shadow updates to the
+apporpriate region of the screen. Bracketing operations with
+GrabServer/UngrabServer will permit atomic sequences that can update the
+screen without artifact. As all of these operations are asynchronous,
+network latency should not adversely affect update latency.
+
+3.2 Composite Overlay Window
+
+Version 0.3 of the protocol adds the Composite Overlay Window, which
+provides compositing managers with a surface on which to draw without
+interference. This window is always above normal windows and is always
+below the screen saver window. It is an InputOutput window whose width
+and height are the screen dimensions. Its visual is the root visual
+and its border width is zero. Attempts to redirect it using the
+composite extension are ignored. This window does not appear in the
+reply of the QueryTree request. It is also an override redirect window.
+These last two features make it invisible to window managers and other X11
+clients. The only way to access the XID of this window is via the
+CompositeGetOverlayWindow request. Initially, the Composite Overlay
+Window is unmapped.
+
+CompositeGetOverlayWindow returns the XID of the Composite Overlay
+Window. If the window has not yet been mapped, it is mapped by this
+request. When all clients who have called this request have terminated
+their X11 connections the window is unmapped.
+
+Composite managers may render directly to the Composite Overlay
+Window, or they may reparent other windows to be children of this
+window and render to these. Multiple clients may render to the
+Composite Overlay Window, create child windows of it, reshape it, and
+redefine its input region, but the specific arbitration rules followed
+by these clients is not defined by this specification; these policies
+should be defined by the clients themselves.
+
+3.3 Clipping semantics redefined
+
+Version 0.4 of the protocol changes the semantics of clipping in the
+presense of manual redirect children. In version 0.3, a parent was always
+clipped to child windows, independent of the kind of redirection going on.
+With version 0.4, the parent is no longer clipped to child windows which are
+manually redirected. This means the parent can draw in the child region without using
+IncludeInferiors mode, and (perhaps more importantly), it will receive
+expose events in those regions caused by other actions. This new behaviour
+is not selectable.
+
+4. Errors
+
+The composite extension does not define any new errors.
+
+5. Types
+
+ UPDATETYPE { Automatic, Manual }
+
+ CompositeCoordinate
+ child: Window
+ x, y: CARD16
+
+7. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Otherwise, the server will return BadRequest for any
+operations other than QueryVersion.
+
+ QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the client's responsibility to ensure that the server supports
+ a version which is compatible with its expectations. Servers
+ are encouraged to support multiple versions of the extension.
+
+8. Hierarchy Redirection
+
+ RedirectWindow
+
+ window: Window
+ update: UPDATETYPE
+
+ errors: Window, Access, Match
+
+ The hierarchy starting at 'window' is directed to off-screen
+ storage. 'update' specifies whether the contents are mirrored to
+ the parent window automatically or not. Only one client may specify
+ an update type of Manual, another attempt will result in an
+ Access error. When all clients enabling redirection terminate,
+ the redirection will automatically be disabled.
+
+ The root window may not be redirected. Doing so results in a Match
+ error.
+
+ RedirectSubwindows
+
+ window: Window
+ update UPDATETYPE
+
+ errors: Window, Access
+
+ Hierarchies starting at all current and future children of window
+ will be redirected as in RedirectWindow. If update is Manual,
+ then painting of the window background during window manipulation
+ and ClearArea requests is inhibited.
+
+ UnredirectWindow:
+
+ window: Window
+
+ errors: Window, Value
+
+ Redirection of the specified window will be terminated. If
+ the specified window was not selected for redirection by the
+ current client, a 'Value' error results.
+
+ UnredirectWindows:
+
+ window: Window
+
+ errors: Window, Value
+
+ Redirection of all children of window will be terminated. If
+ the specified window was not selected for sub-redirection by the
+ current client, a 'Value' error results.
+
+9. Clip lists
+
+ CreateRegionFromBorderClip
+
+ region: Region
+ window: Window
+
+ errors: Window, IDChoice
+
+ This request creates a region containing the "usual" border clip
+ value; that is the area of the window clipped against siblings and
+ the parent. This region can be used to restrict rendering to
+ suitable areas while updating only a single window. The region
+ is copied at the moment the request is executed; future changes
+ to the window hierarchy will not be reflected in this region.
+
+10. Associating a Pixmap ID with the off-screen storage (0.2 and later)
+
+ NameWindowPixmap
+
+ window: Window
+ pixmap: Pixmap
+
+ errors: Window, Match, IDChoice
+
+ This request makes 'pixmap' a reference to the off-screen storage
+ for 'window'. This pixmap will remain allocated until freed, even
+ if 'window' is unmapped, reconfigured or destroyed. However,
+ 'window' will get a new pixmap allocated each time it is
+ mapped or resized, so this request will need to be reinvoked for
+ the client to continue to refer to the storage holding the current
+ window contents. Generates a 'Match' error if 'window' is not
+ redirected or is not visible.
+
+11. Composite Overlay Window (0.3 and later)
+
+ CompositeGetOverlayWindow
+
+ window: Window
+
+ ->
+
+ overlayWin: Window
+
+ This request returns the XID of the Composite Overlay Window for
+ the screen specified by the argument 'window'. This request
+ indicates that the client wishes to use the Composite Overlay
+ Window of this screen. If this Composite Overlay Window has not
+ yet been mapped, it is mapped by this request.
+
+ The Composite Overlay Window for a particular screen will be
+ unmapped when all clients who have invoked this request have
+ also invoked CompositeReleaseOverlayWindow for that screen. Also,
+ CompositeReleaseOverlayWindow for a screen will be implicitly
+ called when a client using the Composite Overlay Window on that
+ screen terminates its X11 connection.
+
+
+ CompositeReleaseOverlayWindow
+
+ window: Window
+
+ This request specifies that the client is no longer using the
+ Composite Overlay Window on the screen specified by the
+ argument 'window'. A screen's Composite Overlay Window is
+ unmapped when there are no longer any clients using it.
+
+12. External coordinate transformation (0.4 and later)
+
+ RedirectCoordinate
+
+ window: Window
+ redirect: BOOL
+
+ errors: Window, Access
+
+ If 'redirect' is TRUE, the requesting client is placed in charge of
+ coordinate transformations between 'window' and its children. If
+ 'redirect' is FALSE, any such redirection is disabled. Any
+ transformations needed by the server will be delivered to the
+ requesting client in TransformCoordinateNotify events and the
+ requesting client must reply with matching TransformCoordinate
+ requests for the server to continue with the operation.
+
+ Generates an 'Access' error if another client has
+ redirected coordinates for 'window'.
+
+ TransformCoordinate
+
+ window: Window
+ serialNumber: CARD32
+ x, y: INT16
+ coordinates: LISTofCompositeCoordinate
+
+ This provides the transformation data needed by the server for a
+ single TransformCoordinateNotify event. 'serialNumber' must match
+ the serial number delivered in the event. 'x' and 'y' represent the
+ coordinate from the event relative to the 'window'. 'coordinates'
+ represent the coordinate from the event relative to each child
+ listed. Any children not listed in 'coordinates' are given the
+ default transformation using the child window position within the
+ parent as a simple translation.
+
+ The result of this is that any pointer data seen by means of
+ the protocol will appear to reflect the transformation
+ performed by this request.
diff --git a/X11/extensions/configure b/X11/extensions/configure
new file mode 100644
index 000000000..ca140185b
--- /dev/null
+++ b/X11/extensions/configure
@@ -0,0 +1,3164 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for XExtProto 7.0.3.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='XExtProto'
+PACKAGE_TARNAME='xextproto'
+PACKAGE_VERSION='7.0.3'
+PACKAGE_STRING='XExtProto 7.0.3'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+AMTAR
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures XExtProto 7.0.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/xextproto]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of XExtProto 7.0.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+XExtProto configure 7.0.3
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by XExtProto $as_me 7.0.3, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version="1.8"
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xextproto'
+ VERSION='7.0.3'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+
+
+# Check whether --with-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval=$with_release_version; RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi
+
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+ac_config_files="$ac_config_files Makefile xextproto.pc"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by XExtProto $as_me 7.0.3, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+XExtProto config.status 7.0.3
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "xextproto.pc") CONFIG_FILES="$CONFIG_FILES xextproto.pc" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+AMTAR!$AMTAR$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/X11/extensions/configure.ac b/X11/extensions/configure.ac
new file mode 100644
index 000000000..8f0c24227
--- /dev/null
+++ b/X11/extensions/configure.ac
@@ -0,0 +1,8 @@
+AC_PREREQ([2.57])
+AC_INIT([XExtProto], [7.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile
+ xextproto.pc])
diff --git a/X11/extensions/damageproto.h b/X11/extensions/damageproto.h
new file mode 100644
index 000000000..d3bb04529
--- /dev/null
+++ b/X11/extensions/damageproto.h
@@ -0,0 +1,160 @@
+/*
+ * $Id: damageproto.h,v 1.1 2003-10-24 06:16:46 keithp Exp $
+ *
+ * Copyright © 2003 Keith Packard
+ * Copyright © 2007 Eric Anholt
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEPROTO_H_
+#define _DAMAGEPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/xfixesproto.h>
+#include <X11/extensions/damagewire.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define Picture CARD32
+#define Region CARD32
+#define Damage CARD32
+
+/************** Version 0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+} xDamageReq;
+
+/*
+ * requests and replies
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xDamageQueryVersionReq;
+
+#define sz_xDamageQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDamageQueryVersionReply;
+
+#define sz_xDamageQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Drawable drawable B32;
+ CARD8 level;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xDamageCreateReq;
+
+#define sz_xDamageCreateReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+} xDamageDestroyReq;
+
+#define sz_xDamageDestroyReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Region repair B32;
+ Region parts B32;
+} xDamageSubtractReq;
+
+#define sz_xDamageSubtractReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+ Region region B32;
+} xDamageAddReq;
+
+#define sz_xDamageAddReq 12
+
+/* Events */
+
+#define DamageNotifyMore 0x80
+
+typedef struct {
+ CARD8 type;
+ CARD8 level;
+ CARD16 sequenceNumber B16;
+ Drawable drawable B32;
+ Damage damage B32;
+ Time timestamp B32;
+ xRectangle area;
+ xRectangle geometry;
+} xDamageNotifyEvent;
+
+#undef Damage
+#undef Region
+#undef Picture
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _DAMAGEPROTO_H_ */
diff --git a/X11/extensions/damageproto.pc.in b/X11/extensions/damageproto.pc.in
new file mode 100644
index 000000000..25476b94f
--- /dev/null
+++ b/X11/extensions/damageproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DamageProto
+Description: Damage extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/damageproto.txt b/X11/extensions/damageproto.txt
new file mode 100644
index 000000000..54910adc5
--- /dev/null
+++ b/X11/extensions/damageproto.txt
@@ -0,0 +1,221 @@
+ The DAMAGE Extension
+ Protocol Version 1.1
+ Document Revision 1
+ 2007-01-08
+
+ Keith Packard
+ keithp@keithp.com
+
+ Eric Anholt
+ eric@anholt.net
+ Open Source Technology Center
+ Intel Corporation
+1. Introduction
+
+Monitoring the regions affected by rendering has wide-spread use, from
+VNC-like systems scraping the screen to screen magnifying applications
+designed to aid users with limited visual acuity. The DAMAGE extension is
+designed to make such applications reasonably efficient in the face of
+server-client latency.
+
+2. Acknolwedgements
+
+As usual, the author had significant input from many people, in particular:
+
+ + Havoc Pennington who designed and implemented a Damage extension
+ last year which was then lost to the mists of time.
+
+ + Bill Haneman whose work on accessibility in the Gnome environment
+ is legendary.
+
+ + Jim Gettys who found a way to avoid streaming damage rectangles
+ to the client in many cases.
+
+ + Owen Taylor who suggested that streaming damage rectangles may
+ be warranted in some cases after all.
+
+3. Damage Model
+
+We call changes made to pixel contents of windows and pixmaps 'damage'
+throughout this extension. Another notion of 'damage' are drawable regions
+which are in need of redisplay to repair the effects of window manipulation
+or other data loss. This extension doesn't deal with this second notion at
+all; suggestions on a better term which isn't easily conflated with existing
+notions are eagerly solicited.
+
+Damage accumulates as drawing occurs in the drawable. Each drawing operation
+'damages' one or more rectangular areas within the drawable. The rectangles
+are guaranteed to include the set of pixels modified by each operation, but
+may include significantly more than just those pixels. The desire is for
+the damage to strike a balance between the number of rectangles reported and
+the extraneous area included. A reasonable goal is for each primitive
+object drawn (line, string, rectangle) to be represented as a single
+rectangle and for the damage area of the operation to be the union of these
+rectangles.
+
+The DAMAGE extension allows applications to either receive the raw
+rectangles as a stream of events, or to have them partially processed within
+the X server to reduce the amount of data transmitted as well as reduce the
+processing latency once the repaint operation has started.
+
+Damage to a window reflects both drawing within the window itself as well as
+drawing within any inferior window that affects pixels seen by
+IncludeInferiors rendering operations. To reduce the computational
+complexity of this, the DAMAGE extension allows the server to monitor all
+rendering operations within the physical target pixel storage that fall
+within the bounds of the window. In a system with a single frame buffer
+holding all windows, this means that damage will accumulate for all
+rendering operations that lie within the visible part of the window.
+
+The precise reason for this architecture is to enable the Composite
+extension which provides multiple pixel storage areas for the screen
+contents.
+
+3.1 Additions in the 1.1 version of the protocol
+
+Damage is automatically computed by the X Server for X rendering operations,
+but direct rendering extensions have allowed clients to perform rendering
+outside of the control of the X Server. The 1.1 version of the protocol
+added a request to allow direct rendering clients to report damage to a
+drawable. Some direct rendering clients, due to architectural limitations,
+always perform rendering to the root window, even in when it should be
+performed to the backing pixmap in the Composite case. To provide
+less-incorrect rendering in this cases, the direct rendering client should
+translate its damage region to screen coordinates and report the damage against
+the root window rather than the drawable.
+
+4. Data types
+
+The "Damage" object holds any accumulated damage region and reflects the
+relationship between the drawable selected for damage notification and the
+drawable for which damage is tracked.
+
+5. Errors
+
+Damage
+ A value for a DAMAGE argument does not name a defined DAMAGE.
+
+6. Types
+
+ DAMAGE 32-bit value (top three bits guaranteed to be zero)
+
+ DamageReportLevel { DamageReportRawRectangles,
+ DamageReportDeltaRectangles,
+ DamageReportBoundingBox,
+ DamageReportNonEmpty }
+
+ DamageReportRawRectangles
+
+ Delivers DamageNotify events each time the screen
+ is modified with rectangular bounds that circumscribe
+ the damaged area. No attempt to compress out overlapping
+ rectangles is made.
+
+ DamageReportDeltaRectangles
+
+ Delivers DamageNotify events each time damage occurs
+ which is not included in the damage region. The
+ reported rectangles include only the changes to that
+ area, not the raw damage data.
+
+ DamageReportBoundingBox
+
+ Delivers DamageNotify events each time the bounding
+ box enclosing the damage region increases in size.
+ The reported rectangle encloses the entire damage region,
+ not just the changes to that size.
+
+ DamageReportNonEmpty
+
+ Delivers a single DamageNotify event each time the
+ damage rectangle changes from empty to non-empty, and
+ also whenever the result of a DamageSubtract request
+ results in a non-empty region.
+
+7. Events
+
+DamageNotify
+
+ level: DamageReportLevel
+ drawable: Drawable
+ damage: DAMAGE
+ more: Bool
+ timestamp: Timestamp
+ area: Rectangle
+ drawable-geometry: Rectangle
+
+ 'more' indicates whether there are subsequent damage events
+ being delivered immediately as part of a larger damage region
+
+8. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Otherwise, the server will return BadRequest for any
+operations other than QueryVersion.
+
+QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the clients responsibility to ensure that the server supports
+ a version which is compatible with its expectations. Servers
+ are encouraged to support multiple versions of the extension.
+
+9. Enable Monitoring
+
+DamageCreate
+
+ damage: DAMAGE
+ drawable: Drawable
+ level: DamageReportLevel
+
+ Creates a damage object to monitor changes to Drawable
+
+DamageDestroy
+ damage: DAMAGE
+
+ Destroys damage.
+
+DamageSubtract
+
+ damage: DAMAGE
+ repair: Region or None
+ parts: Region
+
+ Synchronously modifies the regions in the following manner:
+
+ If repair is None:
+
+ 1) parts = damage
+ 2) damage = <empty>
+
+ Otherwise:
+
+ 1) parts = damage INTERSECT repair
+ 2) damage = damage - parts
+ 3) Generate DamageNotify for remaining damage areas
+
+DamageAdd
+
+ drawable: Drawable
+ region: Region
+
+ Reports damage of the region within the given drawable. This may be
+ used by direct rendering clients to report damage that the server would
+ otherwise be unaware of. The damage region is relative to the origin
+ of the drawable.
+
+ Damage posted in this way will appear in DamageNotify events as normal,
+ and also in server internal damage tracking (for shadow framebuffer
+ updates, pixmap damage, and other uses).
diff --git a/X11/extensions/damagewire.h b/X11/extensions/damagewire.h
new file mode 100644
index 000000000..466f0d0e3
--- /dev/null
+++ b/X11/extensions/damagewire.h
@@ -0,0 +1,58 @@
+/*
+ * $Id: damagewire.h,v 1.1 2003-10-24 06:16:46 keithp Exp $
+ *
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEWIRE_H_
+#define _DAMAGEWIRE_H_
+
+#define DAMAGE_NAME "DAMAGE"
+#define DAMAGE_MAJOR 1
+#define DAMAGE_MINOR 1
+
+/************* Version 1 ****************/
+
+/* Constants */
+#define XDamageReportRawRectangles 0
+#define XDamageReportDeltaRectangles 1
+#define XDamageReportBoundingBox 2
+#define XDamageReportNonEmpty 3
+
+/* Requests */
+#define X_DamageQueryVersion 0
+#define X_DamageCreate 1
+#define X_DamageDestroy 2
+#define X_DamageSubtract 3
+#define X_DamageAdd 4
+
+#define XDamageNumberRequests (X_DamageAdd + 1)
+
+/* Events */
+#define XDamageNotify 0
+
+#define XDamageNumberEvents (XDamageNotify + 1)
+
+/* Errors */
+#define BadDamage 0
+#define XDamageNumberErrors (BadDamage + 1)
+
+#endif /* _DAMAGEWIRE_H_ */
diff --git a/X11/extensions/dpms.h b/X11/extensions/dpms.h
new file mode 100644
index 000000000..7555f4ab6
--- /dev/null
+++ b/X11/extensions/dpms.h
@@ -0,0 +1,67 @@
+/* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*****************************************************************
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+/* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */
+
+#ifndef _X11_EXTENSIONS_DPMS_H
+#define _X11_EXTENSIONS_DPMS_H 1
+
+/*
+ * HISTORY
+ */
+/*
+ * @(#)RCSfile: dpms.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:17
+ */
+
+
+#define DPMSModeOn 0
+#define DPMSModeStandby 1
+#define DPMSModeSuspend 2
+#define DPMSModeOff 3
+
+#ifndef DPMS_SERVER
+
+#include <X11/X.h>
+#include <X11/Xmd.h>
+
+_XFUNCPROTOBEGIN
+
+extern Bool DPMSQueryExtension(Display *, int *, int *);
+extern Status DPMSGetVersion(Display *, int *, int *);
+extern Bool DPMSCapable(Display *);
+extern Status DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16);
+extern Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *);
+extern Status DPMSEnable(Display *);
+extern Status DPMSDisable(Display *);
+extern Status DPMSForceLevel(Display *, CARD16);
+extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
+
+_XFUNCPROTOEND
+#endif /* !DPMS_SERVER */
+#endif /* !_X11_EXTENSIONS_DPMS_H */
+
diff --git a/X11/extensions/dpmsstr.h b/X11/extensions/dpmsstr.h
new file mode 100644
index 000000000..9386d4a2c
--- /dev/null
+++ b/X11/extensions/dpmsstr.h
@@ -0,0 +1,186 @@
+/* $Xorg: dpmsstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*****************************************************************
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+/* $XFree86$ */
+
+/*
+ * HISTORY
+ */
+/*
+ * @(#)RCSfile: dpmsstr.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:19
+ */
+
+#ifndef _DPMSSTR_H_
+#define _DPMSSTR_H_
+
+#define X_DPMSGetVersion 0
+#define X_DPMSCapable 1
+#define X_DPMSGetTimeouts 2
+#define X_DPMSSetTimeouts 3
+#define X_DPMSEnable 4
+#define X_DPMSDisable 5
+#define X_DPMSForceLevel 6
+#define X_DPMSInfo 7
+
+#define DPMSNumberEvents 0
+
+#define DPMSNumberErrors 0
+
+#define DPMSMajorVersion 1
+#define DPMSMinorVersion 1
+
+#define DPMSExtensionName "DPMS"
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSGetVersion */
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xDPMSGetVersionReq;
+#define sz_xDPMSGetVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDPMSGetVersionReply;
+#define sz_xDPMSGetVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSCapable */
+ CARD16 length B16;
+} xDPMSCapableReq;
+#define sz_xDPMSCapableReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL capable;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xDPMSCapableReply;
+#define sz_xDPMSCapableReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */
+ CARD16 length B16;
+} xDPMSGetTimeoutsReq;
+#define sz_xDPMSGetTimeoutsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 standby B16;
+ CARD16 suspend B16;
+ CARD16 off B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDPMSGetTimeoutsReply;
+#define sz_xDPMSGetTimeoutsReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */
+ CARD16 length B16;
+ CARD16 standby B16;
+ CARD16 suspend B16;
+ CARD16 off B16;
+ CARD16 pad0 B16;
+} xDPMSSetTimeoutsReq;
+#define sz_xDPMSSetTimeoutsReq 12
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSEnable */
+ CARD16 length B16;
+} xDPMSEnableReq;
+#define sz_xDPMSEnableReq 4
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSDisable */
+ CARD16 length B16;
+} xDPMSDisableReq;
+#define sz_xDPMSDisableReq 4
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSForceLevel */
+ CARD16 length B16;
+ CARD16 level B16; /* power level requested */
+ CARD16 pad0 B16;
+} xDPMSForceLevelReq;
+#define sz_xDPMSForceLevelReq 8
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSInfo */
+ CARD16 length B16;
+} xDPMSInfoReq;
+#define sz_xDPMSInfoReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 power_level B16;
+ BOOL state;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xDPMSInfoReply;
+#define sz_xDPMSInfoReply 32
+
+#endif /* _DPMSSTR_H_ */
diff --git a/X11/extensions/evieproto.pc.in b/X11/extensions/evieproto.pc.in
new file mode 100644
index 000000000..795a1cddf
--- /dev/null
+++ b/X11/extensions/evieproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: EvIEExt
+Description: EvIE extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/extutil.h b/X11/extensions/extutil.h
new file mode 100644
index 000000000..825d81e93
--- /dev/null
+++ b/X11/extensions/extutil.h
@@ -0,0 +1,192 @@
+/*
+ * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Jim Fulton, MIT The Open Group
+ *
+ * Xlib Extension-Writing Utilities
+ *
+ * This package contains utilities for writing the client API for various
+ * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
+ * ARE SUBJECT TO CHANGE!
+ */
+/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */
+
+#ifndef _EXTUTIL_H_
+#define _EXTUTIL_H_
+
+#include <X11/extensions/Xext.h>
+
+/*
+ * We need to keep a list of open displays since the Xlib display list isn't
+ * public. We also have to per-display info in a separate block since it isn't
+ * stored directly in the Display structure.
+ */
+typedef struct _XExtDisplayInfo {
+ struct _XExtDisplayInfo *next; /* keep a linked list */
+ Display *display; /* which display this is */
+ XExtCodes *codes; /* the extension protocol codes */
+ XPointer data; /* extra data for extension to use */
+} XExtDisplayInfo;
+
+typedef struct _XExtensionInfo {
+ XExtDisplayInfo *head; /* start of list */
+ XExtDisplayInfo *cur; /* most recently used */
+ int ndisplays; /* number of displays */
+} XExtensionInfo;
+
+typedef struct _XExtensionHooks {
+ int (*create_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*copy_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*flush_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*free_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*create_font)(
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+ int (*free_font)(
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+ int (*close_display)(
+ Display* /* display */,
+ XExtCodes* /* codes */
+);
+ Bool (*wire_to_event)(
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+ Status (*event_to_wire)(
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+ int (*error)(
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+);
+ char *(*error_string)(
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+);
+} XExtensionHooks;
+
+extern XExtensionInfo *XextCreateExtension(
+ void
+);
+extern void XextDestroyExtension(
+ XExtensionInfo* /* info */
+);
+extern XExtDisplayInfo *XextAddDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */,
+ char* /* ext_name */,
+ XExtensionHooks* /* hooks */,
+ int /* nevents */,
+ XPointer /* data */
+);
+extern int XextRemoveDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */
+);
+extern XExtDisplayInfo *XextFindDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */
+);
+
+#define XextHasExtension(i) ((i) && ((i)->codes))
+#define XextCheckExtension(dpy,i,name,val) \
+ if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
+#define XextSimpleCheckExtension(dpy,i,name) \
+ if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
+
+
+/*
+ * helper macros to generate code that is common to all extensions; caller
+ * should prefix it with static if extension source is in one file; this
+ * could be a utility function, but have to stack 6 unused arguments for
+ * something that is called many, many times would be bad.
+ */
+#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
+XExtDisplayInfo *proc (Display *dpy) \
+{ \
+ XExtDisplayInfo *dpyinfo; \
+ if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
+ if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
+ dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
+ return dpyinfo; \
+}
+
+#define XEXT_FIND_DISPLAY_PROTO(proc) \
+ XExtDisplayInfo *proc(Display *dpy)
+
+#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
+int proc (Display *dpy, XExtCodes *codes) \
+{ \
+ return XextRemoveDisplay (extinfo, dpy); \
+}
+
+#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
+ int proc(Display *dpy, XExtCodes *codes)
+
+#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
+char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
+{ \
+ code -= codes->first_error; \
+ if (code >= 0 && code < nerr) { \
+ char tmp[256]; \
+ sprintf (tmp, "%s.%d", extname, code); \
+ XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
+ return buf; \
+ } \
+ return (char *)0; \
+}
+
+#define XEXT_ERROR_STRING_PROTO(proc) \
+ char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
+#endif
diff --git a/X11/extensions/fixesproto.pc.in b/X11/extensions/fixesproto.pc.in
new file mode 100644
index 000000000..055dcbc64
--- /dev/null
+++ b/X11/extensions/fixesproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FixesProto
+Description: Fixes extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/ge.h b/X11/extensions/ge.h
new file mode 100644
index 000000000..6521698a9
--- /dev/null
+++ b/X11/extensions/ge.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Peter Hutterer, University of South Australia, NICTA
+ *
+ */
+
+#ifndef _GE_H_
+#define _GE_H_
+
+#define GE_NAME "Generic Event Extension"
+#define GE_MAJOR 1
+#define GE_MINOR 0
+
+/*********************************************************
+ *
+ * Requests
+ *
+ */
+
+#define X_GEQueryVersion 0
+
+#define GENumberRequests (X_GEQueryVersion + 1)
+
+/*********************************************************
+ *
+ * Events
+ *
+ */
+
+#define X_GenericEvent 0
+
+#define GENumberEvents (X_GenericEvent + 1)
+
+/*********************************************************
+ *
+ * Errors
+ *
+ */
+
+#define GENumberErrors 0
+
+#endif /* _GE_H_ */
diff --git a/X11/extensions/geproto.h b/X11/extensions/geproto.h
new file mode 100644
index 000000000..54107df8f
--- /dev/null
+++ b/X11/extensions/geproto.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright © 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Peter Hutterer, University of South Australia, NICTA
+ *
+ */
+
+#ifndef _GEPROTO_H_
+#define _GEPROTO_H_
+
+#include<X11/Xproto.h>
+#include<X11/X.h>
+#include<X11/extensions/ge.h>
+
+
+/*********************************************************
+ *
+ * Protocol request constants
+ *
+ */
+
+#define X_GEGetExtensionVersion 1
+
+/*********************************************************
+ *
+ * XGE protocol requests/replies
+ *
+ */
+
+/* generic request */
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType;
+ CARD16 length B16;
+} xGEReq;
+
+
+/* QueryVersion */
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GEQueryVersion */
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xGEQueryVersionReq;
+
+#define sz_xGEQueryVersionReq 8
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GEQueryVersion */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+} xGEQueryVersionReply;
+
+#define sz_xGEQueryVersionReply 32
+
+#endif /* _GEPROTO_H_ */
+
diff --git a/X11/extensions/inputproto.pc.in b/X11/extensions/inputproto.pc.in
new file mode 100644
index 000000000..c499cda39
--- /dev/null
+++ b/X11/extensions/inputproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: InputProto
+Description: Input extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/install-sh b/X11/extensions/install-sh
new file mode 100644
index 000000000..e4160c991
--- /dev/null
+++ b/X11/extensions/install-sh
@@ -0,0 +1,325 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-04-01.17
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=
+transform_arg=
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+
+usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 -d DIRECTORIES...
+
+In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
+In the second, create the directory path DIR.
+
+Options:
+-b=TRANSFORMBASENAME
+-c copy source (using $cpprog) instead of moving (using $mvprog).
+-d create directories instead of installing files.
+-g GROUP $chgrp installed files to GROUP.
+-m MODE $chmod installed files to MODE.
+-o USER $chown installed files to USER.
+-s strip installed files (using $stripprog).
+-t=TRANSFORM
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ test -n "$dir_arg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ instcmd=:
+ chmodcmd=
+ else
+ instcmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp" || lasterr=$?
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $instcmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ # If we're going to rename the final executable, determine the name now.
+ if test -z "$transformarg"; then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename \
+ | sed $transformarg`$transformbasename
+ fi
+
+ # don't allow the sed command to completely eliminate the filename.
+ test -z "$dstfile" && dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Move or copy the file name to the temp name
+ $doit $instcmd "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $instcmd $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/extensions/kbproto.pc.in b/X11/extensions/kbproto.pc.in
new file mode 100644
index 000000000..02a6d4403
--- /dev/null
+++ b/X11/extensions/kbproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: KBProto
+Description: KB extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/lbxbuf.h b/X11/extensions/lbxbuf.h
new file mode 100644
index 000000000..63983df16
--- /dev/null
+++ b/X11/extensions/lbxbuf.h
@@ -0,0 +1,51 @@
+/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name Network Computing Devices, Inc. not be
+ * used in advertising or publicity pertaining to distribution of this
+ * software without specific, written prior permission.
+ *
+ * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
+ * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
+ * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
+ * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
+ * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
+ * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ */
+
+#ifndef _BUFFER_H_
+#define _BUFFER_H_
+
+#define INBUFFER_SIZE (1 << 13) /* 8K */
+#define OUTBUFFER_SIZE (1 << 12) /* 4K */
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+typedef struct _zlibbuffer *ZlibBufferPtr;
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+extern int InitZlibBuffer(ZlibBufferPtr b, int size);
+extern void FreeZlibBuffer(ZlibBufferPtr b);
+extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen);
+
+_XFUNCPROTOEND
+
+#endif /* _BUFFER_H_ */
diff --git a/X11/extensions/lbxbufstr.h b/X11/extensions/lbxbufstr.h
new file mode 100644
index 000000000..e1a06f633
--- /dev/null
+++ b/X11/extensions/lbxbufstr.h
@@ -0,0 +1,45 @@
+/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name Network Computing Devices, Inc. not be
+ * used in advertising or publicity pertaining to distribution of this
+ * software without specific, written prior permission.
+ *
+ * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
+ * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
+ * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
+ * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
+ * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
+ * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ */
+/* $XFree86$ */
+
+#ifndef _BUFFERSTR_H_
+#define _BUFFERSTR_H_
+
+#include <X11/extensions/lbxbuf.h>
+
+/*
+ * ZLIB Input/Output buffer
+ */
+typedef struct _zlibbuffer {
+ char *bufbase;
+ char *bufend;
+ char *bufptr;
+ int bufcnt;
+} ZlibBuffer;
+
+#define BYTES_AVAIL(inbuf, len) \
+ (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL)
+
+#endif /* _BUFFERSTR_H_ */
diff --git a/X11/extensions/lbxdeltastr.h b/X11/extensions/lbxdeltastr.h
new file mode 100644
index 000000000..a8e4cb3b0
--- /dev/null
+++ b/X11/extensions/lbxdeltastr.h
@@ -0,0 +1,105 @@
+/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1993 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef LBX_DELTA_STRUCT_H
+#define LBX_DELTA_STRUCT_H
+
+#define MIN_CACHEABLE_LEN 8
+
+#define DELTA_CACHEABLE(pcache, len) \
+ ((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize)
+
+/*
+ * An entry in the delta compactor cache
+ */
+typedef struct _LBXDeltaElem {
+ int length;
+ unsigned char *buf;
+} LBXDeltaElemRec, *LBXDeltaElemPtr;
+
+
+/*
+ * Delta compactor cache
+ */
+typedef struct _LBXDeltas {
+ unsigned short nDeltas;
+ unsigned short maxDeltasize;
+ LBXDeltaElemPtr deltas;
+ unsigned short nextDelta;
+ unsigned short activeDeltas; /* only needed for outgoing */
+} LBXDeltasRec, *LBXDeltasPtr;
+
+
+/*
+ * Motion delta cache
+ */
+
+typedef struct {
+ BYTE swapped;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BOOL sameScreen;
+} lbxMotionCache;
+
+
+/*
+ * Motion delta events
+ */
+
+typedef struct {
+ BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */
+ CARD8 deltaTime;
+ INT8 deltaX;
+ INT8 deltaY;
+} lbxQuickMotionDeltaEvent;
+#define sz_lbxQuickMotionDeltaEvent 4
+
+typedef struct {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxMotionDeltaEvent */
+ INT8 deltaX;
+ INT8 deltaY;
+ CARD16 deltaTime B16;
+ CARD16 deltaSequence B16;
+} lbxMotionDeltaEvent;
+#define sz_lbxMotionDeltaEvent 8
+
+extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas,
+ int maxDeltasize );
+extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache );
+extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg,
+ int inmsglen, int maxdiff, int *pindex );
+extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg,
+ int ndiff, int index, unsigned char *buf );
+extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas,
+ int ndiff, int index, unsigned char **buf );
+extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg,
+ int inmsglen );
+extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg,
+ int inmsglen );
+
+#endif /* LBX_DELTA_STRUCT_H */
diff --git a/X11/extensions/lbximage.h b/X11/extensions/lbximage.h
new file mode 100644
index 000000000..10627cf29
--- /dev/null
+++ b/X11/extensions/lbximage.h
@@ -0,0 +1,151 @@
+/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+/******************************************************************************
+
+Copyright 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+******************************************************************************/
+/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */
+
+#ifndef _LBX_IMAGE_H_
+#define _LBX_IMAGE_H_
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+typedef struct _LbxBitmapCompMethod {
+
+ char *methodName;
+ int inited;
+ int methodOpCode; /* to be filled on reply from server */
+
+ int (*compInit)(
+ void
+ );
+
+ int (*compFunc)(
+ unsigned char * /* inbuf */,
+ unsigned char * /* outbuf */,
+ int /* outbufSize */,
+ int /* image_bytes */,
+ int /* pixels_per_line */,
+ int /* padded_bytes_per_scanline */,
+ int /* reverse_bits */,
+ int * /* bytesCompressed */
+ );
+
+ int (*decompFunc)(
+ unsigned char * /* inbuf */,
+ unsigned char * /* outbuf */,
+ int /* image_bytes */,
+ int /* pixels_per_line */,
+ int /* padded_bytes_per_scanline */,
+ int /* reverse_bits */
+ );
+
+} LbxBitmapCompMethod;
+
+
+#define LBX_MAX_DEPTHS 5
+
+typedef struct _LbxPixmapCompMethod {
+
+ char *methodName;
+ unsigned formatMask;
+ int depthCount;
+ int depths[LBX_MAX_DEPTHS];
+ int inited;
+ int methodOpCode; /* to be filled on reply from server */
+
+ int (*compInit)(
+ void
+ );
+
+ int (*compFunc)(
+ char * /* inbuf */,
+ char * /* outbuf */,
+ int /* outbufSize */,
+ int /* format */,
+ int /* depth */,
+ int /* num_scan_lines */,
+ int /* scan_line_size */,
+ int * /* bytesCompressed */
+ );
+
+ int (*decompFunc)(
+ char * /* inbuf */,
+ char * /* outbuf */,
+ int /* num_scan_lines */,
+ int /* scan_line_size */
+ );
+
+} LbxPixmapCompMethod;
+
+
+extern int LbxImageEncodePackBits (
+char * /* inbuf */,
+char * /* outbuf */,
+int /* outbufSize */,
+int /* format */,
+int /* depth */,
+int /* num_scan_lines */,
+int /* scan_line_size */,
+int * /* bytesCompressed */
+);
+
+extern int LbxImageEncodeFaxG42D (
+unsigned char * /* inbuf */,
+unsigned char * /* outbuf */,
+int /* outbufSize */,
+int /* image_bytes */,
+int /* pixels_per_line */,
+int /* padded_bytes_per_scanline */,
+int /* reverse_bits */,
+int * /* bytesCompressed */
+);
+
+extern int LbxImageDecodePackBits (
+char * /* inbuf */,
+char * /* outbuf */,
+int /* num_scan_lines */,
+int /* scan_line_size */
+);
+
+extern int LbxImageDecodeFaxG42D (
+unsigned char * /* inbuf */,
+unsigned char * /* outbuf */,
+int /* image_bytes */,
+int /* pixels_per_line */,
+int /* padded_bytes_per_scanline */,
+int /* reverse_bits */
+);
+
+_XFUNCPROTOEND
+
+#define LBX_IMAGE_COMPRESS_SUCCESS 0
+#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1
+#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2
+#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3
+
+#endif /* _LBX_IMAGE_H_ */
diff --git a/X11/extensions/lbxopts.h b/X11/extensions/lbxopts.h
new file mode 100644
index 000000000..02e87fd26
--- /dev/null
+++ b/X11/extensions/lbxopts.h
@@ -0,0 +1,133 @@
+/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1994 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name Network Computing Devices, Inc. not be
+ * used in advertising or publicity pertaining to distribution of this
+ * software without specific, written prior permission.
+ *
+ * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
+ * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
+ * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
+ * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
+ * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
+ * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */
+
+#ifndef _LBX_OPTS_H_
+#define _LBX_OPTS_H_
+
+/*
+ * Negotiable configuration options
+ */
+#define LBX_OPT_DELTA_PROXY 0
+#define LBX_OPT_DELTA_SERVER 1
+#define LBX_OPT_STREAM_COMP 2
+#define LBX_OPT_BITMAP_COMP 3
+#define LBX_OPT_PIXMAP_COMP 4
+#define LBX_OPT_MSG_COMP 5 /* aka "squishing" */
+#define LBX_OPT_USE_TAGS 6
+#define LBX_OPT_CMAP_ALL 7
+#define LBX_OPT_EXTENSION 255
+
+/*
+ * Length fields are encoded in 1 or 3 bytes
+ */
+#define LBX_OPT_SMALLLEN_SIZE 1
+#define LBX_OPT_BIGLEN_SIZE 3
+#define LBX_OPT_BIGLEN_MIN 256
+
+#define LBX_OPT_DECODE_LEN(p, len, size) \
+ if ((p)[0]) { \
+ (len) = (p)[0]; \
+ (size) = LBX_OPT_SMALLLEN_SIZE; \
+ } \
+ else { \
+ (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \
+ (size) = LBX_OPT_BIGLEN_SIZE; \
+ }
+
+/*
+ * Option header lengths
+ */
+#define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE)
+#define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE)
+
+/*
+ * Delta compression parameters
+ */
+#define LBX_OPT_DELTA_REQLEN 6
+#define LBX_OPT_DELTA_REPLYLEN 2
+#define LBX_OPT_DELTA_NCACHE_DFLT 16
+#define LBX_OPT_DELTA_MSGLEN_MIN 32
+#define LBX_OPT_DELTA_MSGLEN_DFLT 64
+
+
+/*
+ * Stream compression opts
+ */
+
+#include <sys/types.h>
+
+#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__))
+
+struct iovec {
+ caddr_t iov_base;
+ int iov_len;
+};
+
+#else
+#ifndef Lynx
+#include <sys/uio.h>
+#else
+#include <uio.h>
+#endif
+#endif
+
+typedef void *LbxStreamCompHandle;
+
+typedef struct _LbxStreamOpts {
+ LbxStreamCompHandle (*streamCompInit)(int fd, pointer arg);
+ pointer streamCompArg;
+ int (*streamCompStuffInput)(
+ int fd,
+ unsigned char *buf,
+ int buflen
+ );
+ int (*streamCompInputAvail)(
+ int fd
+ );
+ int (*streamCompFlush)(
+ int fd
+ );
+ int (*streamCompRead)(
+ int fd,
+ unsigned char *buf,
+ int buflen
+ );
+ int (*streamCompWriteV)(
+ int fd,
+ struct iovec *iov,
+ int iovcnt
+ );
+ void (*streamCompOn)(
+ int fd
+ );
+ void (*streamCompOff)(
+ int fd
+ );
+ void (*streamCompFreeHandle)(
+ LbxStreamCompHandle handle
+ );
+} LbxStreamOpts;
+
+#endif /* _LBX_OPTS_H_ */
diff --git a/X11/extensions/lbxstr.h b/X11/extensions/lbxstr.h
new file mode 100644
index 000000000..5b79e361f
--- /dev/null
+++ b/X11/extensions/lbxstr.h
@@ -0,0 +1,935 @@
+/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $XFree86: xc/include/extensions/lbxstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */
+
+#ifndef _LBXSTR_H_
+#define _LBXSTR_H_
+
+#include <X11/extensions/XLbx.h>
+
+#define LBXNAME "LBX"
+
+#define LBX_MAJOR_VERSION 1
+#define LBX_MINOR_VERSION 0
+
+/*
+ * Redefine some basic types used by structures defined herein. This removes
+ * any possibility on 64-bit architectures of one entity viewing communicated
+ * data as 32-bit quantities and another entity viewing the same data as 64-bit
+ * quantities.
+ */
+#define XID CARD32
+#define Atom CARD32
+#define Colormap CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct {
+ BOOL success; /* TRUE */
+ BOOL changeType;
+ CARD16 majorVersion B16,
+ minorVersion B16;
+ CARD16 length B16; /* 1/4 additional bytes in setup info */
+ CARD32 tag B32;
+} xLbxConnSetupPrefix;
+
+typedef struct _LbxQueryVersion {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryVersion */
+ CARD16 length B16;
+} xLbxQueryVersionReq;
+#define sz_xLbxQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of LBX protocol */
+ CARD16 minorVersion B16; /* minor version of LBX protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxQueryVersionReply;
+#define sz_xLbxQueryVersionReply 32
+
+typedef struct _LbxStartProxy {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxStartProxy */
+ CARD16 length B16;
+} xLbxStartProxyReq;
+#define sz_xLbxStartProxyReq 4
+
+typedef struct _LbxStopProxy {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxStopProxy */
+ CARD16 length B16;
+} xLbxStopProxyReq;
+#define sz_xLbxStopProxyReq 4
+
+typedef struct _LbxSwitch {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxSwitch */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxSwitchReq;
+#define sz_xLbxSwitchReq 8
+
+typedef struct _LbxNewClient {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxNewClient */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxNewClientReq;
+#define sz_xLbxNewClientReq 8
+
+typedef struct _LbxCloseClient {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxCloseClient */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxCloseClientReq;
+#define sz_xLbxCloseClientReq 8
+
+typedef struct _LbxModifySequence {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxModifySequence */
+ CARD16 length B16;
+ CARD32 adjust B32;
+} xLbxModifySequenceReq;
+#define sz_xLbxModifySequenceReq 8
+
+typedef struct _LbxAllowMotion {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxAllowMotion */
+ CARD16 length B16;
+ CARD32 num B32;
+} xLbxAllowMotionReq;
+#define sz_xLbxAllowMotionReq 8
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGrabCmap */
+ CARD16 length B16;
+ Colormap cmap B32;
+} xLbxGrabCmapReq;
+#define sz_xLbxGrabCmapReq 8
+
+#define LBX_SMART_GRAB 0x80
+#define LBX_AUTO_RELEASE 0x40
+#define LBX_3CHANNELS 0x20
+#define LBX_2BYTE_PIXELS 0x10
+#define LBX_RGB_BITS_MASK 0x0f
+
+#define LBX_LIST_END 0
+#define LBX_PIXEL_PRIVATE 1
+#define LBX_PIXEL_SHARED 2
+#define LBX_PIXEL_RANGE_PRIVATE 3
+#define LBX_PIXEL_RANGE_SHARED 4
+#define LBX_NEXT_CHANNEL 5
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 flags;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B16;
+} xLbxGrabCmapReply;
+#define sz_xLbxGrabCmapReply 32
+#define sz_xLbxGrabCmapReplyHdr 8
+
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxReleaseCmap */
+ CARD16 length B16;
+ Colormap cmap B32;
+} xLbxReleaseCmapReq;
+#define sz_xLbxReleaseCmapReq 8
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxAllocColor */
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 pixel B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad B16;
+} xLbxAllocColorReq;
+#define sz_xLbxAllocColorReq 20
+
+typedef struct _LbxIncrementPixel {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxIncrementPixel */
+ CARD16 length B16;
+ CARD32 cmap B32;
+ CARD32 pixel B32;
+} xLbxIncrementPixelReq;
+#define sz_xLbxIncrementPixelReq 12
+
+typedef struct _LbxDelta {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxDelta */
+ CARD16 length B16;
+ CARD8 diffs; /* number of diffs */
+ CARD8 cindex; /* cache index */
+ /* list of diffs follows */
+} xLbxDeltaReq;
+#define sz_xLbxDeltaReq 6
+
+typedef struct _LbxGetModifierMapping {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetModifierMapping */
+ CARD16 length B16;
+} xLbxGetModifierMappingReq;
+#define sz_xLbxGetModifierMappingReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 keyspermod;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxGetModifierMappingReply;
+#define sz_xLbxGetModifierMappingReply 32
+
+typedef struct _LbxGetKeyboardMapping {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ CARD16 pad1 B16;
+} xLbxGetKeyboardMappingReq;
+#define sz_xLbxGetKeyboardMappingReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 keysperkeycode;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxGetKeyboardMappingReply;
+#define sz_xLbxGetKeyboardMappingReply 32
+
+typedef struct _LbxQueryFont {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryFont */
+ CARD16 length B16;
+ CARD32 fid B32;
+} xLbxQueryFontReq;
+#define sz_xLbxQueryFontReq 8
+
+typedef struct _LbxInternAtoms {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxInternAtoms */
+ CARD16 length B16;
+ CARD16 num B16;
+} xLbxInternAtomsReq;
+#define sz_xLbxInternAtomsReq 6
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 atomsStart B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxInternAtomsReply;
+#define sz_xLbxInternAtomsReply 32
+#define sz_xLbxInternAtomsReplyHdr 8
+
+
+typedef struct _LbxGetWinAttrAndGeom {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */
+ CARD16 length B16;
+ CARD32 id B32; /* window id */
+} xLbxGetWinAttrAndGeomReq;
+#define sz_xLbxGetWinAttrAndGeomReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 backingStore;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* NOT 0; this is an extra-large reply */
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ CARD8 bitGravity;
+ CARD8 winGravity;
+ CARD32 backingBitPlanes B32;
+ CARD32 backingPixel B32;
+ BOOL saveUnder;
+ BOOL mapInstalled;
+ CARD8 mapState;
+ BOOL override;
+ Colormap colormap B32;
+ CARD32 allEventMasks B32;
+ CARD32 yourEventMask B32;
+ CARD16 doNotPropagateMask B16;
+ CARD16 pad1 B16;
+ Window root B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD16 borderWidth B16;
+ CARD8 depth;
+ CARD8 pad2;
+} xLbxGetWinAttrAndGeomReply;
+#define sz_xLbxGetWinAttrAndGeomReply 60
+
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxSync */
+ CARD16 length B16;
+} xLbxSyncReq;
+#define sz_xLbxSyncReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxSyncReply;
+#define sz_xLbxSyncReply 32
+
+
+/* an LBX squished charinfo packs the data in a CARD32 as follows */
+#define LBX_WIDTH_SHIFT 26
+#define LBX_LEFT_SHIFT 20
+#define LBX_RIGHT_SHIFT 13
+#define LBX_ASCENT_SHIFT 7
+#define LBX_DESCENT_SHIFT 0
+
+#define LBX_WIDTH_BITS 6
+#define LBX_LEFT_BITS 6
+#define LBX_RIGHT_BITS 7
+#define LBX_ASCENT_BITS 6
+#define LBX_DESCENT_BITS 7
+
+#define LBX_WIDTH_MASK 0xfc000000
+#define LBX_LEFT_MASK 0x03f00000
+#define LBX_RIGHT_MASK 0x000fe000
+#define LBX_ASCENT_MASK 0x00001f80
+#define LBX_DESCENT_MASK 0x0000007f
+
+#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1)))
+
+typedef struct {
+ CARD32 metrics B32;
+} xLbxCharInfo;
+
+/* note that this is identical to xQueryFontReply except for missing
+ * first 2 words
+ */
+typedef struct {
+ xCharInfo minBounds;
+/* XXX do we need to leave this gunk? */
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */
+} xLbxFontInfo;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 compression;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ /* X_QueryFont sticks much of the data in the base reply packet,
+ * but we hope that it won't be needed, (and it won't fit in 32 bytes
+ * with the tag anyways)
+ *
+ * if any additional data is needed, its sent in a xLbxFontInfo
+ */
+} xLbxQueryFontReply;
+#define sz_xLbxQueryFontReply 32
+
+typedef struct _LbxChangeProperty {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxChangeProperty */
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 format;
+ CARD8 mode;
+ BYTE pad[2];
+ CARD32 nUnits B32;
+} xLbxChangePropertyReq;
+#define sz_xLbxChangePropertyReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxChangePropertyReply;
+#define sz_xLbxChangePropertyReply 32
+
+typedef struct _LbxGetProperty {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetProperty */
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 delete;
+ BYTE pad[3];
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+} xLbxGetPropertyReq;
+#define sz_xLbxGetPropertyReq 28
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32;
+ CARD32 tag B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xLbxGetPropertyReply;
+#define sz_xLbxGetPropertyReply 32
+
+typedef struct _LbxTagData {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxTagData */
+ CARD16 length B16;
+ XID tag B32;
+ CARD32 real_length B32;
+ /* data */
+} xLbxTagDataReq;
+#define sz_xLbxTagDataReq 12
+
+typedef struct _LbxInvalidateTag {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxInvalidateTag */
+ CARD16 length B16;
+ CARD32 tag B32;
+} xLbxInvalidateTagReq;
+#define sz_xLbxInvalidateTagReq 8
+
+typedef struct _LbxPutImage {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxPutImage */
+ CARD16 length B16;
+ CARD8 compressionMethod;
+ CARD8 cacheEnts;
+ CARD8 bitPacked;
+ /* rest is variable */
+} xLbxPutImageReq;
+#define sz_xLbxPutImageReq 7
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 planeMask B32;
+ CARD8 format;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xLbxGetImageReq;
+
+#define sz_xLbxGetImageReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 lbxLength B32;
+ CARD32 xLength B32;
+ VisualID visual B32;
+ CARD8 compressionMethod;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxGetImageReply;
+
+#define sz_xLbxGetImageReply 32
+
+/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment,
+ LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */
+
+#define GFX_CACHE_SIZE 15
+
+#define GFXdCacheEnt(e) ((e) & 0xf)
+#define GFXgCacheEnt(e) (((e) >> 4) & 0xf)
+#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4))
+
+#define GFXCacheNone 0xf
+
+typedef struct _LbxPolyPoint {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ CARD8 padBytes;
+} xLbxPolyPointReq;
+
+#define sz_xLbxPolyPointReq 6
+
+typedef xLbxPolyPointReq xLbxPolyLineReq;
+typedef xLbxPolyPointReq xLbxPolySegmentReq;
+typedef xLbxPolyPointReq xLbxPolyRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyArcReq;
+typedef xLbxPolyPointReq xLbxPolyFillRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyFillArcReq;
+
+#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq
+#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq
+
+typedef struct _LbxFillPoly {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ BYTE shape;
+ CARD8 padBytes;
+} xLbxFillPolyReq;
+#define sz_xLbxFillPolyReq 7
+
+typedef struct _LbxCopyArea {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 srcCache; /* source drawable */
+ CARD8 cacheEnts; /* dest drawable and gc */
+ /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyAreaReq;
+
+#define sz_xLbxCopyAreaReq 6
+
+typedef struct _LbxCopyPlane {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD32 bitPlane B32;
+ CARD8 srcCache; /* source drawable */
+ CARD8 cacheEnts; /* dest drawable and gc */
+ /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyPlaneReq;
+
+#define sz_xLbxCopyPlaneReq 10
+
+typedef struct _LbxPolyText {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ /* followed by encoded src x, src y coordinates and text elts */
+} xLbxPolyTextReq;
+
+#define sz_xLbxPolyTextReq 5
+
+typedef xLbxPolyTextReq xLbxPolyText8Req;
+typedef xLbxPolyTextReq xLbxPolyText16Req;
+
+#define sz_xLbxPolyTextReq 5
+#define sz_xLbxPolyText8Req 5
+#define sz_xLbxPolyText16Req 5
+
+typedef struct _LbxImageText {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ CARD8 nChars;
+ /* followed by encoded src x, src y coordinates and string */
+} xLbxImageTextReq;
+
+typedef xLbxImageTextReq xLbxImageText8Req;
+typedef xLbxImageTextReq xLbxImageText16Req;
+
+#define sz_xLbxImageTextReq 6
+#define sz_xLbxImageText8Req 6
+#define sz_xLbxImageText16Req 6
+
+typedef struct {
+ CARD8 offset;
+ CARD8 diff;
+} xLbxDiffItem;
+#define sz_xLbxDiffItem 2
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nOpts;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 optDataStart B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxStartReply;
+#define sz_xLbxStartReply 32
+#define sz_xLbxStartReplyHdr 8
+
+typedef struct _LbxQueryExtension {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryExtension */
+ CARD16 length B16;
+ CARD32 nbytes B32;
+} xLbxQueryExtensionReq;
+#define sz_xLbxQueryExtensionReq 8
+
+typedef struct _LbxQueryExtensionReply {
+ BYTE type; /* X_Reply */
+ CARD8 numReqs;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL present;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 first_error;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+
+ /* reply & event generating requests */
+} xLbxQueryExtensionReply;
+#define sz_xLbxQueryExtensionReply 32
+
+
+typedef struct _LbxBeginLargeRequest {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */
+ CARD16 length B16;
+ CARD32 largeReqLength B32;
+} xLbxBeginLargeRequestReq;
+#define sz_BeginLargeRequestReq 8
+
+typedef struct _LbxLargeRequestData {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxLargeRequestData */
+ CARD16 length B16;
+ /* followed by LISTofCARD8 data */
+} xLbxLargeRequestDataReq;
+#define sz_LargeRequestDataReq 4
+
+typedef struct _LbxEndLargeRequest {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxEndLargeRequest */
+ CARD16 length B16;
+} xLbxEndLargeRequestReq;
+#define sz_EndLargeRequestReq 4
+
+
+
+typedef struct _LbxSwitchEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxSwitchEvent */
+ CARD16 pad B16;
+ CARD32 client B32;
+} xLbxSwitchEvent;
+#define sz_xLbxSwitchEvent 8
+
+typedef struct _LbxCloseEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxCloseEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 client B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxCloseEvent;
+#define sz_xLbxCloseEvent 32
+
+typedef struct _LbxInvalidateTagEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxInvalidateTagEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 tag B32;
+ CARD32 tagType B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxInvalidateTagEvent;
+#define sz_xLbxInvalidateTagEvent 32
+
+typedef struct _LbxSendTagDataEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxSendTagDataEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 tag B32;
+ CARD32 tagType B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxSendTagDataEvent;
+#define sz_xLbxSendTagDataEvent 32
+
+typedef struct _LbxListenToOneEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxListenToOneEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 client B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxListenToOneEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxListenToAllEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxListenToAllEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xLbxListenToAllEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxReleaseCmapEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxReleaseCmapEvent */
+ CARD16 sequenceNumber B16;
+ Colormap colormap B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxReleaseCmapEvent;
+#define sz_xLbxReleaseCmapEvent 32
+
+
+typedef struct _LbxFreeCellsEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxFreeCellsEvent */
+ CARD16 sequenceNumber B16;
+ Colormap colormap B32;
+ CARD32 pixelStart B32;
+ CARD32 pixelEnd B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxFreeCellsEvent;
+#define sz_xLbxFreeCellsEvent 32
+
+
+/*
+ * squished X event sizes. If these change, be sure to update lbxquish.c
+ * and unsquish.c appropriately
+ *
+ * lbxsz_* is the padded squished length
+ * lbxupsz_* is the unpadded squished length
+ */
+
+#define lbxsz_KeyButtonEvent 32
+#define lbxupsz_KeyButtonEvent 31
+
+#define lbxsz_EnterLeaveEvent 32
+#define lbxupsz_EnterLeaveEvent 32
+
+#define lbxsz_FocusEvent 12
+#define lbxupsz_FocusEvent 9
+
+#define lbxsz_KeymapEvent 32
+#define lbxupsz_KeymapEvent 32
+
+#define lbxsz_ExposeEvent 20
+#define lbxupsz_ExposeEvent 18
+
+#define lbxsz_GfxExposeEvent 24
+#define lbxupsz_GfxExposeEvent 21
+
+#define lbxsz_NoExposeEvent 12
+#define lbxupsz_NoExposeEvent 11
+
+#define lbxsz_VisibilityEvent 12
+#define lbxupsz_VisibilityEvent 9
+
+#define lbxsz_CreateNotifyEvent 24
+#define lbxupsz_CreateNotifyEvent 23
+
+#define lbxsz_DestroyNotifyEvent 12
+#define lbxupsz_DestroyNotifyEvent 12
+
+#define lbxsz_UnmapNotifyEvent 16
+#define lbxupsz_UnmapNotifyEvent 13
+
+#define lbxsz_MapNotifyEvent 16
+#define lbxupsz_MapNotifyEvent 13
+
+#define lbxsz_MapRequestEvent 12
+#define lbxupsz_MapRequestEvent 12
+
+#define lbxsz_ReparentEvent 24
+#define lbxupsz_ReparentEvent 21
+
+#define lbxsz_ConfigureNotifyEvent 28
+#define lbxupsz_ConfigureNotifyEvent 27
+
+#define lbxsz_ConfigureRequestEvent 28
+#define lbxupsz_ConfigureRequestEvent 28
+
+#define lbxsz_GravityEvent 16
+#define lbxupsz_GravityEvent 16
+
+#define lbxsz_ResizeRequestEvent 12
+#define lbxupsz_ResizeRequestEvent 12
+
+#define lbxsz_CirculateEvent 20
+#define lbxupsz_CirculateEvent 17
+
+#define lbxsz_PropertyEvent 20
+#define lbxupsz_PropertyEvent 17
+
+#define lbxsz_SelectionClearEvent 16
+#define lbxupsz_SelectionClearEvent 16
+
+#define lbxsz_SelectionRequestEvent 28
+#define lbxupsz_SelectionRequestEvent 28
+
+#define lbxsz_SelectionNotifyEvent 24
+#define lbxupsz_SelectionNotifyEvent 24
+
+#define lbxsz_ColormapEvent 16
+#define lbxupsz_ColormapEvent 14
+
+#define lbxsz_MappingNotifyEvent 8
+#define lbxupsz_MappingNotifyEvent 7
+
+#define lbxsz_ClientMessageEvent 32
+#define lbxupsz_ClientMessageEvent 32
+
+#define lbxsz_UnknownEvent 32
+
+#ifdef DEBUG
+
+#define DBG_SWITCH 0x00000001
+#define DBG_CLOSE 0x00000002
+#define DBG_IO 0x00000004
+#define DBG_READ_REQ 0x00000008
+#define DBG_LEN 0x00000010
+#define DBG_BLOCK 0x00000020
+#define DBG_CLIENT 0x00000040
+#define DBG_DELTA 0x00000080
+
+extern int lbxDebug;
+
+#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else
+#else
+#define DBG(n,m)
+#endif
+
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef XID
+#undef Atom
+#undef Colormap
+#undef Drawable
+#undef VisualID
+#undef Window
+
+#endif /* _LBXSTR_H_ */
diff --git a/X11/extensions/lbxzlib.h b/X11/extensions/lbxzlib.h
new file mode 100644
index 000000000..dc21837a1
--- /dev/null
+++ b/X11/extensions/lbxzlib.h
@@ -0,0 +1,64 @@
+/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*
+ * Copyright 1993 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Dale Tonogai, Network Computing Devices
+ */
+
+#ifndef _ZLIB_H_
+#define _ZLIB_H_
+
+#define ZLIB_STRCOMP_OPT "XC-ZLIB"
+#define ZLIB_STRCOMP_OPT_LEN 7
+
+#define ZLIB_PACKET_HDRLEN 2
+#define ZLIB_MAX_DATALEN 0xfff
+#define ZLIB_MAX_PLAIN 270
+#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1)
+
+#define ZLIB_COMPRESS_FLAG 0x80
+#define ZLIB_DATALEN_MASK 0x0f
+
+#define ZLIB_PUT_PKTHDR(p, len, compflag) \
+ { \
+ (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\
+ (p)[1] = (len) & 0xff; \
+ }
+
+#define ZLIB_GET_DATALEN(p) \
+ ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1])
+
+#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG)
+
+struct ZlibInfo;
+
+extern void * ZlibInit ( int fd, int level );
+extern void ZlibFree ( struct ZlibInfo *comp );
+extern int ZlibFlush ( int fd );
+extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen );
+extern void ZlibCompressOn ( int fd );
+extern void ZlibCompressOff ( int fd );
+extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen );
+extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt );
+extern int ZlibRead ( int fd, unsigned char *buffer, int buflen );
+extern int ZlibInputAvail ( int fd );
+
+
+#endif /* _ZLIB_H_ */
diff --git a/X11/extensions/missing b/X11/extensions/missing
new file mode 100644
index 000000000..e7ef83a1c
--- /dev/null
+++ b/X11/extensions/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2003-09-02.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/extensions/mitmiscstr.h b/X11/extensions/mitmiscstr.h
new file mode 100644
index 000000000..32cae2635
--- /dev/null
+++ b/X11/extensions/mitmiscstr.h
@@ -0,0 +1,70 @@
+/* $XFree86$ */
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _MITMISCSTR_H_
+#define _MITMISCSTR_H_
+
+#include "MITMisc.h"
+
+#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
+
+typedef struct _SetBugMode {
+ CARD8 reqType; /* always MITReqCode */
+ CARD8 mitReqType; /* always X_MITSetBugMode */
+ CARD16 length B16;
+ BOOL onOff;
+ BYTE pad0;
+ CARD16 pad1;
+} xMITSetBugModeReq;
+#define sz_xMITSetBugModeReq 8
+
+typedef struct _GetBugMode {
+ CARD8 reqType; /* always MITReqCode */
+ CARD8 mitReqType; /* always X_MITGetBugMode */
+ CARD16 length B16;
+} xMITGetBugModeReq;
+#define sz_xMITGetBugModeReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL onOff;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xMITGetBugModeReply;
+#define sz_xMITGetBugModeReply 32
+
+#endif /* _MITMISCSTR_H_ */
diff --git a/X11/extensions/mkinstalldirs b/X11/extensions/mkinstalldirs
new file mode 100644
index 000000000..d2d5f21b6
--- /dev/null
+++ b/X11/extensions/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/X11/extensions/multibuf.h b/X11/extensions/multibuf.h
new file mode 100644
index 000000000..96b4c3b14
--- /dev/null
+++ b/X11/extensions/multibuf.h
@@ -0,0 +1,317 @@
+/*
+ * $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+
+/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */
+
+#ifndef _MULTIBUF_H_
+#define _MULTIBUF_H_
+
+#include <X11/Xfuncproto.h>
+
+#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
+
+#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */
+#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */
+
+#define X_MbufGetBufferVersion 0
+#define X_MbufCreateImageBuffers 1
+#define X_MbufDestroyImageBuffers 2
+#define X_MbufDisplayImageBuffers 3
+#define X_MbufSetMBufferAttributes 4
+#define X_MbufGetMBufferAttributes 5
+#define X_MbufSetBufferAttributes 6
+#define X_MbufGetBufferAttributes 7
+#define X_MbufGetBufferInfo 8
+#define X_MbufCreateStereoWindow 9
+#define X_MbufClearImageBufferArea 10
+
+/*
+ * update_action field
+ */
+#define MultibufferUpdateActionUndefined 0
+#define MultibufferUpdateActionBackground 1
+#define MultibufferUpdateActionUntouched 2
+#define MultibufferUpdateActionCopied 3
+
+/*
+ * update_hint field
+ */
+#define MultibufferUpdateHintFrequent 0
+#define MultibufferUpdateHintIntermittent 1
+#define MultibufferUpdateHintStatic 2
+
+/*
+ * valuemask fields
+ */
+#define MultibufferWindowUpdateHint (1L << 0)
+#define MultibufferBufferEventMask (1L << 0)
+
+/*
+ * mono vs. stereo and left vs. right
+ */
+#define MultibufferModeMono 0
+#define MultibufferModeStereo 1
+#define MultibufferSideMono 0
+#define MultibufferSideLeft 1
+#define MultibufferSideRight 2
+
+/*
+ * clobber state
+ */
+#define MultibufferUnclobbered 0
+#define MultibufferPartiallyClobbered 1
+#define MultibufferFullyClobbered 2
+
+/*
+ * event stuff
+ */
+#define MultibufferClobberNotifyMask 0x02000000
+#define MultibufferUpdateNotifyMask 0x04000000
+
+#define MultibufferClobberNotify 0
+#define MultibufferUpdateNotify 1
+#define MultibufferNumberEvents (MultibufferUpdateNotify + 1)
+
+#define MultibufferBadBuffer 0
+#define MultibufferNumberErrors (MultibufferBadBuffer + 1)
+
+
+#ifndef _MULTIBUF_SERVER_
+/*
+ * Extra definitions that will only be needed in the client
+ */
+typedef XID Multibuffer;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ int send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Multibuffer buffer; /* buffer of event */
+ int state; /* see Clobbered constants above */
+} XmbufClobberNotifyEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ int send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Multibuffer buffer; /* buffer of event */
+} XmbufUpdateNotifyEvent;
+
+
+/*
+ * per-window attributes that can be got
+ */
+typedef struct {
+ int displayed_index; /* which buffer is being displayed */
+ int update_action; /* Undefined, Background, Untouched, Copied */
+ int update_hint; /* Frequent, Intermittent, Static */
+ int window_mode; /* Mono, Stereo */
+ int nbuffers; /* Number of buffers */
+ Multibuffer *buffers; /* Buffers */
+} XmbufWindowAttributes;
+
+/*
+ * per-window attributes that can be set
+ */
+typedef struct {
+ int update_hint; /* Frequent, Intermittent, Static */
+} XmbufSetWindowAttributes;
+
+
+/*
+ * per-buffer attributes that can be got
+ */
+typedef struct {
+ Window window; /* which window this belongs to */
+ unsigned long event_mask; /* events that have been selected */
+ int buffer_index; /* which buffer is this */
+ int side; /* Mono, Left, Right */
+} XmbufBufferAttributes;
+
+/*
+ * per-buffer attributes that can be set
+ */
+typedef struct {
+ unsigned long event_mask; /* events that have been selected */
+} XmbufSetBufferAttributes;
+
+
+/*
+ * per-screen buffer info (there will be lists of them)
+ */
+typedef struct {
+ VisualID visualid; /* visual usuable at this depth */
+ int max_buffers; /* most buffers for this visual */
+ int depth; /* depth of buffers to be created */
+} XmbufBufferInfo;
+
+_XFUNCPROTOBEGIN
+
+extern Bool XmbufQueryExtension(
+ Display* /* dpy */,
+ int* /* event_base_return */,
+ int* /* error_base_return */
+);
+
+extern Status XmbufGetVersion(
+ Display* /* dpy */,
+ int* /* major_version_return */,
+ int* /* minor_version_return */
+);
+
+extern int XmbufCreateBuffers(
+ Display* /* dpy */,
+ Window /* w */,
+ int /* count */,
+ int /* update_action */,
+ int /* update_hint */,
+ Multibuffer* /* buffers */
+);
+
+extern void XmbufDestroyBuffers(
+ Display* /* dpy */,
+ Window /* window */
+);
+
+extern void XmbufDisplayBuffers(
+ Display* /* dpy */,
+ int /* count */,
+ Multibuffer* /* buffers */,
+ int /* min_delay */,
+ int /* max_delay */
+);
+
+extern Status XmbufGetWindowAttributes(
+ Display* /* dpy */,
+ Window /* w */,
+ XmbufWindowAttributes* /* attr */
+);
+
+extern void XmbufChangeWindowAttributes(
+ Display* /* dpy */,
+ Window /* w */,
+ unsigned long /* valuemask */,
+ XmbufSetWindowAttributes* /* attr */
+);
+
+extern Status XmbufGetBufferAttributes(
+ Display* /* dpy */,
+ Multibuffer /* b */,
+ XmbufBufferAttributes* /* attr */
+);
+
+extern void XmbufChangeBufferAttributes(
+ Display* /* dpy */,
+ Multibuffer /* b */,
+ unsigned long /* valuemask */,
+ XmbufSetBufferAttributes* /* attr */
+);
+
+extern Status XmbufGetScreenInfo(
+ Display* /* dpy */,
+ Drawable /* d */,
+ int* /* nmono_return */,
+ XmbufBufferInfo** /* mono_info_return */,
+ int* /* nstereo_return */,
+ XmbufBufferInfo** /* stereo_info_return */
+);
+
+extern Window XmbufCreateStereoWindow(
+ Display* /* dpy */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual* /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attr */,
+ Multibuffer* /* leftp */,
+ Multibuffer* /* rightp */
+);
+
+extern void XmbufClearBufferArea(
+ Display* /* dpy */,
+ Multibuffer /* buffer */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ Bool /* exposures */
+);
+
+_XFUNCPROTOEND
+
+#else
+
+#include "scrnintstr.h"
+
+typedef Bool (* mbInitFunc)();
+
+struct _mbufScreen; /* declared in multibufst.h */
+
+extern void RegisterMultibufferInit(
+ ScreenPtr /* pScreen */,
+ Bool (* /* bufMultibufferInit */)(
+ ScreenPtr /* pScreen */,
+ struct _mbufScreen * /* pMBScreen */
+ )
+);
+
+struct xMbufBufferInfo; /* declared in multibufst.h */
+
+extern void RegisterDoubleBufferHardware(
+ ScreenPtr /* pScreen */,
+ int /* nInfo */,
+ struct xMbufBufferInfo * /* pInfo */,
+ DevUnion * /* frameBuffer */,
+ DevUnion /* selectPlane */,
+ void (* /* CopyBufferBitsFunc */ )(),
+ void (* /* DrawSelectPlaneFunc */ )()
+);
+
+extern int CreateImageBuffers (
+ WindowPtr /* pWin */,
+ int /* nbuf */,
+ XID * /* ids */,
+ int /* action */,
+ int /* hint */
+);
+extern void DestroyImageBuffers (
+ WindowPtr /* pWin */
+);
+extern int DisplayImageBuffers (
+ XID * /* ids */,
+ int /* nbuf */
+);
+
+#endif /* _MULTIBUF_SERVER_ */
+#endif /* _MULTIBUF_H_ */
diff --git a/X11/extensions/multibufst.h b/X11/extensions/multibufst.h
new file mode 100644
index 000000000..8469a16db
--- /dev/null
+++ b/X11/extensions/multibufst.h
@@ -0,0 +1,609 @@
+/*
+ * $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+
+/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */
+
+#ifndef _MULTIBUFST_H_
+#define _MULTIBUFST_H_
+
+/*
+ * Protocol requests constants and alignment values
+ */
+
+#include "multibuf.h"
+#ifdef _MULTIBUF_SERVER_
+#include "inputstr.h"
+#endif
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define MbufGetReq(name,req,info) GetReq (name, req); \
+ req->reqType = info->codes->major_opcode; \
+ req->mbufReqType = X_##name;
+#else
+#define MbufGetReq(name,req,info) GetReq (name, req); \
+ req->reqType = info->codes->major_opcode; \
+ req->mbufReqType = X_/**/name;
+#endif
+
+#define Window CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Multibuffer CARD32
+
+typedef struct xMbufBufferInfo {
+ CARD32 visualID B32; /* associated visual */
+ CARD16 maxBuffers B16; /* maximum supported buffers */
+ CARD8 depth; /* depth of visual (redundant) */
+ CARD8 unused;
+} xMbufBufferInfo;
+#define sz_xMbufBufferInfo 8
+
+typedef struct {
+ BYTE type;
+ BYTE unused;
+ CARD16 sequenceNumber B16;
+ CARD32 buffer B32; /* affected buffer */
+ BYTE state; /* current status */
+ CARD8 unused1;
+ CARD16 unused2 B16;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+ CARD32 unused7 B32;
+} xMbufClobberNotifyEvent;
+
+typedef struct {
+ BYTE type;
+ BYTE unused;
+ CARD16 sequenceNumber B16;
+ CARD32 buffer B32; /* affected buffer */
+ CARD32 timeStamp B32; /* update time */
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+} xMbufUpdateNotifyEvent;
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferVersion */
+ CARD16 length B16;
+} xMbufGetBufferVersionReq;
+#define sz_xMbufGetBufferVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 majorVersion; /* major version of Multi-Buffering protocol */
+ CARD8 minorVersion; /* minor version of Multi-Buffering protocol */
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xMbufGetBufferVersionReply;
+#define sz_xMbufGetBufferVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+ CARD8 updateAction; /* action at update */
+ CARD8 updateHint; /* hint as to frequency of updates */
+ CARD16 unused;
+} xMbufCreateImageBuffersReq; /* followed by buffer ids */
+#define sz_xMbufCreateImageBuffersReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 numberBuffer B16; /* number successfully allocated */
+ CARD16 unused1 B16;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+} xMbufCreateImageBuffersReply;
+#define sz_xMbufCreateImageBuffersReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+} xMbufDestroyImageBuffersReq;
+#define sz_xMbufDestroyImageBuffersReq 8
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */
+ CARD16 length B16;
+ CARD16 minDelay B16; /* minimum time between last update and now */
+ CARD16 maxDelay B16; /* maximum time between last update and now */
+} xMbufDisplayImageBuffersReq; /* followed by list of buffers */
+#define sz_xMbufDisplayImageBuffersReq 8
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+ CARD32 valueMask B32; /* modified entries */
+} xMbufSetMBufferAttributesReq; /* followed by values */
+#define sz_xMbufSetMBufferAttributesReq 12
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+} xMbufGetMBufferAttributesReq;
+#define sz_xMbufGetMBufferAttributesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 displayedBuffer B16; /* currently visible buffer */
+ CARD8 updateAction;
+ CARD8 updateHint;
+ CARD8 windowMode;
+ CARD8 unused0;
+ CARD16 unused1 B16;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+} xMbufGetMBufferAttributesReply;
+#define sz_xMbufGetMBufferAttributesReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */
+ CARD16 length B16;
+ CARD32 buffer B32;
+ CARD32 valueMask B32;
+} xMbufSetBufferAttributesReq; /* followed by values */
+#define sz_xMbufSetBufferAttributesReq 12
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */
+ CARD16 length B16;
+ CARD32 buffer B32;
+} xMbufGetBufferAttributesReq;
+#define sz_xMbufGetBufferAttributesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 window B32;
+ CARD32 eventMask B32;
+ CARD16 bufferIndex B16;
+ CARD8 side;
+ CARD8 unused0;
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+} xMbufGetBufferAttributesReply;
+#define sz_xMbufGetBufferAttributesReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferInfo */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xMbufGetBufferInfoReq;
+#define sz_xMbufGetBufferInfoReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 normalInfo B16;
+ CARD16 stereoInfo B16;
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+} xMbufGetBufferInfoReply; /* followed by buffer infos */
+#define sz_xMbufGetBufferInfoReply 32
+
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */
+ CARD16 length B16;
+ CARD8 unused0;
+ CARD8 unused1;
+ CARD8 unused2;
+ CARD8 depth;
+ Window wid B32;
+ Window parent B32;
+ Multibuffer left B32; /* associated buffers */
+ Multibuffer right B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ VisualID visual B32;
+ CARD32 mask B32;
+} xMbufCreateStereoWindowReq; /* followed by value list */
+#define sz_xMbufCreateStereoWindowReq 44
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */
+ CARD16 length B16;
+ Multibuffer buffer B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 unused0;
+ CARD8 unused1;
+ CARD8 unused2;
+ BOOL exposures;
+} xMbufClearImageBufferAreaReq;
+#define sz_xMbufClearImageBufferAreaReq 20
+
+#undef Window
+#undef Drawable
+#undef VisualID
+#undef Multibuffer
+
+
+#ifdef _MULTIBUF_SERVER_
+/* Macros for wrapping and unwrapping functions */
+
+#define SWAP_FUNC_VECTOR(pSTRUCT1,pSTRUCT2,DATA_TYPE,FUNC_NAME) \
+{ \
+ DATA_TYPE (* tmpFn)(); \
+ \
+ tmpFn = pSTRUCT1->FUNC_NAME; \
+ pSTRUCT1->FUNC_NAME = pSTRUCT2->FUNC_NAME; \
+ pSTRUCT2->FUNC_NAME = tmpFn; \
+}
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \
+{ \
+ if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \
+ { \
+ pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \
+ pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \
+ pPRIV->funcsWrapped |= FUNC_NAME##Mask; \
+ } \
+}
+
+#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
+{ \
+ SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
+ pPRIV->funcsWrapped &= ~(FUNC_NAME##Mask); \
+}
+
+#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
+{ \
+ if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \
+ { \
+ SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
+ pPRIV->funcsWrapped |= FUNC_NAME##Mask; \
+ } \
+}
+#else
+#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \
+{ \
+ if ((pPRIV->funcsWrapped & FUNC_NAME/**/Mask) == 0) \
+ { \
+ pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \
+ pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \
+ pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \
+ } \
+}
+
+#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
+{ \
+ SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
+ pPRIV->funcsWrapped &= ~(FUNC_NAME/**/Mask); \
+}
+
+#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
+{ \
+ if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \
+ { \
+ SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
+ pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \
+ } \
+}
+#endif
+
+/* The _Multibuffer and _Multibuffers structures below refer to each other,
+ * so we need this forward declaration
+ */
+typedef struct _Multibuffers *MultibuffersPtr;
+
+/*
+ * per-Multibuffer data
+ */
+
+typedef struct _Multibuffer {
+ MultibuffersPtr pMultibuffers; /* associated window data */
+ Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */
+ Mask otherEventMask; /* mask of all other clients event masks */
+ OtherClients *otherClients; /* other clients that want events */
+ int number; /* index of this buffer into array */
+ int side; /* always Mono */
+ int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */
+ PixmapPtr pPixmap; /* associated pixmap */
+} MultibufferRec, *MultibufferPtr;
+
+/*
+ * per-window data
+ */
+
+typedef struct _Multibuffers {
+ WindowPtr pWindow; /* associated window */
+ int numMultibuffer; /* count of buffers */
+ int refcnt; /* ref count for delete */
+ int displayedMultibuffer; /* currently active buffer */
+ int updateAction; /* Undefined, Background, Untouched, Copied */
+ int updateHint; /* Frequent, Intermittent, Static */
+ int windowMode; /* always Mono */
+
+ TimeStamp lastUpdate; /* time of last update */
+
+ unsigned short width, height; /* last known window size */
+ short x, y; /* for static gravity */
+
+ MultibufferPtr buffers; /* array of numMultibuffer buffers */
+} MultibuffersRec;
+
+/*
+ * per-screen data
+ */
+typedef struct _MultibufferScreen {
+ PositionWindowProcPtr PositionWindow; /* pWin, x,y */
+} MultibufferScreenRec, *MultibufferScreenPtr;
+
+/*
+ * per display-image-buffers request data.
+ */
+
+typedef struct _DisplayRequest {
+ struct _DisplayRequest *next;
+ TimeStamp activateTime;
+ ClientPtr pClient;
+ XID id;
+} DisplayRequestRec, *DisplayRequestPtr;
+
+#define DestroyWindowMask (1L<<0)
+#define PositionWindowMask (1L<<1)
+#define PostValidateTreeMask (1L<<2)
+#define ClipNotifyMask (1L<<3)
+#define WindowExposuresMask (1L<<4)
+#define CopyWindowMask (1L<<5)
+#define ClearToBackgroundMask (1L<<6)
+#define ChangeWindowAttributesMask (1L<<7)
+
+extern int MultibufferScreenIndex;
+extern int MultibufferWindowIndex;
+
+extern RESTYPE MultibufferDrawableResType;
+
+extern void MultibufferUpdate( /* pMbuffer, time */
+ MultibufferPtr /* pMultibuffer */,
+ CARD32 /* time */
+ );
+extern void MultibufferExpose( /* pMbuffer, pRegion */
+ MultibufferPtr /* pMultibuffer */,
+ RegionPtr /* pRegion */
+ );
+extern void MultibufferClobber( /* pMbuffer */
+ MultibufferPtr /* pMultibuffer */
+ );
+
+typedef struct _mbufWindow *mbufWindowPtr;
+
+/*
+ * per-buffer data
+ */
+
+#define MB_DISPLAYED_BUFFER(pMBWindow) \
+ ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer)
+
+typedef struct _mbufBuffer {
+ mbufWindowPtr pMBWindow; /* associated window data */
+ Mask eventMask; /* client event mask */
+ Mask otherEventMask; /* union of other clients' event masks */
+ OtherClientsPtr otherClients; /* other clients that want events */
+ int number; /* index of this buffer into array */
+ int side; /* stero side: always Mono */
+ int clobber; /* clober state */
+ DrawablePtr pDrawable; /* associated drawable */
+} mbufBufferRec, *mbufBufferPtr;
+
+
+/*
+ * per-window data
+ */
+
+#define MB_WINDOW_PRIV(pWin) \
+ ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr))
+
+typedef struct _mbufWindow {
+ WindowPtr pWindow; /* associated window */
+ int numMultibuffer; /* count of buffers */
+ mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */
+ int displayedMultibuffer; /* currently active buffer */
+ int updateAction; /* Undefined, Background,
+ Untouched, Copied */
+ int updateHint; /* Frequent, Intermittent, Static */
+ int windowMode; /* always Mono */
+ TimeStamp lastUpdate; /* time of last update */
+ short x, y; /* for static gravity */
+ unsigned short width, height; /* last known window size */
+ DevUnion devPrivate;
+} mbufWindowRec;
+
+
+/*
+ * per-screen data
+ */
+
+#define MB_SCREEN_PRIV(pScreen) \
+ ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr))
+
+typedef struct _mbufScreen {
+ long mbufWindowCount; /* count of multibuffered windows */
+
+ /* Wrap pScreen->DestroyWindow */
+ DestroyWindowProcPtr DestroyWindow;
+ long funcsWrapped; /* flags which functions are wrapped */
+
+ /* Initialized by device-dependent section */
+ int nInfo; /* number of buffer info rec's */
+ xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */
+
+ int (* CreateImageBuffers)(
+ WindowPtr /* pWin */,
+ int /* nbuf */,
+ XID * /* ids */,
+ int /* action */,
+ int /* hint */
+ );
+ void (* DestroyImageBuffers)(
+ WindowPtr /* pWin */
+ );
+ void (* DisplayImageBuffers)(
+ ScreenPtr /* pScreen */,
+ mbufBufferPtr * /* ppMBBuffer */,
+ mbufWindowPtr * /* ppMBWindow */,
+ int /* nbuf */
+ );
+ void (* ClearImageBufferArea)(
+ mbufBufferPtr /* pMBBuffer */,
+ short /* x */,
+ short /* y */,
+ unsigned short /* width */,
+ unsigned short /* height */,
+ Bool /* exposures */
+ );
+ Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */
+ /* FIXME */
+ );
+ Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */
+ /* FIXME */
+ );
+ void (* DeleteBufferDrawable)(
+ DrawablePtr /* pDrawable */
+ );
+ void (* WrapScreenFuncs)(
+ ScreenPtr /* pScreen */
+ );
+ void (* ResetProc)(
+ ScreenPtr /* pScreen */
+ );
+ DevUnion devPrivate;
+} mbufScreenRec, *mbufScreenPtr;
+
+
+/* Privates to mbufScreenRec */
+
+#ifdef _MULTIBUF_PIXMAP_
+#define MB_SCREEN_PRIV_PIXMAP(pScreen) \
+ ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr)
+
+typedef struct _mbufPixmapPriv
+{
+ /* Pointers to wrapped functions */
+ PositionWindowProcPtr PositionWindow; /* pWin, x,y */
+ long funcsWrapped; /* flags which functions are wrapped */
+} mbufPixmapPrivRec, *mbufPixmapPrivPtr;
+#endif /* _MULTIBUF_PIXMAP_ */
+
+
+#ifdef _MULTIBUF_BUFFER_
+
+extern int frameWindowPrivateIndex;
+
+#define MB_SCREEN_PRIV_BUFFER(pScreen) \
+ ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr)
+
+typedef struct _mbufBufferPriv
+{
+ DevUnion *frameBuffer; /* Array of screen framebuffers */
+ DevUnion selectPlane; /* Plane(s) that select displayed buffer */
+
+ /*
+ * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union
+ * of all the old clipLists of the windows that are displaying
+ * the backbuffer. unionRgn is the union of all the new clipLists
+ * of the same windows.
+ */
+
+ RegionRec backBuffer; /* Area of screen displaying back buffer */
+ RegionRec subtractRgn; /* Regions lost to backBuffer */
+ RegionRec unionRgn; /* Regions gained by backBuffer */
+ Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */
+
+ void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */
+ void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */
+
+ /* Pointers to wrapped functions */
+ PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */
+ ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */
+ WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */
+ CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */
+ ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */
+ long funcsWrapped; /* flags which functions are wrapped */
+ unsigned inClearToBackground:1; /* used by WindowExposure */
+} mbufBufferPrivRec, *mbufBufferPrivPtr;
+#endif /* _MULTIBUF_BUFFER_ */
+
+#endif /* _MULTIBUF_SERVER_ */
+#endif /* _MULTIBUFST_H_ */
diff --git a/X11/extensions/randr.h b/X11/extensions/randr.h
new file mode 100644
index 000000000..17e6ef9f6
--- /dev/null
+++ b/X11/extensions/randr.h
@@ -0,0 +1,141 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett Packard Company
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
+ * Keith Packard, Intel Corporation
+ */
+
+#ifndef _RANDR_H_
+#define _RANDR_H_
+
+typedef unsigned short Rotation;
+typedef unsigned short SizeID;
+typedef unsigned short SubpixelOrder;
+typedef unsigned short Connection;
+typedef unsigned short XRandrRotation;
+typedef unsigned short XRandrSizeID;
+typedef unsigned short XRandrSubpixelOrder;
+typedef unsigned long XRandrModeFlags;
+
+#define RANDR_NAME "RANDR"
+#define RANDR_MAJOR 1
+#define RANDR_MINOR 2
+
+#define RRNumberErrors 3
+#define RRNumberEvents 2
+#define RRNumberRequests 25
+
+#define X_RRQueryVersion 0
+/* we skip 1 to make old clients fail pretty immediately */
+#define X_RROldGetScreenInfo 1
+#define X_RR1_0SetScreenConfig 2
+/* V1.0 apps share the same set screen config request id */
+#define X_RRSetScreenConfig 2
+#define X_RROldScreenChangeSelectInput 3
+/* 3 used to be ScreenChangeSelectInput; deprecated */
+#define X_RRSelectInput 4
+#define X_RRGetScreenInfo 5
+
+/* V1.2 additions */
+#define X_RRGetScreenSizeRange 6
+#define X_RRSetScreenSize 7
+#define X_RRGetScreenResources 8
+#define X_RRGetOutputInfo 9
+#define X_RRListOutputProperties 10
+#define X_RRQueryOutputProperty 11
+#define X_RRConfigureOutputProperty 12
+#define X_RRChangeOutputProperty 13
+#define X_RRDeleteOutputProperty 14
+#define X_RRGetOutputProperty 15
+#define X_RRCreateMode 16
+#define X_RRDestroyMode 17
+#define X_RRAddOutputMode 18
+#define X_RRDeleteOutputMode 19
+#define X_RRGetCrtcInfo 20
+#define X_RRSetCrtcConfig 21
+#define X_RRGetCrtcGammaSize 22
+#define X_RRGetCrtcGamma 23
+#define X_RRSetCrtcGamma 24
+
+/* Event selection bits */
+#define RRScreenChangeNotifyMask (1L << 0)
+/* V1.2 additions */
+#define RRCrtcChangeNotifyMask (1L << 1)
+#define RROutputChangeNotifyMask (1L << 2)
+#define RROutputPropertyNotifyMask (1L << 3)
+
+/* Event codes */
+#define RRScreenChangeNotify 0
+/* V1.2 additions */
+#define RRNotify 1
+/* RRNotify Subcodes */
+#define RRNotify_CrtcChange 0
+#define RRNotify_OutputChange 1
+#define RRNotify_OutputProperty 2
+
+/* used in the rotation field; rotation and reflection in 0.1 proto. */
+#define RR_Rotate_0 1
+#define RR_Rotate_90 2
+#define RR_Rotate_180 4
+#define RR_Rotate_270 8
+
+/* new in 1.0 protocol, to allow reflection of screen */
+
+#define RR_Reflect_X 16
+#define RR_Reflect_Y 32
+
+#define RRSetConfigSuccess 0
+#define RRSetConfigInvalidConfigTime 1
+#define RRSetConfigInvalidTime 2
+#define RRSetConfigFailed 3
+
+/* new in 1.2 protocol */
+
+#define RR_HSyncPositive 0x00000001
+#define RR_HSyncNegative 0x00000002
+#define RR_VSyncPositive 0x00000004
+#define RR_VSyncNegative 0x00000008
+#define RR_Interlace 0x00000010
+#define RR_DoubleScan 0x00000020
+#define RR_CSync 0x00000040
+#define RR_CSyncPositive 0x00000080
+#define RR_CSyncNegative 0x00000100
+#define RR_HSkewPresent 0x00000200
+#define RR_BCast 0x00000400
+#define RR_PixelMultiplex 0x00000800
+#define RR_DoubleClock 0x00001000
+#define RR_ClockDivideBy2 0x00002000
+
+#define RR_Connected 0
+#define RR_Disconnected 1
+#define RR_UnknownConnection 2
+
+#define BadRROutput 0
+#define BadRRCrtc 1
+#define BadRRMode 2
+
+/* Conventional RandR output properties */
+
+#define RR_PROPERTY_RANDR_EDID "RANDR_EDID"
+
+#endif /* _RANDR_H_ */
diff --git a/X11/extensions/randrproto.h b/X11/extensions/randrproto.h
new file mode 100644
index 000000000..3fb2e45e4
--- /dev/null
+++ b/X11/extensions/randrproto.h
@@ -0,0 +1,654 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett-Packard Company
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author: Jim Gettys, Hewlett-Packard Company, Inc.
+ * Keith Packard, Intel Corporation
+ */
+
+/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */
+/* V1.0 removes depth switching from the protocol */
+#ifndef _XRANDRP_H_
+#define _XRANDRP_H_
+
+#include <X11/extensions/randr.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define RROutput CARD32
+#define RRMode CARD32
+#define RRCrtc CARD32
+#define RRModeFlags CARD32
+
+#define Rotation CARD16
+#define SizeID CARD16
+#define SubpixelOrder CARD16
+
+/*
+ * data structures
+ */
+
+typedef struct {
+ CARD16 widthInPixels B16;
+ CARD16 heightInPixels B16;
+ CARD16 widthInMillimeters B16;
+ CARD16 heightInMillimeters B16;
+} xScreenSizes;
+#define sz_xScreenSizes 8
+
+/*
+ * requests and replies
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xRRQueryVersionReq;
+#define sz_xRRQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRQueryVersionReply;
+#define sz_xRRQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetScreenInfoReq;
+#define sz_xRRGetScreenInfoReq 8
+
+/*
+ * the xRRScreenInfoReply structure is followed by:
+ *
+ * the size information
+ */
+
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE setOfRotations;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window root B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ CARD16 nSizes B16;
+ SizeID sizeID B16;
+ Rotation rotation B16;
+ CARD16 rate B16;
+ CARD16 nrateEnts B16;
+ CARD16 pad B16;
+} xRRGetScreenInfoReply;
+#define sz_xRRGetScreenInfoReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ SizeID sizeID B16;
+ Rotation rotation B16;
+} xRR1_0SetScreenConfigReq;
+#define sz_xRR1_0SetScreenConfigReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ SizeID sizeID B16;
+ Rotation rotation B16;
+ CARD16 rate B16;
+ CARD16 pad B16;
+} xRRSetScreenConfigReq;
+#define sz_xRRSetScreenConfigReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time newTimestamp B32;
+ Time newConfigTimestamp B32;
+ Window root;
+ CARD16 subpixelOrder B16;
+ CARD16 pad4 B16;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRSetScreenConfigReply;
+#define sz_xRRSetScreenConfigReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 enable B16;
+ CARD16 pad2 B16;
+} xRRSelectInputReq;
+#define sz_xRRSelectInputReq 12
+
+/*
+ * Additions for version 1.2
+ */
+
+typedef struct _xRRModeInfo {
+ RRMode id B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 dotClock B32;
+ CARD16 hSyncStart B16;
+ CARD16 hSyncEnd B16;
+ CARD16 hTotal B16;
+ CARD16 hSkew B16;
+ CARD16 vSyncStart B16;
+ CARD16 vSyncEnd B16;
+ CARD16 vTotal B16;
+ CARD16 nameLength B16;
+ RRModeFlags modeFlags B32;
+} xRRModeInfo;
+#define sz_xRRModeInfo 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetScreenSizeRangeReq;
+#define sz_xRRGetScreenSizeRangeReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 minWidth B16;
+ CARD16 minHeight B16;
+ CARD16 maxWidth B16;
+ CARD16 maxHeight B16;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xRRGetScreenSizeRangeReply;
+#define sz_xRRGetScreenSizeRangeReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 widthInMillimeters B32;
+ CARD32 heightInMillimeters B32;
+} xRRSetScreenSizeReq;
+#define sz_xRRSetScreenSizeReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetScreenResourcesReq;
+#define sz_xRRGetScreenResourcesReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ CARD16 nCrtcs B16;
+ CARD16 nOutputs B16;
+ CARD16 nModes B16;
+ CARD16 nbytesNames B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xRRGetScreenResourcesReply;
+#define sz_xRRGetScreenResourcesReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Time configTimestamp B32;
+} xRRGetOutputInfoReq;
+#define sz_xRRGetOutputInfoReq 12
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ RRCrtc crtc B32;
+ CARD32 mmWidth B32;
+ CARD32 mmHeight B32;
+ CARD8 connection;
+ CARD8 subpixelOrder;
+ CARD16 nCrtcs B16;
+ CARD16 nModes B16;
+ CARD16 nPreferred B16;
+ CARD16 nClones B16;
+ CARD16 nameLength B16;
+} xRRGetOutputInfoReply;
+#define sz_xRRGetOutputInfoReply 36
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+} xRRListOutputPropertiesReq;
+#define sz_xRRListOutputPropertiesReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nAtoms B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRListOutputPropertiesReply;
+#define sz_xRRListOutputPropertiesReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+} xRRQueryOutputPropertyReq;
+#define sz_xRRQueryOutputPropertyReq 12
+
+typedef struct {
+ BYTE type;
+ BYTE pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL pending;
+ BOOL range;
+ BOOL immutable;
+ BYTE pad1;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRQueryOutputPropertyReply;
+#define sz_xRRQueryOutputPropertyReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+ BOOL pending;
+ BOOL range;
+ CARD16 pad B16;
+} xRRConfigureOutputPropertyReq;
+#define sz_xRRConfigureOutputPropertyReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 format;
+ CARD8 mode;
+ CARD16 pad;
+ CARD32 nUnits B32;
+} xRRChangeOutputPropertyReq;
+#define sz_xRRChangeOutputPropertyReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+} xRRDeleteOutputPropertyReq;
+#define sz_xRRDeleteOutputPropertyReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+ Atom type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+#ifdef __cplusplus
+ BOOL _delete;
+#else
+ BOOL delete;
+#endif
+ BOOL pending;
+ CARD16 pad1 B16;
+} xRRGetOutputPropertyReq;
+#define sz_xRRGetOutputPropertyReq 28
+
+typedef struct {
+ BYTE type;
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xRRGetOutputPropertyReply;
+#define sz_xRRGetOutputPropertyReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ xRRModeInfo modeInfo;
+} xRRCreateModeReq;
+#define sz_xRRCreateModeReq 40
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RRMode mode B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRCreateModeReply;
+#define sz_xRRCreateModeReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRMode mode B32;
+} xRRDestroyModeReq;
+#define sz_xRRDestroyModeReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ RRMode mode B32;
+} xRRAddOutputModeReq;
+#define sz_xRRAddOutputModeReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ RRMode mode B32;
+} xRRDeleteOutputModeReq;
+#define sz_xRRDeleteOutputModeReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ Time configTimestamp B32;
+} xRRGetCrtcInfoReq;
+#define sz_xRRGetCrtcInfoReq 12
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ RRMode mode B32;
+ Rotation rotation B16;
+ Rotation rotations B16;
+ CARD16 nOutput B16;
+ CARD16 nPossibleOutput B16;
+} xRRGetCrtcInfoReply;
+#define sz_xRRGetCrtcInfoReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ INT16 x B16;
+ INT16 y B16;
+ RRMode mode B32;
+ Rotation rotation B16;
+ CARD16 pad B16;
+} xRRSetCrtcConfigReq;
+#define sz_xRRSetCrtcConfigReq 28
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time newTimestamp B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRSetCrtcConfigReply;
+#define sz_xRRSetCrtcConfigReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xRRGetCrtcGammaSizeReq;
+#define sz_xRRGetCrtcGammaSizeReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRGetCrtcGammaSizeReply;
+#define sz_xRRGetCrtcGammaSizeReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xRRGetCrtcGammaReq;
+#define sz_xRRGetCrtcGammaReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRGetCrtcGammaReply;
+#define sz_xRRGetCrtcGammaReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+} xRRSetCrtcGammaReq;
+#define sz_xRRSetCrtcGammaReq 12
+
+/*
+ * event
+ */
+typedef struct {
+ CARD8 type; /* always evBase + ScreenChangeNotify */
+ CARD8 rotation; /* new rotation */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32; /* time screen was changed */
+ Time configTimestamp B32; /* time config data was changed */
+ Window root B32; /* root window */
+ Window window B32; /* window requesting notification */
+ SizeID sizeID B16; /* new size ID */
+ CARD16 subpixelOrder B16; /* subpixel order */
+ CARD16 widthInPixels B16; /* new size */
+ CARD16 heightInPixels B16;
+ CARD16 widthInMillimeters B16;
+ CARD16 heightInMillimeters B16;
+} xRRScreenChangeNotifyEvent;
+#define sz_xRRScreenChangeNotifyEvent 32
+
+typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_CrtcChange */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32; /* time crtc was changed */
+ Window window B32; /* window requesting notification */
+ RRCrtc crtc B32; /* affected CRTC */
+ RRMode mode B32; /* current mode */
+ CARD16 rotation B16; /* rotation and reflection */
+ CARD16 pad1 B16; /* unused */
+ INT16 x B16; /* new location */
+ INT16 y B16;
+ CARD16 width B16; /* new size */
+ CARD16 height B16;
+} xRRCrtcChangeNotifyEvent;
+#define sz_xRRCrtcChangeNotifyEvent 32
+
+typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_OutputChange */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32; /* time crtc was changed */
+ Time configTimestamp B32; /* time crtc was changed */
+ Window window B32; /* window requesting notification */
+ RROutput output B32; /* affected output */
+ RRCrtc crtc B32; /* current crtc */
+ RRMode mode B32; /* current mode */
+ CARD16 rotation B16; /* rotation and reflection */
+ CARD8 connection; /* connection status */
+ CARD8 subpixelOrder; /* subpixel order */
+} xRROutputChangeNotifyEvent;
+#define sz_xRROutputChangeNotifyEvent 32
+
+typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_OutputProperty */
+ CARD16 sequenceNumber B16;
+ Window window B32; /* window requesting notification */
+ RROutput output B32; /* affected output */
+ Atom atom B32; /* property name */
+ Time timestamp B32; /* time crtc was changed */
+ CARD8 state; /* NewValue or Deleted */
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xRROutputPropertyNotifyEvent;
+#define sz_xRROutputPropertyNotifyEvent 32
+
+#undef RRModeFlags
+#undef RRCrtc
+#undef RRMode
+#undef RROutput
+#undef RRMode
+#undef RRCrtc
+#undef Drawable
+#undef Window
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef Time
+#undef KeyCode
+#undef KeySym
+#undef Rotation
+#undef SizeID
+#undef SubpixelOrder
+
+#endif /* _XRANDRP_H_ */
diff --git a/X11/extensions/randrproto.pc.in b/X11/extensions/randrproto.pc.in
new file mode 100644
index 000000000..d94d353ec
--- /dev/null
+++ b/X11/extensions/randrproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: RandrProto
+Description: Randr extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt
new file mode 100644
index 000000000..6719cf800
--- /dev/null
+++ b/X11/extensions/randrproto.txt
@@ -0,0 +1,1767 @@
+ The X Resize, Rotate and Reflect Extension
+ Version 1.2
+ 2006-4-13
+
+ Jim Gettys
+ Jim.Gettys@hp.com
+ Cambridge Research Laboratory
+ HP Labs
+ Hewlett Packard Company
+
+ Keith Packard
+ keith.packard@intel.com
+ Open Source Technology Center
+ Intel Corporation
+
+1. Introduction
+
+The X Resize, Rotate and Reflect Extension, called RandR for short,
+brings the ability to resize, rotate and reflect the root window of a
+screen. It is based on the X Resize and Rotate Extension as specified
+in the Proceedings of the 2001 Usenix Technical Conference [RANDR].
+
+RandR as implemented and integrated into the X server differs in
+one substantial fashion from the design discussed in that paper: that
+is, RandR 1.0 does not implement the depth switching described in that
+document, and the support described for that in the protocol in that
+document and in the implementation has been removed from the
+protocol described here, as it has been overtaken by events.
+
+These events include:
+ ► Modern toolkits (in this case, GTK+ 2.x) have progressed to the point
+ of implementing migration between screens of arbitrary depths
+ ► The continued advance of Moore's law has made limited amounts of VRAM
+ less of an issue, reducing the pressure to implement depth switching
+ on laptops or desktop systems
+ ► The continued decline of legacy toolkits whose design would have
+ required depth switching to support migration
+ ► The lack of depth switching implementation experience in the
+ intervening time, due to events beyond our control
+
+Additionally, the requirement to support depth switching might
+complicate other re-engineering of the device independent part of the
+X server that is currently being contemplated.
+
+Rather than further delaying RandR's widespread deployment for a feature
+long wanted by the community (resizing of screens, particularly on laptops),
+or the deployment of a protocol design that might be flawed due to lack of
+implementation experience, we decided to remove depth switching from the
+protocol. It may be implemented at a later time if resources and
+interests permit as a revision to the protocol described here, which will
+remain a stable base for applications. The protocol described here has been
+implemented in the main X.org server, and more fully in the hw/kdrive
+implementation in the distribution, which fully implements resizing,
+rotation and reflection.
+
+1.2 Introduction to version 1.2 of the extension
+
+One of the significant limitations found in version 1.1 of the RandR
+protocol was the inability to deal with the Xinerama model where multiple
+monitors display portions of a common underlying screen. In this environment,
+zero or more video outputs are associated with each CRT controller which
+defines both a set of video timings and a 'viewport' within the larger
+screen. This viewport is independent of the overall size of the screen, and
+may be located anywhere within the screen.
+
+The effect is to decouple the reported size of the screen from the size
+presented by each video output, and to permit multiple outputs to present
+information for a single screen.
+
+To extend RandR for this model, we separate out the output, CRTC and screen
+configuration information and permit them to be configured separately. For
+compatibility with the 1.1 version of the protocol, we make the 1.1 requests
+simultaneously affect both the screen and the (presumably sole) CRTC and
+output. The set of available outputs are presented with UTF-8 encoded names
+and may be connected to CRTCs as permitted by the underlying hardware. CRTC
+configuration is now done with full mode information instead of just size
+and refresh rate, and these modes have names. These names also use UTF-8
+encoding. New modes may also be added by the user.
+
+Additional requests and events are provided for this new functionality.
+
+ ┌────────────────────────────────┬──────────┐
+ ┏━━━━━━━┳───────────────┐ ╔════════╗ ╔════════╗
+ ┃ 1 ┃ │ ║ A ║ ║ B ║
+ ┃ ┏━━━╋━━━━━━━━━━━━━━━┫ ║ ║ ║ ║
+ ┣━━━╋━━━┛ ┃ ╚════════╝ ╚════════╝
+ │ ┃ 2 ┃─────────────────┐
+ │ ┃ ┃ ╔═══════════════════╗
+ │ ┃ ┃ ║ ║
+ │ ┗━━━━━━━━━━━━━━━━━━━┫ ║ C ║
+ └───────────────────────┘ ║ ║
+ ┌──────┐ ┏━━━━┓ ╔══════╗ ║ ║
+ │screen│ ┃CRTC┃ ║output║ ╚═══════════════════╝
+ └──────┘ ┗━━━━┛ ╚══════╝
+
+In this picture, the screen is covered (incompletely) by two CRTCs. CRTC1
+is connected to two outputs, A and B. CRTC2 is connected to output C.
+Outputs A and B will present exactly the same region of the screen using
+the same mode line. Output C will present a different (larger) region of
+the screen using a different mode line.
+
+RandR provides information about each available CRTC and output; the
+connection between CRTC and output is under application control, although
+the hardware will probably impose restrictions on the possible
+configurations. The protocol doesn't try to describe these restrictions,
+instead it provides a mechanism to find out what combinations are supported.
+
+For instance, dual-link DVI gangs two CRTC outputs together to provide higher
+bandwidth for large resolution screens. This is exposed in RandR by
+requiring that nothing be connected to the second CRTC when driving a high
+resolution screen on the first.
+
+1.1 Acknowledgements
+
+Our thanks to the contributors to the design found on the xpert mailing
+list, in particular:
+
+Alan Hourihane for work on the early implementation
+Andrew C. Aitchison for help with the XFree86 DDX implementation
+Andy Ritger for early questions about how mergefb/Xinerama work with RandR
+Carl Worth for editing the specification and Usenix paper
+David Dawes for XFree86 DDX integration work
+Thomas Winischhofer for the hardware-accelerated SiS rotation implementation
+Matthew Tippett and Kevin Martin for splitting outputs and CRTCs to more
+fully expose what video hardware can do
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+2. Screen change model
+
+Screens may change dynamically, either under control of this extension, or
+due to external events. Examples include: monitors being swapped, pressing a
+button to switch from internal display to an external monitor on a laptop,
+or, eventually, the hotplug of a display card entirely on busses such as
+Cardbus or Express Card which permit hot-swap (which will require other work
+in addition to this extension).
+
+Since the screen configuration is dynamic and asynchronous to the client and
+may change at any time RandR provides mechanisms to ensure that your clients
+view is up to date with the configuration possibilities of the moment and
+enforces applications that wish to control the configuration to prove that
+their information is up to date before honoring requests to change the
+screen configuration (by requiring a timestamp on the request).
+
+Interested applications are notified whenever the screen configuration
+changes, providing the current size of the screen and subpixel order (see
+the Render extension [RENDER]), to enable proper rendering of subpixel
+decimated client text to continue, along with a time stamp of the
+configuration change. A client must refresh its knowledge of the screen
+configuration before attempting to change the configuration after a
+notification, or the request will fail.
+
+To avoid multiplicative explosion between orientation, reflection and sizes,
+the sizes are only those sizes in the normal (0) rotation.
+
+Rotation and reflection and how they interact can be confusing. In Randr,
+the coordinate system is rotated in a counter-clockwise direction relative
+to the normal orientation. Reflection is along the window system coordinate
+system, not the physical screen X and Y axis, so that rotation and
+reflection do not interact. The other way to consider reflection is to is
+specified in the "normal" orientation, before rotation, if you find the
+other way confusing.
+
+We expect that most clients and toolkits will be oblivious to changes to the
+screen structure, as they generally use the values in the connections Display
+structure directly. By toolkits updating the values on the fly, we believe
+pop-up menus and other pop up windows will position themselves correctly in
+the face of screen configuration changes (the issue is ensuring that pop-ups
+are visible on the reconfigured screen).
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+3. Data Types
+
+The subpixel order is shared with the Render extension, and is documented
+there. The only datatype defined is the screen size, defined in the normal
+(0 degree) orientation.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+4. Errors
+
+Errors are sent using core X error reports.
+
+Output
+ A value for an OUTPUT argument does not name a defined OUTPUT.
+CRTC
+ A value for a CRTC argument does not name a defined CRTC.
+Mode
+ A value for a MODE argument does not name a defined MODE.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+5. Protocol Types
+
+RRCONFIGSTATUS { Success
+ InvalidConfigTime
+ InvalidTime
+ Failed }
+
+ A value of type RRCONFIGSTATUS returned when manipulating the output
+ configuration or querying information from the server that has some
+ time-dependency.
+
+ InvalidConfigTime indicates that the supplied configuration
+ timestamp does not match the current X server configuration
+ timestamp. Usually this means that the output configuration has
+ changed since the timestamp was received by the application.
+
+ InvalidTime indicates that the supplied output reconfiguration time
+ is earlier than the most recent output reconfiguration request.
+ Generally this indicates that another application has reconfigured
+ the output using a later timestamp.
+
+ Failed is returned whenever the operation is unsuccessful for some
+ other reason. This generally indicates that the requested output
+ configuration is unsupported by the hardware. The goal is to make
+ these limitations expressed by the protocol, but when that isn't
+ possible it is correct to return this error value. If, as a
+ implentor, you find this error code required, please submit the
+ hardware constraints that exist so that a future version of the
+ extension can correctly capture the configuration constraints in
+ your system.
+
+ROTATION { Rotate_0
+ Rotate_90
+ Rotate_180
+ Rotate_270
+ Reflect_X
+ Reflect_Y }
+
+ These values are used both to indicate a set of allowed rotations
+ and reflections as well as to indicate a specific rotation and
+ reflection combination.
+
+RRSELECTMASK { RRScreenChangeNotifyMask
+ RRCrtcChangeNotifyMask (New in version 1.2)
+ RROutputChangeNotifyMask (New in version 1.2)
+ RROutputPropertyNotifyMask (New in version 1.2) }
+
+SIZEID { CARD16 }
+
+MODE { XID or None }
+
+CRTC { XID }
+
+OUTPUT { XID }
+
+CONNECTION { Connected, Disconnected, UnknownConnection }
+
+ This value provides an indication of whether an output is actually
+ connected to a monitor or other presentation device.
+
+SUBPIXELORDER { SubPixelUnknown The subpixel order uses the Render
+ SubPixelHorizontalRGB extensions definitions; they are here
+ SubPixelHorizontalBGR only for convenience.
+ SubPixelVerticalRGB
+ SubPixelVerticalBGR
+ SubPixelNone }
+
+SCREENSIZE { widthInPixels, heightInPixels: CARD16
+ widthInMillimeters, heightInMillimeters: CARD16 }
+
+MODEFLAG { HSyncPositive
+ HSyncNegative
+ VSyncPositive
+ VSyncNegative
+ Interlace
+ DoubleScan
+ CSync
+ CSyncPositive
+ CSyncNegative
+ HSkewPresent
+ BCast
+ PixelMultiplex
+ DoubleClock
+ ClockDivideBy2 }
+
+MODEINFO { id: MODE
+ name: STRING
+ width, height: CARD16
+ dotClock: CARD32
+ hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
+ vSyncStart, vSyncEnd, vTotal: CARD16
+ modeFlags: SETofMODEFLAG }
+
+REFRESH { rates: LISTofCARD16 }
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+6. Extension Initialization
+
+The name of this extension is "RANDR".
+
+┌───
+ RRQueryVersion
+ client-major-version: CARD32
+ client-minor-version: CARD32
+ ▶
+ major-version: CARD32
+ minor-version: CARD32
+└───
+
+ The client sends the highest supported version to the server
+ and the server sends the highest version it supports, but no
+ higher than the requested version. Major versions changes can
+ introduce incompatibilities in existing functionality, minor
+ version changes introduce only backward compatible changes.
+ It is the clients responsibility to ensure that the server
+ supports a version which is compatible with its expectations.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+7. Extension Requests
+
+┌───
+ RRSelectInput
+ window: WINDOW
+ enable: SETofRRSELECTMASK
+└───
+ Errors: Window, Value
+
+ If 'enable' is RRScreenChangeNotifyMask, RRScreenChangeNotify events
+ will be sent when the screen configuration changes, either from
+ this protocol extension, or due to detected external screen
+ configuration changes. RRScreenChangeNotify may also be sent when
+ this request executes if the screen configuration has changed since
+ the client connected, to avoid race conditions.
+
+ New for version 1.2:
+
+ If 'enable' contains RRCrtcChangeMask, RRCrtcChangeNotify events
+ will be sent when a the configuration for a CRTC associated with the
+ screen changes, either through this protocol extension or due to
+ detected external changes. RRCrtcChangeNotify may also be sent when
+ this request executes if the CRTC configuration has changed since
+ the client connected, to avoid race conditions.
+
+ If 'enable' contains RROutputChangeMask, RROutputChangeNotify events
+ will be sent when a the configuration for an output associated with
+ the screen changes, either through this protocol extension or due to
+ detected external changes. RROutputChangeNotify may also be sent
+ when this request executes if the output configuration has changed
+ since the client connected, to avoid race conditions.
+
+ If 'enable' contains RROutputPropertyNotifyMask,
+ RROutputPropertyNotify events will be sent when properties change on
+ this output.
+
+┌───
+ RRSetScreenConfig
+ window: WINDOW
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ size-id: SIZEID
+ rotation: ROTATION
+ rate: CARD16
+ ▶
+ status: RRCONFIGSTATUS
+ new-timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ root: WINDOW
+ subpixelOrder: SUBPIXELORDER
+└───
+ Errors: Value, Match
+
+ If 'timestamp' is less than the time when the configuration was last
+ successfully set, the request is ignored and InvalidTime returned in
+ status.
+
+ If 'config-timestamp' is not equal to when the server's screen
+ configurations last changed, the request is ignored and
+ InvalidConfigTime returned in status. This could occur if the
+ screen changed since you last made a RRGetScreenInfo request,
+ perhaps by a different piece of display hardware being installed.
+ Rather than allowing an incorrect call to be executed based on stale
+ data, the server will ignore the request.
+
+ 'rate' contains the desired refresh rate. If it is zero, the server
+ selects an appropriate rate.
+
+ This request may fail for other indeterminate reasons, in which case
+ 'status' will be set to Failed and no configuration change will be
+ made.
+
+ This request sets the screen to the specified size, rate, rotation
+ and reflection.
+
+ When this request succeeds, 'status' contains Success and the
+ requested changes to configuration will have been made.
+
+ 'new-time-stamp' contains the time at which this request was
+ executed.
+
+ 'config-timestamp' contains the time when the possible screen
+ configurations were last changed.
+
+ 'root' contains the root window for the screen indicated by the
+ window.
+
+ 'subpixelOrder' contains the resulting subpixel order of the screen
+ to allow correct subpixel rendering.
+
+ Value errors are generated when 'rotation', 'rate' or 'size-id'
+ are invalid.
+
+┌───
+ RRGetScreenInfo
+ window: WINDOW
+ ▶
+ rotations: SETofROTATION
+ root: WINDOW
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ size-id: SIZEID
+ rotation: ROTATION
+ rate: CARD16
+ sizes: LISTofSCREENSIZE
+ refresh: LISTofREFRESH
+└───
+
+ Errors: Window
+
+ RRGetScreenInfo returns information about the current and available
+ configurations for the screen associated with 'window'.
+
+ 'rotations' contains the set of rotations and reflections supported
+ by the screen.
+
+ 'root' is the root window of the screen.
+
+ 'config-timestamp' indicates when the screen configuration
+ information last changed: requests to set the screen will fail
+ unless the timestamp indicates that the information the client
+ is using is up to date, to ensure clients can be well behaved
+ in the face of race conditions.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'size-id' indicates which size is active.
+
+ 'rate' is the current refresh rate. This is zero when the refresh
+ rate is unknown or on devices for which refresh is not relevant.
+
+ 'sizes' is the list of possible frame buffer sizes (at the normal
+ orientation. Each size indicates both the linear physical size of
+ the screen and the pixel size.
+
+ 'refresh' is the list of refresh rates for each size. Each element
+ of 'sizes' has a corresponding element in 'refresh'. An empty list
+ indicates no known rates, or a device for which refresh is not
+ relevant.
+
+ The default size of the screen (the size that would become the
+ current size when the server resets) is the first size in the
+ list.
+
+7.1. Extension Requests added in version 1.2 of the extension
+
+As introduced above, version 1.2 of the extension splits the screen size
+from the crtc and output configuration, permitting the subset of the screen
+presented by multiple outputs to be configured. As a separate notion, the
+size of the screen itself may be arbitrarily configured within a defined
+range. As crtcs and outputs are added and removed from the system, the set
+returned by the extension will change so that applications can detect
+dynamic changes in the display environment.
+
+┌───
+ RRGetScreenSizeRange
+ window: WINDOW
+ ▶
+ CARD16 minWidth, minHeight
+ CARD16 maxWidth, maxHeight
+└───
+ Errors: Window
+
+ Returns the range of possible screen sizes. The screen may be set to
+ any size within this range.
+
+┌───
+ RRSetScreenSize
+ window: WINDOW
+ width: CARD16
+ height: CARD16
+ width-in-millimeters: CARD32
+ height-in-millimeters: CARD32
+└───
+ Errors: Window, Match, Value
+
+ Sets the screen to the specified size. 'width' and 'height' must be
+ within the range allowed by GetScreenSizeRanges, otherwise a Value
+ error results. All active monitors must be configured to display a
+ subset of the specified size, else a Match error results.
+
+ 'width-in-millimeters' and 'height-in-millimeters' can be set to
+ reflect the physical size of the screen reported both through this
+ extension and the core protocol. They must be non-zero, or Value
+ error results.
+
+┌───
+ RRGetScreenResources
+ window: WINDOW
+ ▶
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ crtcs: LISTofCRTC
+ outputs: LISTofOUTPUT
+ modes: LISTofMODEINFO
+└───
+ Errors: Window
+
+ RRGetScreenResources returns the list of outputs and crtcs connected
+ to the screen associated with 'window'.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'config-timestamp' indicates when the configuration information last
+ changed. Requests to configure the output will fail unless the
+ timestamp indicates that the information the client is using is up
+ to date, to ensure clients can be well behaved in the face of race
+ conditions.
+
+ 'crtcs' contains the list of CRTCs associated with the screen.
+
+ 'outputs' contains the list of outputs associated with the screen.
+
+ 'modes' contains the list of modes associated with the screen
+
+ This request explicitly asks the server to ensure that the
+ configuration data is up-to-date wrt the hardware. If that requires
+ polling, this is when such polling would take place. Requests for
+ further information should not poll, but rather return the data
+ collected at this point.
+
+┌───
+ RRGetOutputInfo
+ output: OUTPUT
+ config-timestamp: TIMESTAMP
+ ▶
+ status: RRCONFIGSTATUS
+ timestamp: TIMESTAMP
+ crtc: CRTC
+
+ name: STRING
+ connection: CONNECTION
+ subpixel-order: SUBPIXELORDER
+ widthInMillimeters, heightInMillimeters: CARD32
+ crtcs: LISTofCRTC
+ clones: LISTofOUTPUT
+ modes: LISTofMODE
+ num-preferred: CARD16
+└───
+ Errors: Output
+
+ RRGetOutputInfo returns information about the current and available
+ configurations 'output'.
+
+ If 'config-timestamp' does not match the current configuration
+ timestamp (as returned by RRGetScreenResources), 'status' is set to
+ InvalidConfigTime and the remaining reply data is empty. Otherwise,
+ 'status' is set to Success.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'crtc' is the current source CRTC for video data, or Disabled if the
+ output is not connected to any CRTC.
+
+ 'name' is a UTF-8 encoded string designed to be presented to the
+ user to indicate which output this is. E.g. "S-Video" or "DVI".
+
+ 'connection' indicates whether the hardware was able to detect a
+ device connected to this output. If the hardware cannot determine
+ whether something is connected, it will set this to
+ UnknownConnection.
+
+ 'subpixel-order' contains the resulting subpixel order of the
+ connected device to allow correct subpixel rendering.
+
+ 'widthInMillimeters' and 'heightInMillimeters' report the physical
+ size of the displayed area. If unknown, or not really fixed (e.g.,
+ for a projector), these values are both zero.
+
+ 'crtcs' is the list of CRTCs that this output may be connected to.
+ Attempting to connect this output to a different CRTC results in a
+ Match error.
+
+ 'clones' is the list of outputs which may be simultaneously
+ connected to the same CRTC along with this output. Attempting to
+ connect this output with an output not in the 'clones' list
+ results in a Match error.
+
+ 'modes' is the list of modes supported by this output. Attempting to
+ connect this output to a CRTC not using one of these modes results
+ in a Match error.
+
+ The first 'num-preferred' modes in 'modes' are preferred by the
+ monitor in some way; for fixed-pixel devices, this would generally
+ indicate which modes match the resolution of the output device.
+
+┌───
+ RRListOutputProperties
+ output:OUTPUT
+ ▶
+ atoms: LISTof ATOM
+└───
+ Errors: Output
+
+ This request returns the atoms of properties currently defined on
+ the output.
+
+┌───
+ RRQueryOutputProperty
+ output: OUTPUT
+ property: ATOM
+ ▶
+ pending: BOOL
+ range: BOOL
+ immutable: BOOL
+ valid-values: LISTofINT32
+└───
+ Errors: Name, Atom, Output
+
+ If the specified property does not exist for the specified output,
+ then a Name error is returned.
+
+ If 'pending' is TRUE, changes made to property values with
+ RRChangeOutputProperty will be saved in the pending property value
+ and be automatically copied to the current value on the next
+ RRSetCrtcConfig request involving the named output. If 'pending' is
+ FALSE, changes are copied immediately.
+
+ If 'range' is TRUE, then the valid-values list will contain
+ precisely two values indicating the minimum and maximum allowed
+ values. If 'range' is FALSE, then the valid-values list will contain
+ the list of possible values; attempts to set other values will
+ result in a Value error.
+
+ If 'immutable' is TRUE, then the property configuration cannot be
+ changed by clients. Immutable properties are interpreted by the X
+ server.
+
+┌───
+ RRConfigureOutputProperty
+ output: OUTPUT
+ property: ATOM
+ pending: BOOL
+ range: BOOL
+ valid-values: LISTofINT32
+└───
+ Errors: Access, Name, Atom, Output
+
+ If the specified property is 'immutable', an Access error is
+ returned.
+
+ Otherwise, the configuration of the specified property is changed to
+ the values provided in this request.
+
+ If the specified property does not exist for the specified output,
+ it is created with an empty value and None type.
+
+┌───
+ RRChangeOutputProperty
+ output: OUTPUT
+ property, type: ATOM
+ format: {8, 16, 32}
+ mode: { Replace, Prepend, Append }
+ data: LISTofINT8 or LISTofINT16 or LISTofINT32
+└───
+ Errors: Alloc, Atom, Match, Value, Output
+
+ This request alters the value of the property for the specified
+ output. If the property is marked as a 'pending' property, only the
+ pending value of the property is changed. Otherwise, changes are
+ reflected in both the pending and current values of the property.
+ The type is uninterpreted by the server. The format specifies
+ whether the data should be viewed as a list of 8-bit, 16-bit, or
+ 32-bit quantities so that the server can correctly byte-swap as
+ necessary.
+
+ If the mode is Replace, the previous property value is discarded.
+ If the mode is Prepend or Append, then the type and format must
+ match the existing property value (or a Match error results). If
+ the property is undefined, it is treated as defined with the correct
+ type and format with zero-length data.
+
+ For Prepend, the data is tacked on to the beginning of the existing
+ data, and for Append, it is tacked on to the end of the existing data.
+
+ This request generates a OutputPropertyNotify
+
+ The lifetime of a property is not tied to the storing client.
+ Properties remain until explicitly deleted, until the output is
+ destroyed, or until server reset (see section 10).
+
+ The maximum size of a property is server-dependent and may vary
+ dynamically.
+
+┌───
+ RRDeleteOutputProperty
+ output: OUTPUT
+ property: ATOM
+└───
+ Errors: Atom, Output
+
+ This request deletes the property from the specified window if the
+ property exists and generates a OutputPropertyNotify event unless
+ the property does not exist.
+
+┌───
+ RRGetOutputProperty
+ output: OUTPUT
+ property: ATOM
+ type: ATOM or AnyPropertyType
+ long-offset, long-length: CARD32
+ delete: BOOL
+ pending: BOOL
+ ▶
+ type: ATOM or None
+ format: {0, 8, 16, 32}
+ bytes-after: CARD32
+ value: LISTofINT8 or LISTofINT16 or LISTofINT32
+└───
+ Errors: Atom, Value, Output
+
+ If the specified property does not exist for the specified output,
+ then the return type is None, the format and bytes-after are zero,
+ and the value is empty. The delete argument is ignored in this
+ case.
+
+ If the specified property exists but its type does not match the
+ specified type, then the return type is the actual type of the
+ property, the format is the actual format of the property (never
+ zero), the bytes-after is the length of the property in bytes (even
+ if the format is 16 or 32), and the value is empty. The delete
+ argument is ignored in this case.
+
+ If the specified property exists and either AnyPropertyType is
+ specified or the specified type matches the actual type of the
+ property, then the return type is the actual type of the property,
+ the format is the actual format of the property (never zero), and
+ the bytes-after and value are as follows, given:
+
+ N = actual length of the stored property in bytes
+ (even if the format is 16 or 32)
+ I = 4 × offset
+ T = N - I
+ L = MINIMUM(T, 4 × long-length)
+ A = N - (I + L)
+
+ If 'pending' is true, and if the property holds a pending value,
+ then the value returned will be the pending value of the property
+ rather than the current value. The returned value starts at byte
+ index I in the property (indexing from 0), and its length in bytes
+ is L. However, it is a Value error if long-offset is given such
+ that L is negative. The value of bytes-after is A, giving the
+ number of trailing unread bytes in the stored property. If delete
+ is True and the bytes-after is zero, the property is also deleted
+ from the output, and a RROutputPropertyNotify event is generated.
+
+┌───
+ RRCreateMode
+ window: WINDOW
+ modeinfo: MODEINFO
+ ▶
+ mode: MODE
+└───
+ Errors: Window, Name, Value
+
+ 'modeinfo' provides a new mode for outputs on the screen
+ associated with 'window'. If the name of 'modeinfo' names an
+ existing mode, a Name error is returned. If some parameter of the
+ mode is not valid in some other way, a Value error is returned.
+
+ The returned 'mode' provides the id for the mode.
+
+┌───
+ RRDestroyMode
+ mode: MODE
+└───
+ Errors: Mode, Access
+
+ The user-defined 'mode' is destroyed. 'mode' must name a mode
+ defined with RRCreateMode, else an Match error is returned. If
+ 'mode' is in use by some CRTC or Output, then an Access error is
+ returned.
+
+┌───
+ RRAddOutputMode
+ output: OUTPUT
+ mode: MODE
+└───
+ Errors: Output, Mode, Match
+
+ 'output' indicates which output is to be configured.
+
+ 'mode' specifies which mode to add. If 'mode' is not valid for
+ 'output', then a Match error is generated.
+
+ This request generates OutputChangeNotify events.
+
+┌───
+ RRDeleteOutputMode
+ output: OUTPUT
+ mode: MODE
+└───
+ Errors: Output, Mode
+
+ 'output' indicates which output is to be configured.
+
+ 'mode' specifies which mode to delete. 'mode' must have been added
+ with RRAddOutputMode, else an Access error is returned. 'mode' must
+ not be active, else a Match error is returned.
+
+ This request generates OutputChangeNotify events.
+
+┌───
+ RRGetCrtcInfo
+ crtc: CRTC
+ config-timestamp: TIMESTAMP
+ ▶
+ status: RRCONFIGSTATUS
+ timestamp: TIMESTAMP
+ x, y: INT16
+ width, height: CARD16
+ mode: MODE
+ rotation: ROTATION
+ outputs: LISTofOUTPUT
+
+ rotations: SETofROTATION
+ possible-outputs: LISTofOUTPUT
+└───
+
+ Errors: Window
+
+ RRGetCrtcModes returns information about the current and available
+ configurations for the specified crtc connected to the screen
+ associated with 'window'.
+
+ If 'config-timestamp' does not match the current configuration
+ timestamp (as returned by RRGetScreenResources), 'status' is set to
+ InvalidConfigTime and the remaining reply data is empty. Otherwise,
+ 'status' is set to Success.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'x' and 'y' indicate the position of this CRTC within the screen
+ region. They will be set to 0 when the CRTC is disabled.
+
+ 'width' and 'height' indicate the size of the area presented by this
+ CRTC.
+
+ 'mode' indicates which mode is active, or None indicating that the
+ CRTC has been disabled and is not displaying the screen contents.
+
+ 'rotation' indicates the active rotation. It is set to Rotate_0
+ when the CRTC is disabled.
+
+ 'outputs' is the list of outputs currently connected to this CRTC
+ and is empty when the CRTC is disabled.
+
+ 'rotations' contains the set of rotations and reflections supported
+ by the CRTC.
+
+ 'possible-outputs' lists all of the outputs which may be connected
+ to this CRTC.
+
+┌───
+ RRSetCrtcConfig
+ crtc: CRTC
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ x, y: INT16
+ mode: MODE
+ rotation: ROTATION
+ outputs: LISTofOUTPUT
+ ▶
+ status: RRCONFIGSTATUS
+ new-timestamp: TIMESTAMP
+└───
+ Errors: Value, Match
+
+ If 'timestamp' is less than the time when the configuration was last
+ successfully set, the request is ignored and InvalidTime returned in
+ status.
+
+ If 'config-timestamp' is not equal to when the monitor's
+ configuration last changed, the request is ignored and
+ InvalidConfigTime returned in status. This could occur if the
+ monitor changed since you last made a RRGetScreenInfo request,
+ perhaps by a different monitor being connected to the machine.
+ Rather than allowing an incorrect call to be executed based on stale
+ data, the server will ignore the request.
+
+ 'x' and 'y' contain the desired location within the screen for this
+ monitor's content. 'x' and 'y' must be within the screen size, else
+ a Value error results.
+
+ 'mode' is either the desired mode or None indicating the CRTC should
+ be disabled. If 'mode' is not one of these values, a Value
+ error results. 'mode' must be valid for all of the configured outputs,
+ else a Match error.
+
+ 'rotation' contains the desired rotation along with which
+ reflections should be enabled. The rotation and reflection values
+ must be among those allowed for this monitor, else a Value error
+ results.
+
+ 'outputs' contains the set of outputs that this CRTC should be
+ connected to. The set must be among the list of acceptable output
+ sets for this CRTC or a Match error results.
+
+ If 'mode' is None, then 'outputs' must be empty, else a Match error
+ results. Conversely, if 'mode' is not None, then 'outputs' must not be
+ empty, else a Match error results.
+
+ This request may fail for other indeterminate reasons, in which case
+ 'status' will be set to Failed and no configuration change will be
+ made.
+
+ This request sets the CRTC to the specified position, mode, rotation
+ and reflection. The entire area of the CRTC must fit within the
+ screen size, else a Match error results. As an example, rotating the
+ screen so that a single CRTC fills the entire screen before and
+ after may necessitate disabling the CRTC, resizing the screen,
+ then re-enabling the CRTC at the new configuration to avoid an
+ invalid intermediate configuration.
+
+ When this request succeeds, 'status' contains Success and the
+ requested changes to configuration will have been made.
+
+ 'new-time-stamp' contains the time at which this request was
+ executed.
+
+┌───
+ RRGetCrtcGammaSize
+ crtc: CRTC
+ ▶
+ size: CARD16
+└───
+ Errors: Crtc
+
+ This request returns the size of the gamma ramps used by 'crtc'.
+
+┌───
+ RRGetCrtcGamma
+ crtc: CRTC
+ ▶
+ red: LISTofCARD16
+ green: LISTofCARD16
+ blue: LISTofCARD16
+└───
+ Errors: Crtc
+
+ This request returns the currently set gamma ramps for 'crtc'. All
+ three lists will be the size returned by the RRGetCrtcGammaSize
+ request.
+
+┌───
+ RRSetCrtcGamma
+ crtc: CRTC
+ red: LISTofCARD16
+ green: LISTofCARD16
+ blue: LISTofCARD16
+└───
+ Errors: Crtc, Match
+
+ This request sets the gamma ramps for 'crtc'. All three lists
+ must be the size returned by RRGetCrtcGammaSize else a Value error
+ results.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+8. Extension Events
+
+Clients MAY select for ConfigureNotify on the root window to be
+informed of screen changes. This may be advantageous if all your
+client needs to know is the size of the root window, as it avoids
+round trips to set up the extension.
+
+RRScreenChangeNotify is sent if RRSelectInput has requested it
+whenever properties of the screen change, which may be due to external
+factors, such as re-cabling a monitor, etc.
+
+┌───
+ RRScreenChangeNotify
+
+ rotation: ROTATION; new rotation
+ sequenceNumber: CARD16 low 16 bits of request seq. number
+ timestamp: TIMESTAMP time screen was changed
+ configTimestamp: TIMESTAMP time config data was changed
+ root: WINDOW root window of screen
+ window: WINDOW window requesting notification
+ size-id: SIZEID index of new size
+ subpixelOrder: SUBPIXELORDER order of subpixels
+ widthInPixels: CARD16
+ heightInPixels: CARD16
+ widthInMillimeters: CARD16
+ heightInMillimeters: CARD16
+└───
+ This event is generated whenever the screen configuration is changed
+ and sent to requesting clients. 'timestamp' indicates when the
+ screen configuration was changed. 'configTimestamp' says when the
+ last time the configuration was changed. 'root' is the root of the
+ screen the change occurred on, 'window' is window selecting for this
+ event. 'size-id' contains the index of the current size.
+
+ This event is sent whenever the screen's configuration changes
+ or if a new screen configuration becomes available that was
+ not available in the past. In this case (config-timestamp in
+ the event not being equal to the config-timestamp returned in
+ the last call to RRGetScreenInfo), the client MUST call
+ RRGetScreenInfo to update its view of possible screen
+ configurations to have a correct view of possible screen
+ organizations.
+
+ Clients which select screen change notification events may be
+ sent an event immediately if the screen configuration was
+ changed between when they connected to the X server and
+ selected for notification. This is to prevent a common race
+ that might occur on log-in, where many applications start up
+ just at the time when a display manager or log in script might
+ be changing the screen size or configuration.
+
+8.1 Events added in version 1.2 of the RandR extension
+
+┌───
+ RROutputChangeNotify:
+ timestamp: TIMESTAMP time screen was reconfigured
+ config-timestamp: TIMESTAMP time available config data was changed
+ window: WINDOW window requesting notification
+ output: OUTPUT output affected by change
+ crtc: CRTC connected CRTC or None
+ mode: MODE mode in use on CRTC or None
+ connection: CONNECTION connection status
+└───
+
+ This event is generated whenever the available output configurations
+ have changed and is sent to requesting clients. 'timestamp'
+ indicates when the crtc configuration was changed by a client.
+ 'config-timestamp' says when the last time the available
+ configurations changed. 'root' is the root of the screen the change
+ occurred on, 'window' is window selecting for this event. The
+ precise change can be detected by examining the new state of the
+ system.
+
+┌───
+ RROutputPropertyNotify:
+ window: WINDOW window requesting notification
+ output: OUTPUT output affected by change
+ atom: ATOM affected property
+ time: TIMESTAMP time property was changed
+ subpixel-order: SUBPIXELORDER order of subpixels
+ state: { NewValue, Deleted } new property state
+└───
+
+ This event is reported to clients selecting RROutputPropertyChange
+ on the window and is generated with state NewValue when a property
+ of the window is changed using RRChangeOutputProperty even when
+ adding zero-length data and when replacing all or part of a property
+ with identical data. It is generated with state Deleted when a
+ property of the window is deleted using either
+ RRDeleteOutputProperty or RRGetOutputProperty. The timestamp
+ indicates the server time when the property was changed.
+
+┌───
+ RRCrtcChangeNotify
+ timestamp: TIMESTAMP time monitor was changed
+ config-timestamp: TIMESTAMP time config data was changed
+ root: WINDOW root window of screen
+ window: WINDOW window requesting notification
+ crtc: CRTC CRTC which changed
+ mode: MODE new mode
+ rotation: ROTATION; new rotation
+ x: INT16 x position of CRTC within screen
+ y: INT16 y position of CRTC within screen
+└───
+ This event is generated whenever the CRTC configuration is changed
+ and sent to requesting clients. 'timestamp' indicates when the
+ CRTC configuration was changed. 'config-timestamp' says when the
+ last time the configuration was changed. 'root' is the root of the
+ screen the change occurred on, 'window' is window selecting for this
+ event.
+
+ This event is sent whenever the monitor's configuration changes
+ or if a new monitor configuration becomes available that was
+ not available in the past. In this case (config-timestamp in
+ the event not being equal to the config-timestamp returned in
+ the last call to RRGetCrtcModes), the client MUST call
+ RRGetCrtcModes to update its view of possible monitor
+ configurations to have a correct view of possible monitor
+ organizations.
+
+ Clients which select monitor change notification events may be
+ sent an event immediately if the monitor configuration was
+ changed between when they connected to the X server and
+ selected for notification. This is to prevent a common race
+ that might occur on log-in, where many applications start up
+ just at the time when a display manager or log in script might
+ be changing the monitor size or configuration.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+9. Extension Versioning
+
+The RandR extension was developed in parallel with the implementation
+to ensure the feasibility of various portions of the design. As
+portions of the extension are implemented, the version number of the
+extension has changed to reflect the portions of the standard provided.
+This document describes the version 1.2 of the specification, the
+partial implementations have version numbers less than that. Here's a
+list of what each version provided:
+
+ 0.0: This prototype implemented resize and rotation in the
+ TinyX server Used approximately the protocol described in
+ the Usenix paper. Appeared in the TinyX server in
+ XFree86 4.2, but not in the XFree86 main server.
+
+ 0.1: Added subpixel order, added an event for subpixel order.
+ This version was never checked in to XFree86 CVS.
+
+ 1.0: Implements resize, rotation, and reflection. Implemented
+ both in the XFree86 main server (size change only at this
+ date), and fully (size change, rotation, and reflection)
+ in XFree86's TinyX server.
+
+ 1.1: Added refresh rates
+
+ 1.2: Separate screens from CRTCs and outputs, switch to full VESA
+ modes
+
+Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients
+will fail against 1.0 servers. The wire encoding op-codes were
+changed for GetScreenInfo to ensure this failure in a relatively
+graceful way. Version 1.1 servers and clients are cross compatible with
+1.0. Version 1.1 is considered to be stable and we intend upward
+compatibility from this point. Version 1.2 offers an extended model of the
+system with multiple output support. It offers backward compatibility with
+version 1.1.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+10. Relationship with other extensions
+
+Two other extensions have a direct relationship with this extension. This
+section attempts to explain how these three are supposed to work together.
+
+10.1 XFree86-VidModeExtension
+
+XFree86-VidModeExtension changes the configuration of a single monitor
+attached to the screen without changing the configuration of the screen
+itself. It provides the ability to specify new mode lines for the server to
+use along with selecting among existing mode lines. As it uses screen
+numbers instead of window identifiers, it can be used to affect multiple
+monitors in a single-screen Xinerama configuration. However, the association
+between screen numbers and root windows in a multi-Screen environment is not
+defined by the extension. Version 2.0 of this extension added the ability to
+adjust the DAC values in a TrueColor server to modify the brightness curves
+of the display.
+
+All of the utility of this extension is subsumed by RandR version 1.2, RandR
+should be used in preference to XFree86-VidModeExtension where both are
+present.
+
+10.2 Xinerama
+
+Xinerama provides a mechanism for describing the relationship between the
+overall screen display and monitors placed within that area. As such, it
+provides the query functionality of RandR 1.2 without any of the
+configuration functionality. Applications using Xinerama to discover
+monitor geometry can continue to do so, with the caveat that they will not be
+informed of changes when they occur. However, Xinerama configuration data
+will be updated, so applications selecting for RandR notification and
+re-querying the configuration with the Xinerama extension will get updated
+information. It is probably better to view RandR as a superset of Xinerama
+at this point and use it in preference to Xinerama where both are present.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+Appendix A. Protocol Encoding
+
+Syntactic Conventions
+
+This document uses the same syntactic conventions as the core X
+protocol encoding document.
+
+A.1 Common Types
+
+┌───
+ ROTATION
+ 0x0001 Rotate_0
+ 0x0002 Rotate_90
+ 0x0004 Rotate_180
+ 0x0008 Rotate_270
+ 0x0010 Reflect_X
+ 0x0020 Reflect_Y
+└───
+ Used to encode both sets of possible rotations and individual
+ selected rotations.
+
+┌───
+ RRSELECTMASK
+ 0x0001 ScreenChangeNotifyMask
+ 0x0002 CrtcChangeNotifyMask Added in version 1.2
+ 0x0004 OutputChangeNotifyMask Added in version 1.2
+ 0x0008 OutputPropertyNotifyMask Added in version 1.2
+└───
+ Event select mask for RRSelectInput
+
+┌───
+ RRCONFIGSTATUS
+ 0x0 Success
+ 0x1 InvalidConfigTime
+ 0x2 InvalidTime
+ 0x3 Failed
+└───
+ Return status for requests which depend on time.
+
+┌───
+ MODEINFO (32) Added in version 1.2
+ 4 CARD32 id
+ 2 CARD16 width in pixels
+ 2 CARD16 height in pixels
+ 4 CARD32 dot clock
+ 2 CARD16 h sync start
+ 2 CARD16 h sync end
+ 2 CARD16 h total
+ 2 CARD16 h skew
+ 2 CARD16 v sync start
+ 2 CARD16 v sync end
+ 2 CARD16 v total
+ 2 CARD16 name length
+ 4 SETofMODEFLAG mode flags
+└───
+
+ An output mode specifies the complete CRTC timings for
+ a specific mode. The vertical and horizontal synchronization rates
+ can be computed given the dot clock and the h total/v total
+ values. If the dot clock is zero, then all of the timing
+ parameters and flags are not used, and must be zero as this
+ indicates that the timings are unknown or otherwise unused.
+ The name itself will be encoded separately in each usage.
+
+┌───
+ MODEFLAG
+ 0x00000001 HSyncPositive
+ 0x00000002 HSyncNegative
+ 0x00000004 VSyncPositive
+ 0x00000008 VSyncNegative
+ 0x00000010 Interlace
+ 0x00000020 DoubleScan
+ 0x00000040 CSync
+ 0x00000080 CSyncPositive
+ 0x00000100 CSyncNegative
+ 0x00000200 HSkewPresent
+ 0x00000400 BCast
+ 0x00000800 PixelMultiplex
+ 0x00001000 DoubleClock
+ 0x00002000 ClockDivideBy2
+└───
+┌───
+ CONNECTION
+ 0 Connected
+ 1 Disconnected
+ 2 UnknownConnection
+└───
+
+
+A.2 Protocol Requests
+
+Opcodes 1 and 3 were used in the 0.0 protocols, and will return
+errors if used in version 1.0.
+
+┌───
+ RRQueryVersion
+
+ 1 CARD8 major opcode
+ 1 0 RandR opcode
+ 2 3 length
+ 4 CARD32 major version
+ 4 CARD32 minor version
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 1 CARD32 major version
+ 1 CARD32 minor version
+└───
+┌───
+ RRSetScreenConfig
+
+ 1 CARD8 major opcode
+ 1 2 RandR opcode
+ 2 6 length
+ 4 WINDOW window on screen to be configured
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config timestamp
+ 2 SIZEID size index
+ 2 ROTATION rotation/reflection
+ 2 CARD16 refresh rate (1.1 only)
+ 2 CARD16 pad
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 TIMESTAMP new timestamp
+ 4 TIMESTAMP new configuration timestamp
+ 4 WINDOW root
+ 2 SUBPIXELORDER subpixel order defined in Render
+ 2 CARD16 pad4
+ 4 CARD32 pad5
+ 4 CARD32 pad6
+└───
+┌───
+ RRSelectInput
+
+ 1 CARD8 major opcode
+ 1 4 RandR opcode
+ 2 3 length
+ 4 WINDOW window
+ 2 SETofRRSELECTMASK enable
+ 2 CARD16 pad
+└───
+┌───
+ RRGetScreenInfo
+
+ 1 CARD8 major opcode
+ 1 5 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 CARD8 set of Rotations
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW root window
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config timestamp
+ 2 CARD16 number of SCREENSIZE following
+ 2 SIZEID current size index
+ 2 ROTATION current rotation and reflection
+ 2 CARD16 current rate (added in version 1.1)
+ 2 CARD16 length of rate info (number of CARD16s)
+ 2 CARD16 pad
+
+ SCREENSIZE
+ 2 CARD16 width in pixels
+ 2 CARD16 height in pixels
+ 2 CARD16 width in millimeters
+ 2 CARD16 height in millimeters
+
+ REFRESH
+ 2 CARD16 number of rates (n)
+ 2n CARD16 rates
+└───
+
+A.2.1 Protocol Requests added with version 1.2
+
+┌───
+ RRGetScreenSizeRange
+ 1 CARD8 major opcode
+ 1 6 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 minWidth
+ 2 CARD16 minHeight
+ 2 CARD16 maxWidth
+ 2 CARD16 maxHeight
+ 16 unused
+└───
+┌───
+ RRSetScreenSize
+ 1 CARD8 major opcode
+ 1 7 RandR opcode
+ 2 5 length
+ 4 WINDOW window
+ 2 CARD16 width
+ 2 CARD16 height
+ 4 CARD32 width in millimeters
+ 4 CARD32 height in millimeters
+└───
+┌───
+ RRGetScreenResources
+ 1 CARD8 major opcode
+ 1 8 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 c+o+8m+(b+p)/4 reply length
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config-timestamp
+ 2 c number of CRTCs
+ 2 o number of outputs
+ 2 m number of modeinfos
+ 2 b total bytes in mode names
+ 8 unused
+ 4c LISTofCRTC crtcs
+ 4o LISTofOUTPUT outputs
+ 32m LISTofMODEINFO modeinfos
+ b STRING8 mode names
+ p unused, p=pad(b)
+└───
+┌───
+ RRGetOutputInfo
+ 1 CARD8 major opcode
+ 1 9 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ 4 TIMESTAMP config-timestamp
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 1+c+m+(n+p)/4 reply length
+ 4 TIMESTAMP timestamp
+ 4 CRTC current connected crtc
+ 4 CARD32 width in millimeters
+ 4 CARD32 height in millimeters
+ 1 CONNECTION connection
+ 1 SUBPIXELORDER subpixel-order
+ 2 c number of CRTCs
+ 2 m number of modes
+ 2 p number of preferred modes
+ 2 o number of clones
+ 2 n length of name
+ 4c LISTofCRTC crtcs
+ 4m LISTofMODE modes
+ n STRING8 name
+ p unused, p=pad(n)
+└───
+┌───
+ RRListOutputProperties
+ 1 CARD8 major opcode
+ 1 10 RandR opcode
+ 2 2 length
+ 4 OUTPUT output
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 2 n number of ATOMs in atoms
+ 22 unused
+ 4n LISTofATOM atoms
+└───
+┌───
+ RRQueryOutputProperty
+ 1 CARD8 major opcode
+ 1 11 RandR opcode
+ 2 3 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 1 BOOL pending
+ 1 BOOL range
+ 1 BOOL immutable
+ 21 unused
+ 4n LISTofINT32 valid values
+└───
+┌───
+ RRConfigureOutputProperty
+ 1 CARD8 major opcode
+ 1 12 RandR opcode
+ 2 4+n request length
+ 4 OUTPUT output
+ 4 ATOM property
+ 1 BOOL pending
+ 1 BOOL range
+ 2 unused
+ 4n LISTofINT32 valid values
+└───
+┌───
+ RRChangeOutputProperty
+ 1 CARD8 major opcode
+ 1 13 RandR opcode
+ 2 6+(n+p)/4 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ 4 ATOM type
+ 1 CARD8 format
+ 1 mode
+ 0 Replace
+ 1 Prepend
+ 2 Append
+ 2 unused
+ 4 CARD32 length of data in format units
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ n LISTofBYTE data
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+└───
+┌───
+ RRDeleteOutputProperty
+ 1 CARD8 major opcode
+ 1 14 RandR opcode
+ 2 3 request length
+ 4 OUTPUT output
+ 4 ATOM property
+└───
+┌───
+ RRGetOutputProperty
+ 1 CARD8 major opcode
+ 1 15 RandR opcode
+ 2 7 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ 4 ATOM type
+ 0 AnyPropertyType
+ 4 CARD32 long-offset
+ 4 CARD32 long-length
+ 1 BOOL delete
+ 1 BOOL pending
+ 2 unused
+ ▶
+ 1 1 Reply
+ 1 CARD8 format
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 4 ATOM type
+ 0 None
+ 4 CARD32 bytes-after
+ 4 CARD32 length of value in format units
+ (= 0 for format = 0)
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ 12 unused
+ n LISTofBYTE value
+ (n is zero for format = 0)
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+└───
+┌───
+ RRCreateMode
+ 1 CARD8 major opcode
+ 1 16 RandR opcode
+ 2 12+(n+p)/4 length
+ 4 WINDOW window
+ 32 MODEINFO mode
+ n STRING8 mode name
+ p unused, p=pad(n)
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 MODE mode
+ 20 unused
+└───
+┌───
+ RRDestroyMode
+ 1 CARD8 major opcode
+ 1 17 RandR opcode
+ 2 2 length
+ 4 MODE mode
+└───
+┌───
+ RRAddOutputMode
+ 1 CARD8 major opcode
+ 1 18 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ 4 MODE mode
+└───
+┌───
+ RRDeleteOutputMode
+ 1 CARD8 major opcode
+ 1 19 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ 4 MODE mode
+└───
+┌───
+ RRGetCrtcInfo
+ 1 CARD8 major opcode
+ 1 20 RandR opcode
+ 2 3 length
+ 4 CRTC crtc
+ 4 TIMESTAMP config-timestamp
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 o+p reply length
+ 4 TIMESTATMP timestamp
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 4 MODE mode
+ 2 ROTATION current rotation and reflection
+ 2 ROTATION set of possible rotations
+ 2 o number of outputs
+ 2 p number of possible outputs
+ 4o LISTofOUTPUT outputs
+ 4p LISTofOUTPUT possible outputs
+└───
+┌───
+ RRSetCrtcConfig
+ 1 CARD8 major opcode
+ 1 21 RandR opcode
+ 2 7+2n length
+ 4 CRTC crtc
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config timestamp
+ 2 INT16 x
+ 2 INT16 y
+ 4 MODE mode
+ 2 ROTATION rotation/reflection
+ 2 unused
+ 8n LISTofOUTPUT outputs
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 TIMESTAMP new timestamp
+ 20 unused
+└───
+┌───
+ RRGetCrtcGammaSize
+ 1 CARD8 major opcode
+ 1 22 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 size
+ 22 unused
+└───
+┌───
+ RRGetCrtcGamma
+ 1 CARD8 major opcode
+ 1 23 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (6n+2)/4 reply length
+ 2 n size
+ 20 unused
+ 2n LISTofCARD16 red
+ 2n LISTofCARD16 green
+ 2n LISTofCARD16 blue
+ p unused, p=pad(6n)
+└───
+┌───
+ RRSetCrtcGamma
+ 1 CARD8 major opcode
+ 1 24 RandR opcode
+ 2 3+(6n+2)/4 length
+ 4 CRTC crtc
+ 2 n size
+ 2 unused
+ 2n LISTofCARD16 red
+ 2n LISTofCARD16 green
+ 2n LISTofCARD16 blue
+ p unused, p=pad(6n)
+└───
+
+A.3 Protocol Events
+
+┌───
+ RRScreenChangeNotify
+ 1 Base + 0 code
+ 1 ROTATION new rotation and reflection
+ 2 CARD16 sequence number
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP configuration timestamp
+ 4 WINDOW root window
+ 4 WINDOW request window
+ 2 SIZEID size ID
+ 2 SUBPIXELORDER subpixel order defined in Render
+ 2 CARD16 width in pixels
+ 2 CARD16 height in pixels
+ 2 CARD16 width in millimeters
+ 2 CARD16 height in millimeters
+└───
+
+A.3.1 Protocol Events added with version 1.2
+
+┌───
+ RRCrtcChangeNotify
+ 1 Base + 1 code
+ 1 0 sub-code
+ 2 CARD16 sequence number
+ 4 TIMESTAMP timestamp
+ 4 WINDOW request window
+ 4 CRTC crtc affected
+ 4 MODE mode in use
+ 2 ROTATION new rotation and reflection
+ 2 unused
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+└───
+┌───
+ RROutputChangeNotify
+ 1 Base + 1 code
+ 1 1 sub-code
+ 2 CARD16 sequence number
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP configuration timestamp
+ 4 WINDOW request window
+ 4 OUTPUT output affected
+ 4 CRTC crtc in use
+ 4 MODE mode in use
+ 2 ROTATION rotation in use
+ 1 CONNECTION connection status
+ 1 SUBPIXELORDER subpixel order
+└───
+┌───
+ RROutputPropertyNotify
+ 1 Base + 1 code
+ 1 2 sub-code
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 4 OUTPUT output
+ 4 ATOM atom
+ 4 TIMESTAMP time
+ 1 state
+ 0 NewValue
+ 1 Deleted
+ 11 unused
+└───
+
+A.4 Protocol Errors
+
+┌───
+ ERRORS
+ Base + 0 Output
+ Base + 1 Crtc
+ Base + 2 Mode
+└───
+
+Bibliography
+
+[RANDR] Gettys, Jim and Keith Packard, "The X Resize and Rotate
+ Extension - RandR", Proceedings of the 2001 USENIX Annual
+ Technical Conference, Boston, MA
+
+[RENDER]
+ Packard, Keith, "The X Rendering Extension", work in progress,
+ documents found in xc/specs/Render.
diff --git a/X11/extensions/record.h b/X11/extensions/record.h
new file mode 100644
index 000000000..d88be99dc
--- /dev/null
+++ b/X11/extensions/record.h
@@ -0,0 +1,211 @@
+/*
+$Xorg: record.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $
+*/
+
+/***************************************************************************
+ * Copyright 1995 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ **************************************************************************/
+/* $XFree86$ */
+
+#ifndef _RECORD_H_
+#define _RECORD_H_
+
+#define XRecordBadContext 0 /* Not a valid RC */
+
+/*
+ * Constants for arguments of various requests
+ */
+#define XRecordFromServerTime 0x01
+#define XRecordFromClientTime 0x02
+#define XRecordFromClientSequence 0x04
+
+#define XRecordCurrentClients 1
+#define XRecordFutureClients 2
+#define XRecordAllClients 3
+
+#define XRecordFromServer 0
+#define XRecordFromClient 1
+#define XRecordClientStarted 2
+#define XRecordClientDied 3
+#define XRecordStartOfData 4
+#define XRecordEndOfData 5
+
+typedef unsigned long XRecordClientSpec;
+
+#ifndef _XRECORD_SERVER_
+
+typedef unsigned long XRecordContext;
+
+typedef struct
+{
+ unsigned char first;
+ unsigned char last;
+} XRecordRange8;
+
+typedef struct
+{
+ unsigned short first;
+ unsigned short last;
+} XRecordRange16;
+
+typedef struct
+{
+ XRecordRange8 ext_major;
+ XRecordRange16 ext_minor;
+} XRecordExtRange;
+
+typedef struct
+{
+ XRecordRange8 core_requests; /* core X requests */
+ XRecordRange8 core_replies; /* core X replies */
+ XRecordExtRange ext_requests; /* extension requests */
+ XRecordExtRange ext_replies; /* extension replies */
+ XRecordRange8 delivered_events; /* delivered core and ext events */
+ XRecordRange8 device_events; /* all core and ext device events */
+ XRecordRange8 errors; /* core X and ext errors */
+ Bool client_started; /* connection setup reply */
+ Bool client_died; /* notice of client disconnect */
+} XRecordRange;
+
+typedef struct
+{
+ XRecordClientSpec client;
+ unsigned long nranges;
+ XRecordRange **ranges;
+} XRecordClientInfo;
+
+typedef struct
+{
+ Bool enabled;
+ int datum_flags;
+ unsigned long nclients;
+ XRecordClientInfo **client_info;
+} XRecordState;
+
+typedef struct
+{
+ XID id_base;
+ Time server_time;
+ unsigned long client_seq;
+ int category;
+ Bool client_swapped;
+ unsigned char *data;
+ unsigned long data_len; /* in 4-byte units */
+} XRecordInterceptData;
+
+_XFUNCPROTOBEGIN
+
+/*********************************************************
+ *
+ * Prototypes
+ *
+ */
+
+XID XRecordIdBaseMask(
+ Display *dpy
+);
+
+extern Status XRecordQueryVersion(
+ Display* /* dpy */,
+ int* /* cmajor_return */,
+ int* /* cminor_return */
+);
+
+extern XRecordContext XRecordCreateContext(
+ Display* /* dpy */,
+ int /* datum_flags */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */,
+ XRecordRange** /* ranges */,
+ int /* nranges */
+);
+
+extern XRecordRange *XRecordAllocRange(
+ void
+);
+
+extern Status XRecordRegisterClients(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ int /* datum_flags */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */,
+ XRecordRange** /* ranges */,
+ int /* nranges */
+);
+
+extern Status XRecordUnregisterClients(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */
+);
+
+extern Status XRecordGetContext(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordState** /* state_return */
+);
+
+extern void XRecordFreeState(
+XRecordState* /* state */
+);
+
+typedef void (*XRecordInterceptProc) (
+ XPointer /* closure */,
+ XRecordInterceptData* /* recorded_data */
+);
+
+extern Status XRecordEnableContext(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordInterceptProc /* callback */,
+ XPointer /* closure */
+);
+
+extern Status XRecordEnableContextAsync(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordInterceptProc /* callback */,
+ XPointer /* closure */
+);
+
+extern void XRecordProcessReplies(
+ Display* /* dpy */
+);
+
+extern void XRecordFreeData(
+XRecordInterceptData* /* data */
+);
+
+extern Status XRecordDisableContext(
+ Display* /* dpy */,
+ XRecordContext /* context */
+);
+
+extern Status XRecordFreeContext(
+ Display* /* dpy */,
+ XRecordContext /* context */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XRECORD_SERVER_ */
+
+#endif /* _RECORD_H_ */
diff --git a/X11/extensions/recordproto.pc.in b/X11/extensions/recordproto.pc.in
new file mode 100644
index 000000000..77cd38fa4
--- /dev/null
+++ b/X11/extensions/recordproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: RecordProto
+Description: Record extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/recordstr.h b/X11/extensions/recordstr.h
new file mode 100644
index 000000000..246d34f1a
--- /dev/null
+++ b/X11/extensions/recordstr.h
@@ -0,0 +1,322 @@
+/*
+#ifndef lint
+$Xorg: recordstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $
+static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44";
+#endif
+*/
+
+/***************************************************************************
+ * Copyright 1995 Network Computing Devices
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ **************************************************************************/
+/* $XFree86$ */
+
+#ifndef _RECORDSTR_H_
+#define _RECORDSTR_H_
+
+#include <X11/extensions/record.h>
+
+#define RECORD_NAME "RECORD"
+#define RECORD_MAJOR_VERSION 1
+#define RECORD_MINOR_VERSION 13
+#define RECORD_LOWEST_MAJOR_VERSION 1
+#define RECORD_LOWEST_MINOR_VERSION 12
+/* only difference between 1.12 and 1.13 is byte order of device events,
+ which the library doesn't deal with. */
+
+/*********************************************************
+ *
+ * Protocol request constants
+ *
+ */
+#define X_RecordQueryVersion 0 /* First request from client */
+#define X_RecordCreateContext 1 /* Create client RC */
+#define X_RecordRegisterClients 2 /* Add to client RC */
+#define X_RecordUnregisterClients 3 /* Delete from client RC */
+#define X_RecordGetContext 4 /* Query client RC */
+#define X_RecordEnableContext 5 /* Enable interception and reporting */
+#define X_RecordDisableContext 6 /* Disable interception and reporting */
+#define X_RecordFreeContext 7 /* Free client RC */
+
+#define RecordNumErrors (XRecordBadContext + 1)
+#define RecordNumEvents 0L
+
+#define sz_XRecordRange 32
+#define sz_XRecordClientInfo 12
+#define sz_XRecordState 16
+#define sz_XRecordDatum 32
+
+
+#define XRecordGlobaldef
+#define XRecordGlobalref extern
+
+#define RecordMaxEvent (128L-1L)
+#define RecordMinDeviceEvent (2L)
+#define RecordMaxDeviceEvent (6L)
+#define RecordMaxError (256L-1L)
+#define RecordMaxCoreRequest (128L-1L)
+#define RecordMaxExtRequest (256L-1L)
+#define RecordMinExtRequest (129L-1L)
+
+#define RECORD_RC CARD32
+#define RECORD_XIDBASE CARD32
+#define RECORD_CLIENTSPEC CARD32
+#define RECORD_ELEMENT_HEADER CARD8
+
+typedef RECORD_CLIENTSPEC RecordClientSpec, *RecordClientSpecPtr;
+
+typedef struct
+{
+ CARD8 first;
+ CARD8 last;
+} RECORD_RANGE8;
+
+typedef struct
+{
+ CARD16 first B16;
+ CARD16 last B16;
+} RECORD_RANGE16;
+
+typedef struct
+{
+ RECORD_RANGE8 majorCode;
+ RECORD_RANGE16 minorCode;
+} RECORD_EXTRANGE;
+
+typedef struct
+{
+ RECORD_RANGE8 coreRequests;
+ RECORD_RANGE8 coreReplies;
+ RECORD_EXTRANGE extRequests;
+ RECORD_EXTRANGE extReplies;
+ RECORD_RANGE8 deliveredEvents;
+ RECORD_RANGE8 deviceEvents;
+ RECORD_RANGE8 errors;
+ BOOL clientStarted;
+ BOOL clientDied;
+} RECORDRANGE;
+#define sz_RECORDRANGE 24
+
+/* typedef RECORDRANGE xRecordRange, *xRecordRangePtr;
+#define sz_xRecordRange 24 */
+
+/* Cannot have structures within structures going over the wire */
+typedef struct
+{
+ CARD8 coreRequestsFirst;
+ CARD8 coreRequestsLast;
+ CARD8 coreRepliesFirst;
+ CARD8 coreRepliesLast;
+ CARD8 extRequestsMajorFirst;
+ CARD8 extRequestsMajorLast;
+ CARD16 extRequestsMinorFirst B16;
+ CARD16 extRequestsMinorLast B16;
+ CARD8 extRepliesMajorFirst;
+ CARD8 extRepliesMajorLast;
+ CARD16 extRepliesMinorFirst B16;
+ CARD16 extRepliesMinorLast B16;
+ CARD8 deliveredEventsFirst;
+ CARD8 deliveredEventsLast;
+ CARD8 deviceEventsFirst;
+ CARD8 deviceEventsLast;
+ CARD8 errorsFirst;
+ CARD8 errorsLast;
+ BOOL clientStarted;
+ BOOL clientDied;
+} xRecordRange;
+#define sz_xRecordRange 24
+
+typedef struct
+{
+ RECORD_CLIENTSPEC clientResource B32;
+ CARD32 nRanges B32;
+/* LISTofRECORDRANGE */
+} RECORD_CLIENT_INFO;
+
+typedef RECORD_CLIENT_INFO xRecordClientInfo;
+
+/*
+ * Initialize
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xRecordQueryVersionReq;
+#define sz_xRecordQueryVersionReq 8
+
+typedef struct
+{
+ CARD8 type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xRecordQueryVersionReply;
+#define sz_xRecordQueryVersionReply 32
+
+/*
+ * Create RC
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+ RECORD_ELEMENT_HEADER elementHeader;
+ CARD8 pad;
+ CARD16 pad0 B16;
+ CARD32 nClients B32;
+ CARD32 nRanges B32;
+/* LISTofRECORD_CLIENTSPEC */
+/* LISTofRECORDRANGE */
+} xRecordCreateContextReq;
+#define sz_xRecordCreateContextReq 20
+
+/*
+ * Add to RC
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+ RECORD_ELEMENT_HEADER elementHeader;
+ CARD8 pad;
+ CARD16 pad0 B16;
+ CARD32 nClients B32;
+ CARD32 nRanges B32;
+/* LISTofRECORD_CLIENTSPEC */
+/* LISTofRECORDRANGE */
+} xRecordRegisterClientsReq;
+#define sz_xRecordRegisterClientsReq 20
+
+/*
+ * Delete from RC
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+ CARD32 nClients B32;
+/* LISTofRECORD_CLIENTSPEC */
+} xRecordUnregisterClientsReq;
+#define sz_xRecordUnregisterClientsReq 12
+
+/*
+ * Query RC
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+} xRecordGetContextReq;
+#define sz_xRecordGetContextReq 8
+
+typedef struct
+{
+ CARD8 type;
+ BOOL enabled;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RECORD_ELEMENT_HEADER elementHeader;
+ CARD8 pad;
+ CARD16 pad0 B16;
+ CARD32 nClients B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+/* LISTofCLIENT_INFO */ /* intercepted-clients */
+} xRecordGetContextReply;
+#define sz_xRecordGetContextReply 32
+
+/*
+ * Enable data interception
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+} xRecordEnableContextReq;
+#define sz_xRecordEnableContextReq 8
+
+typedef struct
+{
+ CARD8 type;
+ CARD8 category;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RECORD_ELEMENT_HEADER elementHeader;
+ BOOL clientSwapped;
+ CARD16 pad1 B16;
+ RECORD_XIDBASE idBase B32;
+ CARD32 serverTime B32;
+ CARD32 recordedSequenceNumber B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ /* BYTE data; */
+} xRecordEnableContextReply;
+#define sz_xRecordEnableContextReply 32
+
+/*
+ * Disable data interception
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+} xRecordDisableContextReq;
+#define sz_xRecordDisableContextReq 8
+
+/*
+ * Free RC
+ */
+typedef struct
+{
+ CARD8 reqType;
+ CARD8 recordReqType;
+ CARD16 length B16;
+ RECORD_RC context B32;
+} xRecordFreeContextReq;
+#define sz_xRecordFreeContextReq 8
+
+#undef RECORD_RC
+#undef RECORD_XIDBASE
+#undef RECORD_ELEMENT_HEADER
+#undef RECORD_CLIENTSPEC
+
+#endif
diff --git a/X11/extensions/render.h b/X11/extensions/render.h
new file mode 100644
index 000000000..497af6d10
--- /dev/null
+++ b/X11/extensions/render.h
@@ -0,0 +1,189 @@
+/*
+ * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _RENDER_H_
+#define _RENDER_H_
+
+typedef XID Glyph;
+typedef XID GlyphSet;
+typedef XID Picture;
+typedef XID PictFormat;
+
+#define RENDER_NAME "RENDER"
+#define RENDER_MAJOR 0
+#define RENDER_MINOR 10
+
+#define X_RenderQueryVersion 0
+#define X_RenderQueryPictFormats 1
+#define X_RenderQueryPictIndexValues 2 /* 0.7 */
+#define X_RenderQueryDithers 3
+#define X_RenderCreatePicture 4
+#define X_RenderChangePicture 5
+#define X_RenderSetPictureClipRectangles 6
+#define X_RenderFreePicture 7
+#define X_RenderComposite 8
+#define X_RenderScale 9
+#define X_RenderTrapezoids 10
+#define X_RenderTriangles 11
+#define X_RenderTriStrip 12
+#define X_RenderTriFan 13
+#define X_RenderColorTrapezoids 14
+#define X_RenderColorTriangles 15
+/* #define X_RenderTransform 16 */
+#define X_RenderCreateGlyphSet 17
+#define X_RenderReferenceGlyphSet 18
+#define X_RenderFreeGlyphSet 19
+#define X_RenderAddGlyphs 20
+#define X_RenderAddGlyphsFromPicture 21
+#define X_RenderFreeGlyphs 22
+#define X_RenderCompositeGlyphs8 23
+#define X_RenderCompositeGlyphs16 24
+#define X_RenderCompositeGlyphs32 25
+#define X_RenderFillRectangles 26
+/* 0.5 */
+#define X_RenderCreateCursor 27
+/* 0.6 */
+#define X_RenderSetPictureTransform 28
+#define X_RenderQueryFilters 29
+#define X_RenderSetPictureFilter 30
+/* 0.8 */
+#define X_RenderCreateAnimCursor 31
+/* 0.9 */
+#define X_RenderAddTraps 32
+/* 0.10 */
+#define X_RenderCreateSolidFill 33
+#define X_RenderCreateLinearGradient 34
+#define X_RenderCreateRadialGradient 35
+#define X_RenderCreateConicalGradient 36
+#define RenderNumberRequests (X_RenderCreateConicalGradient+1)
+
+#define BadPictFormat 0
+#define BadPicture 1
+#define BadPictOp 2
+#define BadGlyphSet 3
+#define BadGlyph 4
+#define RenderNumberErrors (BadGlyph+1)
+
+#define PictTypeIndexed 0
+#define PictTypeDirect 1
+
+#define PictOpMinimum 0
+#define PictOpClear 0
+#define PictOpSrc 1
+#define PictOpDst 2
+#define PictOpOver 3
+#define PictOpOverReverse 4
+#define PictOpIn 5
+#define PictOpInReverse 6
+#define PictOpOut 7
+#define PictOpOutReverse 8
+#define PictOpAtop 9
+#define PictOpAtopReverse 10
+#define PictOpXor 11
+#define PictOpAdd 12
+#define PictOpSaturate 13
+#define PictOpMaximum 13
+
+/*
+ * Operators only available in version 0.2
+ */
+#define PictOpDisjointMinimum 0x10
+#define PictOpDisjointClear 0x10
+#define PictOpDisjointSrc 0x11
+#define PictOpDisjointDst 0x12
+#define PictOpDisjointOver 0x13
+#define PictOpDisjointOverReverse 0x14
+#define PictOpDisjointIn 0x15
+#define PictOpDisjointInReverse 0x16
+#define PictOpDisjointOut 0x17
+#define PictOpDisjointOutReverse 0x18
+#define PictOpDisjointAtop 0x19
+#define PictOpDisjointAtopReverse 0x1a
+#define PictOpDisjointXor 0x1b
+#define PictOpDisjointMaximum 0x1b
+
+#define PictOpConjointMinimum 0x20
+#define PictOpConjointClear 0x20
+#define PictOpConjointSrc 0x21
+#define PictOpConjointDst 0x22
+#define PictOpConjointOver 0x23
+#define PictOpConjointOverReverse 0x24
+#define PictOpConjointIn 0x25
+#define PictOpConjointInReverse 0x26
+#define PictOpConjointOut 0x27
+#define PictOpConjointOutReverse 0x28
+#define PictOpConjointAtop 0x29
+#define PictOpConjointAtopReverse 0x2a
+#define PictOpConjointXor 0x2b
+#define PictOpConjointMaximum 0x2b
+
+#define PolyEdgeSharp 0
+#define PolyEdgeSmooth 1
+
+#define PolyModePrecise 0
+#define PolyModeImprecise 1
+
+#define CPRepeat (1 << 0)
+#define CPAlphaMap (1 << 1)
+#define CPAlphaXOrigin (1 << 2)
+#define CPAlphaYOrigin (1 << 3)
+#define CPClipXOrigin (1 << 4)
+#define CPClipYOrigin (1 << 5)
+#define CPClipMask (1 << 6)
+#define CPGraphicsExposure (1 << 7)
+#define CPSubwindowMode (1 << 8)
+#define CPPolyEdge (1 << 9)
+#define CPPolyMode (1 << 10)
+#define CPDither (1 << 11)
+#define CPComponentAlpha (1 << 12)
+#define CPLastBit 12
+
+/* Filters included in 0.6 */
+#define FilterNearest "nearest"
+#define FilterBilinear "bilinear"
+/* Filters included in 0.10 */
+#define FilterConvolution "convolution"
+
+#define FilterFast "fast"
+#define FilterGood "good"
+#define FilterBest "best"
+
+#define FilterAliasNone -1
+
+/* Subpixel orders included in 0.6 */
+#define SubPixelUnknown 0
+#define SubPixelHorizontalRGB 1
+#define SubPixelHorizontalBGR 2
+#define SubPixelVerticalRGB 3
+#define SubPixelVerticalBGR 4
+#define SubPixelNone 5
+
+/* Extended repeat attributes included in 0.10 */
+#define RepeatNone 0
+#define RepeatNormal 1
+#define RepeatPad 2
+#define RepeatReflect 3
+
+#endif /* _RENDER_H_ */
diff --git a/X11/extensions/renderproto.h b/X11/extensions/renderproto.h
new file mode 100644
index 000000000..ffe06395d
--- /dev/null
+++ b/X11/extensions/renderproto.h
@@ -0,0 +1,663 @@
+/*
+ * $XFree86: xc/include/extensions/renderproto.h,v 1.12 2002/09/26 02:56:48 keithp Exp $
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _XRENDERP_H_
+#define _XRENDERP_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/render.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define Picture CARD32
+#define PictFormat CARD32
+#define Fixed INT32
+#define Glyphset CARD32
+
+/*
+ * data structures
+ */
+
+typedef struct {
+ CARD16 red B16;
+ CARD16 redMask B16;
+ CARD16 green B16;
+ CARD16 greenMask B16;
+ CARD16 blue B16;
+ CARD16 blueMask B16;
+ CARD16 alpha B16;
+ CARD16 alphaMask B16;
+} xDirectFormat;
+
+#define sz_xDirectFormat 16
+
+typedef struct {
+ PictFormat id B32;
+ CARD8 type;
+ CARD8 depth;
+ CARD16 pad1 B16;
+ xDirectFormat direct;
+ Colormap colormap;
+} xPictFormInfo;
+
+#define sz_xPictFormInfo 28
+
+typedef struct {
+ VisualID visual;
+ PictFormat format;
+} xPictVisual;
+
+#define sz_xPictVisual 8
+
+typedef struct {
+ CARD8 depth;
+ CARD8 pad1;
+ CARD16 nPictVisuals B16;
+ CARD32 pad2 B32;
+} xPictDepth;
+
+#define sz_xPictDepth 8
+
+typedef struct {
+ CARD32 nDepth B32;
+ PictFormat fallback B32;
+} xPictScreen;
+
+#define sz_xPictScreen 8
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16;
+ CARD16 green B16;
+ CARD16 blue B16;
+ CARD16 alpha B16;
+} xIndexValue;
+
+#define sz_xIndexValue 12
+
+typedef struct {
+ CARD16 red B16;
+ CARD16 green B16;
+ CARD16 blue B16;
+ CARD16 alpha B16;
+} xRenderColor;
+
+#define sz_xRenderColor 8
+
+typedef struct {
+ Fixed x B32;
+ Fixed y B32;
+} xPointFixed;
+
+#define sz_xPointFixed 8
+
+typedef struct {
+ xPointFixed p1;
+ xPointFixed p2;
+} xLineFixed;
+
+#define sz_xLineFixed 16
+
+typedef struct {
+ xPointFixed p1, p2, p3;
+} xTriangle;
+
+#define sz_xTriangle 24
+
+typedef struct {
+ Fixed top B32;
+ Fixed bottom B32;
+ xLineFixed left;
+ xLineFixed right;
+} xTrapezoid;
+
+#define sz_xTrapezoid 40
+
+typedef struct {
+ CARD16 width B16;
+ CARD16 height B16;
+ INT16 x B16;
+ INT16 y B16;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xGlyphInfo;
+
+#define sz_xGlyphInfo 12
+
+typedef struct {
+ CARD8 len;
+ CARD8 pad1;
+ CARD16 pad2;
+ INT16 deltax;
+ INT16 deltay;
+} xGlyphElt;
+
+#define sz_xGlyphElt 8
+
+typedef struct {
+ Fixed l, r, y;
+} xSpanFix;
+
+#define sz_xSpanFix 12
+
+typedef struct {
+ xSpanFix top, bot;
+} xTrap;
+
+#define sz_xTrap 24
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xRenderQueryVersionReq;
+
+#define sz_xRenderQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRenderQueryVersionReply;
+
+#define sz_xRenderQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+} xRenderQueryPictFormatsReq;
+
+#define sz_xRenderQueryPictFormatsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numFormats B32;
+ CARD32 numScreens B32;
+ CARD32 numDepths B32;
+ CARD32 numVisuals B32;
+ CARD32 numSubpixel B32; /* Version 0.6 */
+ CARD32 pad5 B32;
+} xRenderQueryPictFormatsReply;
+
+#define sz_xRenderQueryPictFormatsReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ PictFormat format B32;
+} xRenderQueryPictIndexValuesReq;
+
+#define sz_xRenderQueryPictIndexValuesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numIndexValues;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRenderQueryPictIndexValuesReply;
+
+#define sz_xRenderQueryPictIndexValuesReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture pid B32;
+ Drawable drawable B32;
+ PictFormat format B32;
+ CARD32 mask B32;
+} xRenderCreatePictureReq;
+
+#define sz_xRenderCreatePictureReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ CARD32 mask B32;
+} xRenderChangePictureReq;
+
+#define sz_xRenderChangePictureReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ INT16 xOrigin B16;
+ INT16 yOrigin B16;
+} xRenderSetPictureClipRectanglesReq;
+
+#define sz_xRenderSetPictureClipRectanglesReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture B32;
+} xRenderFreePictureReq;
+
+#define sz_xRenderFreePictureReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture mask B32;
+ Picture dst B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+ INT16 xMask B16;
+ INT16 yMask B16;
+ INT16 xDst B16;
+ INT16 yDst B16;
+ CARD16 width B16;
+ CARD16 height B16;
+} xRenderCompositeReq;
+
+#define sz_xRenderCompositeReq 36
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture src B32;
+ Picture dst B32;
+ CARD32 colorScale B32;
+ CARD32 alphaScale B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+ INT16 xDst B16;
+ INT16 yDst B16;
+ CARD16 width B16;
+ CARD16 height B16;
+} xRenderScaleReq;
+
+#define sz_xRenderScaleReq 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture dst B32;
+ PictFormat maskFormat B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+} xRenderTrapezoidsReq;
+
+#define sz_xRenderTrapezoidsReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture dst B32;
+ PictFormat maskFormat B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+} xRenderTrianglesReq;
+
+#define sz_xRenderTrianglesReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture dst B32;
+ PictFormat maskFormat B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+} xRenderTriStripReq;
+
+#define sz_xRenderTriStripReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture dst B32;
+ PictFormat maskFormat B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+} xRenderTriFanReq;
+
+#define sz_xRenderTriFanReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Glyphset gsid B32;
+ PictFormat format B32;
+} xRenderCreateGlyphSetReq;
+
+#define sz_xRenderCreateGlyphSetReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Glyphset gsid B32;
+ Glyphset existing B32;
+} xRenderReferenceGlyphSetReq;
+
+#define sz_xRenderReferenceGlyphSetReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Glyphset glyphset B32;
+} xRenderFreeGlyphSetReq;
+
+#define sz_xRenderFreeGlyphSetReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Glyphset glyphset B32;
+ CARD32 nglyphs;
+} xRenderAddGlyphsReq;
+
+#define sz_xRenderAddGlyphsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Glyphset glyphset B32;
+} xRenderFreeGlyphsReq;
+
+#define sz_xRenderFreeGlyphsReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture src B32;
+ Picture dst B32;
+ PictFormat maskFormat B32;
+ Glyphset glyphset B32;
+ INT16 xSrc B16;
+ INT16 ySrc B16;
+} xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req,
+xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req;
+
+#define sz_xRenderCompositeGlyphs8Req 28
+#define sz_xRenderCompositeGlyphs16Req 28
+#define sz_xRenderCompositeGlyphs32Req 28
+
+/* 0.1 and higher */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ CARD8 op;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ Picture dst B32;
+ xRenderColor color;
+} xRenderFillRectanglesReq;
+
+#define sz_xRenderFillRectanglesReq 20
+
+/* 0.5 and higher */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Cursor cid B32;
+ Picture src B32;
+ CARD16 x B16;
+ CARD16 y B16;
+} xRenderCreateCursorReq;
+
+#define sz_xRenderCreateCursorReq 16
+
+/* 0.6 and higher */
+
+/*
+ * This can't use an array because 32-bit values may be in bitfields
+ */
+typedef struct {
+ Fixed matrix11 B32;
+ Fixed matrix12 B32;
+ Fixed matrix13 B32;
+ Fixed matrix21 B32;
+ Fixed matrix22 B32;
+ Fixed matrix23 B32;
+ Fixed matrix31 B32;
+ Fixed matrix32 B32;
+ Fixed matrix33 B32;
+} xRenderTransform;
+
+#define sz_xRenderTransform 36
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ xRenderTransform transform;
+} xRenderSetPictureTransformReq;
+
+#define sz_xRenderSetPictureTransformReq 44
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+} xRenderQueryFiltersReq;
+
+#define sz_xRenderQueryFiltersReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numAliases B32; /* LISTofCARD16 */
+ CARD32 numFilters B32; /* LISTofSTRING8 */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRenderQueryFiltersReply;
+
+#define sz_xRenderQueryFiltersReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ CARD16 nbytes B16; /* number of bytes in name */
+ CARD16 pad B16;
+} xRenderSetPictureFilterReq;
+
+#define sz_xRenderSetPictureFilterReq 12
+
+/* 0.8 and higher */
+
+typedef struct {
+ Cursor cursor B32;
+ CARD32 delay B32;
+} xAnimCursorElt;
+
+#define sz_xAnimCursorElt 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Cursor cid B32;
+} xRenderCreateAnimCursorReq;
+
+#define sz_xRenderCreateAnimCursorReq 8
+
+/* 0.9 and higher */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture picture;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xRenderAddTrapsReq;
+
+#define sz_xRenderAddTrapsReq 12
+
+/* 0.10 and higher */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture pid B32;
+ xRenderColor color;
+} xRenderCreateSolidFillReq;
+
+#define sz_xRenderCreateSolidFillReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture pid B32;
+ xPointFixed p1;
+ xPointFixed p2;
+ CARD32 nStops;
+} xRenderCreateLinearGradientReq;
+
+#define sz_xRenderCreateLinearGradientReq 28
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture pid B32;
+ xPointFixed inner;
+ xPointFixed outer;
+ Fixed inner_radius;
+ Fixed outer_radius;
+ CARD32 nStops;
+} xRenderCreateRadialGradientReq;
+
+#define sz_xRenderCreateRadialGradientReq 36
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 renderReqType;
+ CARD16 length B16;
+ Picture pid B32;
+ xPointFixed center;
+ Fixed angle; /* in degrees */
+ CARD32 nStops;
+} xRenderCreateConicalGradientReq;
+
+#define sz_xRenderCreateConicalGradientReq 24
+
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#undef Picture
+#undef PictFormat
+#undef Fixed
+#undef Glyphset
+
+#endif /* _XRENDERP_H_ */
diff --git a/X11/extensions/renderproto.pc.in b/X11/extensions/renderproto.pc.in
new file mode 100644
index 000000000..17331e93e
--- /dev/null
+++ b/X11/extensions/renderproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: RenderProto
+Description: Render extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/renderproto.txt b/X11/extensions/renderproto.txt
new file mode 100644
index 000000000..af158b500
--- /dev/null
+++ b/X11/extensions/renderproto.txt
@@ -0,0 +1,1253 @@
+ The X Rendering Extension
+ Version 0.10
+ 2005-07-01
+ Keith Packard
+ keithp@keithp.com
+
+1. Introduction
+
+The X Rendering Extension (Render) introduces digital image composition as
+the foundation of a new rendering model within the X Window System.
+Rendering geometric figures is accomplished by client-side tessellation into
+either triangles or trapezoids. Text is drawn by loading glyphs into the
+server and rendering sets of them.
+
+2. Acknowledgments
+
+This extension was the work of many people, in particular:
+
+ + Thomas Porter and Tom Duff for their formal description
+ of image compositing.
+
+ + Rob Pike and Russ Cox who designed the Plan 9 window system from
+ which the compositing model was lifted.
+
+ + Juliusz Chroboczek and Raph Levien whose proposal for client-side
+ glyph management eliminated font handling from the X server.
+
+ + Jon Leech, Brad Grantham and Allen Akin for patiently explaining
+ how OpenGL works.
+
+ + Carl Worth for providing the sample implementation of
+ trapezoid rendering and showing how broken the spec was
+
+ + Sam Pottle and Jamey Sharp for helping demonstrate the correctness
+ of the trapezoid specification.
+
+ + Owen Taylor for helping specify projective transformations
+
+3. Rendering Model
+
+Render provides a single rendering operation which can be used in a variety of
+ways to generate images:
+
+ dest = (source IN mask) OP dest
+
+Where 'IN' is the Porter/Duff operator of that name and 'OP' is any of the
+list of compositing operators described below, among which can be found all
+of the Porter/Duff binary operators.
+
+To use this operator several additional values are required:
+
+ + The destination rectangle. This is a subset of the destination
+ within which the rendering is performed.
+
+ + The source location. This identifies the coordinate in the
+ source aligned with the upper left corner of the
+ destination rectangle.
+
+ + The mask location. This identifies the coordinate in the
+ mask aligned with the upper left corner of the
+ destination rectangle.
+
+ + A clip list. This limits the rendering to the intersection of the
+ destination rectangle with this clip list.
+
+ + The OP to use
+
+ + Whether the source should be repeated to cover the destination
+ rectangle, extended with a constant pixel value or extended by
+ using the nearest available source pixel.
+
+ + Whether the mask should be repeated to cover the destination
+ rectangle, extended with a constant pixel value or extended by
+ using the nearest available mask pixel.
+
+ + Whether the mask has a single alpha value for all four channels or
+ whether each mask channel should affect the associated source/dest
+ channels.
+
+ + Whether the source should be reshaped with a projective
+ transformation, and if so, what filter to apply while
+ resampling the data.
+
+ + Whether the mask should be reshaped with a projective
+ transformation, and if so, what filter to apply while
+ resampling the data.
+
+These parameters are variously attached to the operands or included in each
+rendering request.
+
+4. Data types
+
+The core protocol rendering system uses a pixel model and applies color only
+in the final generation of the video signal. A compositing model operates
+on colors, not pixel values so a new datatype is needed to interpret data as
+color instead of just bits.
+
+The "PictFormat" object holds information needed to translate pixel values
+into red, green, blue and alpha channels. The server has a list of picture
+formats corresponding to the various visuals on the screen. There are two
+classes of formats, Indexed and Direct. Indexed PictFormats hold a list of
+pixel values and RGBA values while Direct PictFormats hold bit masks for each
+of R, G, B and A.
+
+The "Picture" object contains a Drawable, a PictFormat and some
+rendering state. More than one Picture can refer to the same Drawable.
+
+5. Errors
+
+Errors are sent using core X error reports.
+
+PictFormat
+ A value for a PICTFORMAT argument does not name a defined PICTFORMAT.
+
+Picture
+ A value for a PICTURE argument does not name a defined PICTURE.
+
+PictOp
+ A value for a PICTOP argument does not name a defined PICTOP.
+
+GlyphSet
+ A value for a GLYPHSET argument does not name a defined GLYPHSET.
+
+Glyph
+ A value for a GLYPH argument does not name a defined GLYPH in the
+ glyphset.
+
+6. Protocol Types
+
+PICTURE 32-bit value (top three bits guaranteed to be zero)
+PICTFORMAT 32-bit value (top three bits guaranteed to be zero)
+PICTTYPE { Indexed, Direct }
+PICTOP { Clear, Src, Dst, Over, OverReverse, In, InReverse,
+ Out, OutReverse, Atop, AtopReverse, Xor, Add, Saturate,
+ DisjointClear, DisjointSrc, DisjointDst, DisjointOver,
+ DisjointOverReverse, DisjointIn, DisjointInReverse,
+ DisjointOut, DisjointOutReverse, DisjointAtop,
+ DisjointAtopReverse, DisjointXor,
+ ConjointClear, ConjointSrc, ConjointDst, ConjointOver,
+ ConjointOverReverse, ConjointIn, ConjointInReverse,
+ ConjointOut, ConjointOutReverse, ConjointAtop,
+ ConjointAtopReverse, ConjointXor }
+SUBPIXEL { Unknown, HorizontalRGB, HorizontalBGR,
+ VerticalRGB, VerticalBGR, None
+ }
+COLOR [
+ red, green, blue, alpha: CARD16
+ ]
+CHANNELMASK [
+ shift, mask: CARD16
+ ]
+DIRECTFORMAT [
+ red, green, blue, alpha: CHANNELMASK
+ ]
+INDEXVALUE [
+ pixel: Pixel;
+ red, green, blue, alpha: CARD16
+ ]
+PICTFORMINFO [
+ id: PICTFORMAT
+ type: PICTTYPE
+ depth: CARD8
+ direct: DIRECTFORMAT
+ colormap: COLORMAP or None
+ ]
+
+PICTVISUAL [
+ visual: VISUALID or None
+ format: PICTFORMAT
+ ]
+
+PICTDEPTH [
+ depth: CARD8
+ visuals: LISTofPICTVISUAL
+ ]
+
+PICTSCREEN LISTofPICTDEPTH
+
+FIXED 32-bit value (top 16 are integer portion, bottom 16 are fraction)
+TRANSFORM [
+ p11, p12, p13: FIXED
+ p21, p22, p23: FIXED
+ p31, p32, p33: FIXED
+ ]
+POINTFIX [
+ x, y: FIXED
+ ]
+POLYEDGE { Sharp, Smooth }
+POLYMODE { Precise, Imprecise }
+REPEAT { None, Regular, Pad, Reflect }
+COLORPOINT [
+ point: POINTFIX
+ color: COLOR
+ ]
+SPANFIX [
+ left, right, y: FIXED
+ ]
+COLORSPANFIX [
+ left, right, y: FIXED
+ left_color: COLOR
+ right_color: COLOR
+QUAD [
+ p1, p2, p3, p4: POINTFIX
+ ]
+TRIANGLE [
+ p1, p2, p3: POINTFIX
+ ]
+LINEFIX [
+ p1, p2: POINTFIX
+ ]
+TRAP [
+ top, bottom: SPANFIX
+ ]
+TRAPEZOID [
+ top, bottom: FIXED
+ left, right: LINEFIX
+ ]
+(TRAPEZOID is deprecated)
+COLORTRIANGLE [
+ p1, p2, p3: COLORPOINT
+ ]
+COLORTRAP [
+ top, bottom: COLORSPANFIX
+ ]
+GLYPHSET 32-bit value (top three bits guaranteed to be zero)
+GLYPH 32-bit value
+GLYPHINFO [
+ width, height: CARD16
+ x, y: INT16
+ off-x, off-y: INT16
+ ]
+PICTGLYPH [
+ info: GLYPHINFO
+ x, y: INT16
+ ]
+GLYPHABLE GLYPHSET or FONTABLE
+GLYPHELT8 [
+ dx, dy: INT16
+ glyphs: LISTofCARD8
+ ]
+GLYPHITEM8 GLYPHELT8 or GLYPHABLE
+GLYPHELT16 [
+ dx, dy: INT16
+ glyphs: LISTofCARD16
+ ]
+GLYPHITEM16 GLYPHELT16 or GLYPHABLE
+GLYPHELT32 [
+ dx, dy: INT16
+ glyphs: LISTofCARD32
+ ]
+GLYPHITEM32 GLYPHELT32 or GLYPHABLE
+
+ANIMCURSORELT [
+ cursor: CURSOR
+ delay: CARD32
+ ]
+7. Standard PictFormats
+
+The server must support a Direct PictFormat with 8 bits each of red, green,
+blue and alpha as well as a Direct PictFormat with 8 bits of red, green and
+blue and 0 bits of alpha. The server must also support Direct PictFormats
+with 1, 4 and 8 bits of alpha and 0 bits of r, g and b.
+
+Pixel component values lie in the close range [0,1]. These values are
+encoded in a varying number of bits. Values are encoded in a straight
+forward manner. For a component encoded in m bits, a binary encoding b
+is equal to a component value of b/(2^m-1).
+
+A Direct PictFormat with zero bits of alpha component is declared to have
+alpha == 1 everywhere. A Direct PictFormat with zero bits of red, green and
+blue is declared to have red, green, blue == 0 everywhere. If any of red,
+green or blue components are of zero size, all are of zero size. Direct
+PictFormats never have colormaps and are therefore screen independent.
+
+Indexed PictFormats never have alpha channels and the direct component is all
+zeros. Indexed PictFormats always have a colormap in which the specified
+colors are allocated read-only and are therefore screen dependent. Drawing
+to in Indexed Picture uses only pixel values listed by QueryPictIndexValues.
+Reading from an Indexed Picture uses red, green and blue values from the
+colormap and alpha values from those listed by QueryPictIndexValues. Pixel
+values not present in QueryPictIndexValues are given alpha values of 1.
+
+8. Compositing Operators
+
+For each pixel, the four channels of the image are computed with:
+
+ C = Ca * Fa + Cb * Fb
+
+where C, Ca, Cb are the values of the respective channels and Fa and Fb
+come from the following table:
+
+ PictOp Fa Fb
+ --------------------------------------------------
+ Clear 0 0
+ Src 1 0
+ Dst 0 1
+ Over 1 1-Aa
+ OverReverse 1-Ab 1
+ In Ab 0
+ InReverse 0 Aa
+ Out 1-Ab 0
+ OutReverse 0 1-Aa
+ Atop Ab 1-Aa
+ AtopReverse 1-Ab Aa
+ Xor 1-Ab 1-Aa
+ Add 1 1
+ Saturate min(1,(1-Ab)/Aa) 1
+ DisjointClear 0 0
+ DisjointSrc 1 0
+ DisjointDst 0 1
+ DisjointOver 1 min(1,(1-Aa)/Ab)
+ DisjointOverReverse min(1,(1-Ab)/Aa) 1
+ DisjointIn max(1-(1-Ab)/Aa,0) 0
+ DisjointInReverse 0 max(1-(1-Aa)/Ab,0)
+ DisjointOut min(1,(1-Ab)/Aa) 0
+ DisjointOutReverse 0 min(1,(1-Aa)/Ab)
+ DisjointAtop max(1-(1-Ab)/Aa,0) min(1,(1-Aa)/Ab)
+ DisjointAtopReverse min(1,(1-Ab)/Aa) max(1-(1-Aa)/Ab,0)
+ DisjointXor min(1,(1-Ab)/Aa) min(1,(1-Aa)/Ab)
+ ConjointClear 0 0
+ ConjointSrc 1 0
+ ConjointDst 0 1
+ ConjointOver 1 max(1-Aa/Ab,0)
+ ConjointOverReverse max(1-Ab/Aa,0) 1
+ ConjointIn min(1,Ab/Aa) 0
+ ConjointInReverse 0 min(Aa/Ab,1)
+ ConjointOut max(1-Ab/Aa,0) 0
+ ConjointOutReverse 0 max(1-Aa/Ab,0)
+ ConjointAtop min(1,Ab/Aa) max(1-Aa/Ab,0)
+ ConjointAtopReverse max(1-Ab/Aa,0) min(1,Aa/Ab)
+ ConjointXor max(1-Ab/Aa,0) max(1-Aa/Ab,0)
+
+Saturate and DisjointOverReverse are the same. They match OpenGL
+compositing with FUNC_ADD, SRC_ALPHA_SATURATE, ONE, except that Render uses
+premultiplied alpha while Open GL uses non-premultiplied alpha.
+
+The result of any compositing operator is always limited to the range
+[0,1] for each component. Components whose value would be greater than 1
+are set to 1.
+
+For operations involving division, when the divisor is zero, define the
+quotient to be positive infinity. The result is always well defined
+because the division is surrounded with a max or min operator which will
+give a finite result.
+
+When the mask contains separate alpha values for each channel, the
+alpha value resulting from the combination of that value with the source
+alpha channel is used in the final image composition.
+
+9. Source and Mask Transformations
+
+When fetching pixels from the source or mask pictures, Render provides three
+options for pixel values which fall outside the drawable (this includes
+pixels within a window geometry obscured by other windows).
+
+ + Transparent. Missing values are replaced with transparent.
+
+ + Nearest. Replace missing pixels with the nearest available
+ pixel. Where multiple pixels are equidistant, select
+ those with smallest Y and then smallest X coordinates
+
+ + Tile. Select the pixel which would appear were the
+ drawable tiled to enclose the missing coordinate. If
+ the tiling doesn't cover the coordinate, use the
+ selected Constant or Nearest mode.
+
+When GraphicsExposures are selected in the destination picture, a region
+containing at least the union of all destination pixel values affected by
+data replaced as above is delivered after each compositing operation. If
+the resulting region is empty, a NoExpose event is delivered instead.
+
+To construct the source and mask operands, the computed pixels values are
+transformed through a homogeneous matrix, filtered and then used in the
+fundamental rendering operator described above. Each screen provides a list
+of supported filter names. There are a few required filters, and several
+required filter alias which must map to one of the available filters.
+
+10. Polygon Rasterization
+
+Render provides only two kinds of polygons, trapezoids and triangles. To
+improve efficiency, several different wire encodings exist for each.
+
+All trapezoids must be convex. Rendering of concave trapezoids is unspecified
+except that the result must obey the clipping rules.
+
+Composite
+Polygons are rasterized by implicit generating an alpha mask and using that
+in the general compositing operator along with a supplied source image:
+
+ tmp = Rasterize (polygon)
+ Composite (op, dst, src, tmp)
+
+When rasterized with Sharp edges, the mask is computed with a depth of 1 so
+that all of the mask values are either 0 or 1.
+
+When rasterized with Smooth edges, the mask is generated by creating a square
+around each pixel coordinate and computing the amount of that square covered
+by the polygon. This ignores sampling theory but it provides a precise
+definition which is close to the right answer. This value is truncated to
+the alpha width in the fallback format before application of the compositing
+operator.
+
+Rasterization
+Alpha values are generated by point sampling the coverage of a square
+surrounding the center of each pixel by the polygon.
+
+In Precise poly mode, the sample points are located in a regular grid. When
+alpha depth 'e' is even, the regular grid is 2**(e/2) + 1 samples wide and
+2**(e/2) -1 samples high. For odd alpha depth 'o', the sample grid is 2**o
+- 1 samples wide and 1 sample high. Note that odd alpha depth usually
+occurs only at depth 1, so this misshapen sample grid has no ill effects.
+The sample grid is centered within the pixel and then each sample point is
+rounded down to a point on the sub-pixel coordinate grid.
+
+In Imprecise mode, the location of the sample points is not specified, but
+the implementation must conform to the following constraints:
+
+ + Abutting edges must match precisely. When specifying two polygons
+ abutting along a common edge, if that edge is specified with the
+ same coordinates in each polygon then the sum of alpha values for
+ pixels inside the union of the two polygons must be precisely one.
+
+ + Translationally invariant. The pixelization of the polygon must
+ be the same when either the polygon or the target drawable
+ are translated by any whole number of pixels in any direction.
+
+ + Sharp edges are honored. When the polygon is rasterized with Sharp
+ edges, the implicit alpha mask will contain only 1 or 0 for
+ each pixel.
+
+ + Order independent. Two identical polygons specified with vertices
+ in different orders must generate identical results.
+
+11. Image Filtering
+
+When computing pixels from source and mask images, a filter may be applied
+to the data. This is usually used with a non-identity transformation
+matrix, but filtering may be applied with an identity transformation.
+
+Each filter is given a unique name encoded as an ISO Latin-1 string.
+Filters may be configured with a list of fixed point values; the number of
+parameters and their interpretation is currently left to conventions passed
+outside of the protocol. A set of standard filters are required to be
+provided:
+
+ Filter Name Description
+
+ nearest Nearest neighbor filtering
+ bilinear Linear interpolation in two dimensions
+
+Additional names may be provided for any filter as aliases. A set of
+standard alias names are required to be mapped to a provided filter so that
+applications can use the alias names without checking for availability.
+
+ Alias name Intended interpretation
+
+ fast High performance, quality similar to Nearest
+ good Reasonable performance, quality similar to Bilinear
+ best Highest quality available, performance may not
+ be suitable for interactive use
+
+Aliases must map directly to a non-aliased filter name.
+
+There is also a set of standard filters which are not required but may be
+provided. If they are provided, using the standard name, they must match
+the definition specified here.
+
+ Filter Name Description
+
+ convolution MxN convolution filter. The values specified
+ in SetPictureFilter are M, N and then M * N
+ filter parameters. M and N must be integers
+ represented as fixed point numbers.
+ gaussian Gaussian blur. The value specified is a radius
+ in pixels (which can be fractional). A standard
+ Gaussian 2D convolution filter will be applied.
+ binomial Binomial blur. An approximation of a Gaussian
+ blur using binomial coefficients
+
+12. Glyph Rendering
+
+Glyphs are small alpha masks which can be stored in the X server and
+rendered by referring to them by name. A set of glyphs can be rendered in a
+single request. Glyphs are positioned by subtracting the x, y elements of
+the GLYPHINFO from the requested rendering position. The next glyph
+rendering position is set to the current rendering position plus the off-x
+and off-y elements.
+
+Glyphs are stored in GlyphSets and are named within the GlyphSet with
+client-specified 32-bit numbers.
+
+Glyphs can be stored in any PictFormat supported by the server. All glyphs
+in a GlyphSet are stored in the same format.
+
+13. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Behavior of the server is undefined otherwise.
+
+QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the clients responsibility to ensure that the server supports
+ a version which is compatible with its expectations.
+
+QueryPictFormats
+
+ ->
+
+ fallback: PICTFORMAT
+ formats: LISTofPICTFORMINFO
+ screens: LISTofPICTSCREEN
+ subpixels: LISTofSUBPIXEL
+
+ Errors:
+ <none>
+
+ The server responds with a list of supported PictFormats and
+ a list of which PictFormat goes with each visual on each screen.
+ Every PictFormat must match a supported depth, but not every
+ PictFormat need have a matching visual.
+
+ The fallback format is used as an intermediate representation
+ in cases where there is no ideal choice.
+
+ The relationship between the red, green and blue elements making
+ up each pixel indexed by screen is returned in subpixels.
+ This list is not present in servers advertising protocol
+ versions earlier than 0.6. This list may be shorter than
+ the number of screens, in which case the remaining screens
+ are given sub pixel order Unknown.
+
+QueryPictIndexValues
+
+ format: PICTFORMAT
+
+ ->
+
+ values: LISTofINDEXVALUE
+
+ Errors:
+ PictFormat, Match
+
+ Returns the mapping from pixel values to RGBA values for the
+ specified Indexed PictFormat. If 'format' does not refer to
+ an Indexed PictFormat a Match error is generated.
+
+QueryFilters
+
+ drawable: DRAWABLE
+
+ ->
+
+ filters: LISTofSTRING8
+ aliases: LISTofCARD16
+
+
+14. Extension Requests
+
+CreatePicture
+
+ pid: PICTURE
+ drawable: DRAWABLE
+ format: PICTFORMAT
+ value-mask: BITMASK
+ value-list: LISTofVALUE
+
+ Errors:
+ Alloc, Drawable, IDChoice, Match, Pixmap, Picture,
+ PictFormat, Value
+
+ This request creates a Picture object associated with the specified
+ drawable and assigns the identifier pid to it. Pixel data in the
+ image are interpreted according to 'format'. It is a Match error
+ to specify a format with a different depth than the drawable. If
+ the drawable is a Window then the Red, Green and Blue masks must
+ match those in the visual for the window else a Match error is
+ generated.
+
+ The value-mask and value-list specify attributes of the picture that
+ are to be explicitly initialized. The possible values are:
+
+ repeat: REPEAT
+ alpha-map: PICTURE or None
+ alpha-x-origin: INT16
+ alpha-y-origin: INT16
+ clip-x-origin: INT16
+ clip-y-origin: INT16
+ clip-mask: PIXMAP or None
+ graphics-exposures: BOOL
+ subwindow-mode: { ClipByChildren, IncludeInferiors }
+ poly-edge: POLYEDGE
+ poly-mode: POLYMODE
+ dither: ATOM or None
+ component-alpha: BOOL
+
+ When used as a source or mask operand, the repeat and fill-constant
+ values control how pixels outside the geometry of the drawable are
+ computed.
+
+ Repeat indicates how the drawable contents should be extented
+ in both directions.
+
+ The alpha channel of alpha-map is used in place of any alpha channel
+ contained within the drawable for all rendering operations. The
+ alpha-mask origin is interpreted relative to the origin of drawable.
+ Rendering is additionally clipped by the geometry of alpha-map.
+ Exposures to the window do not affect the contents of alpha-map.
+ Alpha-map must refer to a picture containing a Pixmap, not a Window
+ (or a Match error results).
+
+ The clip-mask restricts reads and writes to drawable. Only pixels
+ where the clip-mask has bits set to 1 are read or written. Pixels
+ are not accessed outside the area covered by the clip-mask or where
+ the clip-mask has bits set to 0. The clip-mask affects all graphics
+ requests, including sources. The clip-mask origin is interpreted
+ relative to the origin of drawable. If a pixmap is specified as the
+ clip-mask, it must have depth 1 and have the same root as the
+ drawable (or a Match error results). If clip-mask is None, then
+ pixels are always drawn, regardless of the clip origin. The
+ clip-mask can also be set with the SetPictureClipRectangles request.
+
+ For ClipByChildren, both source and destination windows are
+ additionally clipped by all viewable InputOutput children. For
+ IncludeInferiors , neither source nor destination window is clipped
+ by inferiors. This will result in including subwindow contents in
+ the source and drawing through subwindow boundaries of the
+ destination. The use of IncludeInferiors with a source or
+ destination window of one depth with mapped inferiors of differing
+ depth is not illegal, but the semantics are undefined by this
+ extension.
+
+ The graphics-exposures flag controls GraphicsExposure event
+ generation for Composite requests (and any similar requests
+ defined by additional extensions).
+
+ Poly-edge and poly-mode control the rasterization of polygons
+ as described above.
+
+ Dither selects which of the available dither patterns should
+ be used. If dither is None, no dithering will be done.
+
+ Component-alpha indicates whether each image component is
+ intended as a separate alpha value when the picture is used
+ as a mask operand.
+
+ The default component values are
+
+ Component Default
+ -------------------------------
+ repeat False
+ fill-nearest: False
+ clip-x-origin 0
+ clip-y-origin 0
+ clip-mask None
+ graphics-exposures True
+ subwindow-mode ClipByChildren
+ poly-edge Smooth
+ poly-mode Precise
+ dither None
+ component-alpha False
+
+ChangePicture
+
+ pid: PICTURE
+ value-mask: BITMASK
+ value-list: LISTofVALUE
+
+ Errors:
+ Picture, Alloc, Pixmap, PictOp, Value
+
+ The value-mask and value-list specify which attributes are to be
+ changed. The values and restrictions are the same as for
+ CreatePicture.
+
+SetPictureClipRectangles
+
+ picture: PICTURE
+ clip-x-origin: INT16
+ clip-y-origin: INT16
+ rectangles: LISTofRECTANGLE
+
+ Errors:
+ Alloc, Picture
+
+ This request changes clip-mask in picture to the specified list of
+ rectangles and sets the clip origin. Input and output will be
+ clipped to remain contained within the rectangles. The clip origin
+ is interpreted relative to the origin of the drawable associated
+ with picture. The rectangle coordinates are interpreted relative to
+ the clip origin. Note that the list of rectangles can be empty,
+ which effectively disables output. This is the opposite of passing
+ None as the clip-mask in CreatePicture and ChangePicture.
+
+ Note that output is clipped to the union of all of the rectangles
+ and that no particular ordering among the rectangles is required.
+
+SetPictureTransform
+
+ picture: PICTURE
+ transform: TRANSFORM
+
+ Errors:
+ Alloc, Value, Picture
+
+ This request changes the projective transformation used to
+ map coordinates when 'picture' is used as the source or
+ mask in any compositing operation. The transform
+ maps from destination pixel geometry back to the source pixel
+ geometry.
+
+ The matrix must be invertable, else a Value error is generated.
+
+SetPictureFilter
+
+ picture: PICTURE
+ filter: STRING8
+ values: LISTofFIXED
+
+ Errors:
+ Value, Match, Picture
+
+ This request sets the current filter used when picture is a source
+ or mask operand. Filter must be one of the filters supported
+ for the screen associated with picture, else a Match error
+ is generated. If the filter accepts additional parameters,
+ they can be provided in values, incorrect values generate Value
+ errors, too many values generate Match errors. Too few values
+ cause the filter to assume default values for the missing
+ parameters.
+
+ When created, Pictures are set to the Nearest filter.
+
+FreePicture
+
+ pid: PICTURE
+
+ Errors:
+ Picture
+
+ This request deletes the association between the resource ID and the
+ picture. The picture storage will be freed when no other resource
+ references it.
+
+Composite
+
+ op: PICTOP
+ src: PICTURE
+ mask: PICTURE or None
+ dst: PICTURE
+ src-x, src-y: INT16
+ mask-x, mask-y: INT16
+ dst-x, dst-y: INT16
+ width, height: CARD16
+
+ This request combines the specified rectangle of the transformed
+ src and mask operands with the specified rectangle of dst using op
+ as the compositing operator. The coordinates are relative their
+ respective (transformed) drawable's origin. Rendering is clipped
+ to the geometry of the dst drawable and then to the dst clip-list.
+
+ Pixels outside the geometry of src or mask needed for this
+ computation are substituted as described in the Source and Mask
+ Transformations section above.
+
+ If src, mask and dst are not in the same format, and one of their
+ formats can hold all without loss of precision, they are converted
+ to that format. Alternatively, the server will convert each
+ operand to the fallback format.
+
+ If mask is None, it is replaced by a constant alpha value of 1.
+
+ When dst has graphics-exposures true, a region covering all dst
+ pixels affected by substitutions performed on src or mask pixels
+ outside their respective geometries is computed. If that region is
+ empty, a NoExpose event is sent. Otherwise, a sequence of
+ GraphicsExpose events are sent covering that region.
+
+FillRectangles
+
+ op: PICTOP
+ dst: PICTURE
+ color: COLOR
+ rects: LISTofRECTANGLE
+
+ This request combines color with the destination drawable in the
+ area specified by rects. Each rectangle is combined separately;
+ overlapping areas will be rendered multiple times. The effect is
+ equivalent to compositing with a repeating source picture filled with
+ the specified color.
+
+Trapezoids
+
+ op: PICTOP
+ src: PICTURE
+ src-x, src-y: INT16
+ dst: PICTURE
+ mask-format: PICTFORMAT or None
+ traps: LISTofTRAPEZOID
+
+ This request rasterizes the list of trapezoids.
+
+ For each trap, the area between the left and right edges is filled
+ from the top to the bottom. src-x and src-y register the pattern to
+ the floor of the top x and y coordinate of the left edge of the
+ first trapezoid, they are adjusted for subsequent trapezoids so that
+ the pattern remains globally aligned within the destination.
+
+ When mask-format is not None, trapezoids are rendered in the
+ following way with the effective mask computed in mask-format:
+
+ tmp = temporary alpha picture (in mask-format)
+ Combine (Zero, tmp, tmp, None)
+ for each trapezoid
+ Combine (Add, tmp, trapezoid, None)
+ Combine (op, dst, source, tmp)
+
+ When mask-format is None, trapezoids are rendered in the order
+ specified directly to the destination:
+
+ for each trapezoid
+ Combine (op, dst, source, trapezoid)
+
+Triangles
+
+ op: PICTOP
+ src: PICTURE
+ src-x, src-y: INT16
+ dst: PICTURE
+ mask-format: PICTFORMAT or None
+ triangles: LISTofTRIANGLE
+
+ This request rasterizes the list of triangles in the order they
+ occur in the list.
+
+ When mask-format is not None, triangles are rendered in the
+ following way with the effective mask computed in mask-format:
+
+ tmp = temporary alpha picture (in mask-format)
+ Combine (Zero, tmp, tmp, None)
+ for each triangle
+ Combine (Add, tmp, triangle, None)
+ Combine (op, dst, source, tmp)
+
+ When mask-format is None, triangles are rendered in the order
+ specified directly to the destination:
+
+ for each triangle
+ Combine (op, dst, source, triangle)
+
+TriStrip
+
+ op: PICTOP
+ src: PICTURE
+ src-x, src-y: INT16
+ dst: PICTURE
+ mask-format: PICTFORMAT or None
+ points: LISTofPOINTFIX
+
+ Triangles are formed by initially using the first three points and
+ then by eliminating the first point and appending the next point in
+ the list. If fewer than three points are provided, this request does
+ nothing.
+
+ When mask-format is not None, triangles are rendered in the
+ following way with the effective mask computed in mask-format:
+
+ tmp = temporary alpha picture (in mask-format)
+ Combine (Zero, tmp, tmp, None)
+ for each triangle
+ Combine (Add, tmp, triangle, None)
+ Combine (op, dst, source, tmp)
+
+ When mask-format is None, triangles are rendered in the order
+ specified directly to the destination:
+
+ for each triangle
+ Combine (op, dst, source, triangle)
+
+TriFan
+ op: PICTOP
+ src: PICTURE
+ src-x, src-y: INT16
+ dst: PICTURE
+ mask-format: PICTFORMAT or None
+ points: LISTofPOINTFIX
+
+ Triangles are formed by initially using the first three points and
+ then by eliminating the second point and appending the next point
+ int the list. If fewer than three points are provided, this request
+ does nothing.
+
+ When mask-format is not None, triangles are rendered in the
+ following way with the effective mask computed in mask-format:
+
+ tmp = temporary alpha picture (in mask-format)
+ Combine (Zero, tmp, tmp, None)
+ for each triangle
+ Combine (Add, tmp, triangle, None)
+ Combine (op, dst, source, tmp)
+
+ When mask-format is None, triangles are rendered in the order
+ specified directly to the destination:
+
+ for each triangle
+ Combine (op, dst, source, triangle)
+
+ColorTrapezoids
+
+ op: PICTOP
+ dst: PICTURE
+ trapezoids: LISTofCOLORTRAP
+
+ The geometry of the trapezoids must meet the same requirements as
+ for the Trapezoids request. The trapezoids are filled in the order
+ they occur in the list.
+
+ColorTriangles
+
+ op: PICTOP
+ dst: PICTURE
+ triangles: LISTofCOLORTRIANGLE
+
+ The colored triangles are rasterized in the order they occur in the
+ list.
+
+???
+
+Should I included compressed triangle representations here?
+
+???
+
+CreateGlyphSet
+
+ gsid: GLYPHSET
+ format: PICTFORMAT
+
+ Errors:
+ Alloc, IDChoice, PictFormat, Match
+
+ This request creates a container for glyphs. The glyphset and
+ all contained glyphs are destroyed when gsid and any other names
+ for the glyphset are freed. Format must be a Direct format, when
+ it contains RGB values, the glyphs are composited using
+ component-alpha True, otherwise they are composited using
+ component-alpha False.
+
+ReferenceGlyphSet
+
+ gsid: GLYPHSET
+ existing: GLYPHSET
+
+ Errors:
+ Alloc, IDChoice, GlyphSet
+
+ This request creates an additional name for the existing glyphset.
+ The glyphset will not be freed until all references to it are
+ destroyed.
+
+FreeGlyphSet
+
+ glyphset: GLYPHSET
+
+ Errors:
+ GlyphSet
+
+ This request frees the name for the glyphset. When all names have
+ been freed, the glyphset and all contained glyphs are freed.
+
+AddGlyphs
+ glyphset: GLYPHSET
+ glyphids: LISTofCARD32
+ glyphs: LISTofGLYPHINFO
+ data: LISTofBYTE
+
+ Errors:
+ GlyphSet, Alloc
+
+ This request adds glyphs to glyphset. The image for the glyphs
+ are stored with each glyph in a separate Z-format image padded to a
+ 32-bit boundary. Existing glyphs with the same names are replaced.
+
+AddGlyphsFromPicture
+
+ glyphset: GLYPHSET
+ src: PICTURE
+ glyphs: LISTofPICTGLYPH
+
+ Errors:
+ GlyphSet, Alloc
+
+ This request adds glyphs to glyphset by copying them from src from
+ the locations included in glyphs. Existing glyphs with the same
+ names are replaced. Src may be in a different PictFormat than
+ glyphset, in which case the images are converted to the glyphset
+ format.
+
+FreeGlyphs
+
+ glyphset: GLYPHSET
+ glyphs: LISTofGLYPH
+
+ Errors:
+ GlyphSet, Match
+
+ This request removes glyphs from glyphset. Each glyph must exist
+ in glyphset (else a Match error results).
+
+CompositeGlyphs8
+CompositeGlyphs16
+CompositeGlyphs32
+
+ op: PICTOP
+ src: PICTURE
+ dst: PICTURE
+ mask-format: PICTFORMAT or None
+ glyphset: GLYPHABLE
+ src-x, src-y: INT16
+ dst-x, dst-y: INT16
+ glyphcmds: LISTofGLYPHITEM8 CompositeGlyphs8
+ glyphcmds: LISTofGLYPHITEM16 CompositeGlyphs16
+ glyphcmds: LISTofGLYPHITEM32 CompositeGlyphs32
+
+ Errors:
+ Picture, PictOp, PictFormat, GlyphSet, Glyph
+
+ The dst-x and dst-y coordinates are relative to the drawable's
+ origin and specify the baseline starting position (the initial glyph
+ origin). Each glyph item is processed in turn. A glyphset item
+ causes the glyphset to be used for subsequent glyphs. Switching
+ among glyphsets does not affect the next glyph origin. A glyph
+ element delta-x and delta-y specify additional changes in the
+ position along the x and y axes before the string is drawn; the
+ deltas are always added to the glyph origin.
+
+ All contained GLYPHSETs are always transmitted most significant byte
+ first.
+
+ If a GlyphSet error is generated for an item, the previous items may
+ have been drawn.
+
+ When mask-format is not None, glyphs are rendered in the following
+ way with the effective mask computed in mask-format:
+
+ tmp = temporary alpha picture
+ Combine (Zero, tmp, tmp, None)
+ for each glyph
+ Combine (Add, tmp, glyph, None)
+ Combine (op, dst, source, tmp)
+
+ When mask-format is None, glyphs are rendered in the order specified
+ directly to the destination:
+
+ for each glyph
+ Combine (op, dst, source, glyph)
+
+CreateCursor
+
+ cid: CURSOR
+ source: PICTURE
+ x, y: CARD16
+
+ Errors: Alloc, IDChoice, Match, Picture
+
+ This request creates a cursor and associates identifier cid with it.
+ The x and y coordinates define the hotspot relative to the source's
+ origin and must be a point within the source (or a Match error
+ results). The resulting picture will nominally be drawn to the
+ screen with PictOpOver.
+
+ The components of the cursor may be transformed arbitrarily to meet
+ display limitations. In particular, if the display supports only
+ two colors cursors without translucency, the cursor will be
+ transformed so that areas less than .5 alpha will be transparent,
+ else opaque, and areas darker than 50% gray will be black else white.
+
+ The source picture can be freed immediately if no further explicit
+ references to it are to be made.
+
+ Subsequent drawing in the source has an undefined effect on the
+ cursor. The server might or might not make a copy of the picture.
+
+CreateAnimCursor
+ cid: CURSOR
+ cursors: LISTofANIMCURSORELT
+
+ Errors: Alloc, IDChoice, Cursor
+
+ This request creates a cursor and associates identifier cid with it.
+ When active, the cursor image on the screen will cycle through
+ 'cursors', showing each cursor in the element for the number of
+ milliseconds indicated by the 'delay' member of that element.
+
+AddTraps
+ picture: PICTURE
+ off-x, off-y: INT16
+ trapezoids: LISTofTRAP
+
+ Errors: Match
+
+ Each trap is PictOpAdd'ed to 'picture'. 'off-x', 'off-y'
+ are added to each coordinate.
+
+ 'picture' must be an alpha-only picture else a 'Match' error is
+ returned.
+
+CreateSolidFill
+ pid: PICTURE
+ color: COLOR
+
+ Creates a Source picture that represents a solid fill with
+ the specified color.
+
+CreateLinearGradient
+ pid: PICTURE
+ p1, p2: POINTFIX
+ nstops: CARD32
+ stops: LISTofFIXED
+ stop_colors: LISTofCOLOR
+
+ Errors: Alloc, Value
+
+ Creates a source picture representing a linear Gradient. The gradients
+ bounds are defined by the two end points p1 and p2.
+
+ The gradient has nstops stop points between 0 and 1, each
+ having a stop color defined in stop_colors.
+
+ The array of stops has to contain values between 0 and 1 (inclusive) and
+ has to be ordered in increasing size or a Value error is generated. If
+ p1 == p2 a Value error is generated.
+
+ The colors are non premultiplied.
+
+CreateRadialGradient
+ pid: PICTURE
+ inner_center: POINTFIX
+ outer_center: POINTFIX
+ inner_radius: FIXED
+ outer_radius: FIXED
+ nstops: CARD32
+ stops: LISTofFIXED
+ stop_colors: LISTofCOLOR
+
+ Errors: Alloc, Value
+
+ Creates a source picture representing a radial Gradient. The
+ gradients bounds are defined by a center point, a focal point and a
+ radius around the center.
+
+ The gradient has nstops stop points between 0 and 1, each
+ having a stop color defined in stop_colors.
+
+ The array of stops has to contain values between 0 and 1 (inclusive) and
+ has to be ordered in increasing size or a Value error is generated. The inner
+ circle has to be completely contained inside the outer one or a Value error is
+ generated.
+
+ The colors are non premultiplied.
+
+CreateConicalGradient
+ pid: PICTURE
+ center: POINTFIX
+ angle: FIXED
+ nstops: CARD32
+ stops: LISTofFIXED
+ stop_colors: LISTofCOLOR
+
+ Errors: Alloc, Value
+
+ Creates a source picture representing a conical Gradient. The
+ gradient is defined by a center point and an angle (in degrees).
+
+ The gradient has nstops stop points between 0 and 1, each
+ having a stop color defined in stop_colors.
+
+ The array of stops has to contain values between 0 and 1 (inclusive) and
+ has to be ordered in increasing size or a Value error is generated.
+
+ The colors are non premultiplied.
+
+
+15. Extension Versioning
+
+The Render extension was developed in parallel with the implementation to
+ensure the feasibility of various portions of the design. As portions of
+the extension are implemented, the version number of the extension has
+changed to reflect the portions of the standard provided. This document
+describes the intent for version 1.0 of the specification, the partial
+implementations have version numbers less than that. Here's a list of
+what each version before 1.0 implemented:
+
+ 0.0:
+ No disjoint/conjoint operators
+ No component alpha
+ Composite
+ CreateGlyphSet
+ FreeGlyphSet
+ AddGlyphs
+ CompositeGlyphs
+
+ 0.1:
+ Component alpha
+ FillRectangles
+
+ 0.2:
+ Disjoint/Conjoint operators
+
+ 0.3:
+ FreeGlyphs
+
+ 0.4:
+ Trapezoids
+ Triangles
+ TriStrip
+ TriFan
+
+ 0.5:
+ CreateCursor
+
+ 0.6:
+ SetPictureTransform
+ QueryFilters
+ SetPictureFilter
+ subpixels member of QueryPictFormats
+
+ 0.7:
+ QueryPictIndexValues
+ 0.8:
+ CreateAnimCursor
+ 0.9:
+ AddTrapezoids
+
+ 0.10:
+ CreateSolidFill
+ CreateLinearGradient
+ CreateRadialGradient
+ CreateConicalGradient
+
+ The repeat picture attribute now supports Pad and
+ Reflect, older versions only supported None and Normal.
diff --git a/X11/extensions/resourceproto.pc.in b/X11/extensions/resourceproto.pc.in
new file mode 100644
index 000000000..2851df1c3
--- /dev/null
+++ b/X11/extensions/resourceproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ResourceProto
+Description: Resource extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/saver.h b/X11/extensions/saver.h
new file mode 100644
index 000000000..d253e4f79
--- /dev/null
+++ b/X11/extensions/saver.h
@@ -0,0 +1,54 @@
+/*
+ * $XConsortium: saver.h,v 1.5 94/04/17 20:59:33 rws Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _SAVER_H_
+#define _SAVER_H_
+
+#define ScreenSaverName "MIT-SCREEN-SAVER"
+#define ScreenSaverPropertyName "_MIT_SCREEN_SAVER_ID"
+
+#define ScreenSaverNotifyMask 0x00000001
+#define ScreenSaverCycleMask 0x00000002
+
+#define ScreenSaverMajorVersion 1
+#define ScreenSaverMinorVersion 1
+
+#define ScreenSaverOff 0
+#define ScreenSaverOn 1
+#define ScreenSaverCycle 2
+#define ScreenSaverDisabled 3
+
+#define ScreenSaverBlanked 0
+#define ScreenSaverInternal 1
+#define ScreenSaverExternal 2
+
+#define ScreenSaverNotify 0
+#define ScreenSaverNumberEvents 1
+
+#endif /* _SAVER_H_ */
diff --git a/X11/extensions/saverproto.h b/X11/extensions/saverproto.h
new file mode 100644
index 000000000..9b8ed7333
--- /dev/null
+++ b/X11/extensions/saverproto.h
@@ -0,0 +1,178 @@
+/*
+ * $XConsortium: saverproto.h,v 1.5 94/04/17 20:59:33 keith Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+/* $XFree86$ */
+
+#ifndef _SAVERPROTO_H_
+#define _SAVERPROTO_H_
+
+#include <X11/extensions/saver.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define X_ScreenSaverQueryVersion 0
+
+typedef struct _ScreenSaverQueryVersion {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverQueryVersion */
+ CARD16 length B16;
+ CARD8 clientMajor;
+ CARD8 clientMinor;
+ CARD16 unused B16;
+} xScreenSaverQueryVersionReq;
+#define sz_xScreenSaverQueryVersionReq 8
+
+typedef struct {
+ CARD8 type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of protocol */
+ CARD16 minorVersion B16; /* minor version of protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xScreenSaverQueryVersionReply;
+#define sz_xScreenSaverQueryVersionReply 32
+
+#define X_ScreenSaverQueryInfo 1
+
+typedef struct _ScreenSaverQueryInfo {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverQueryInfo */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xScreenSaverQueryInfoReq;
+#define sz_xScreenSaverQueryInfoReq 8
+
+typedef struct {
+ CARD8 type; /* X_Reply */
+ BYTE state; /* Off, On */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window window B32;
+ CARD32 tilOrSince B32;
+ CARD32 idle B32;
+ CARD32 eventMask B32;
+ BYTE kind; /* Blanked, Internal, External */
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xScreenSaverQueryInfoReply;
+#define sz_xScreenSaverQueryInfoReply 32
+
+#define X_ScreenSaverSelectInput 2
+
+typedef struct _ScreenSaverSelectInput {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverSelectInput */
+ CARD16 length B16;
+ Drawable drawable B32;
+ CARD32 eventMask B32;
+} xScreenSaverSelectInputReq;
+#define sz_xScreenSaverSelectInputReq 12
+
+#define X_ScreenSaverSetAttributes 3
+
+typedef struct _ScreenSaverSetAttributes {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverSetAttributes */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BYTE c_class;
+ CARD8 depth;
+ VisualID visualID B32;
+ CARD32 mask B32;
+} xScreenSaverSetAttributesReq;
+#define sz_xScreenSaverSetAttributesReq 28
+
+#define X_ScreenSaverUnsetAttributes 4
+
+typedef struct _ScreenSaverUnsetAttributes {
+ CARD8 reqType; /* always ScreenSaverReqCode */
+ CARD8 saverReqType; /* always X_ScreenSaverUnsetAttributes */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xScreenSaverUnsetAttributesReq;
+#define sz_xScreenSaverUnsetAttributesReq 8
+
+#define X_ScreenSaverSuspend 5
+
+typedef struct _ScreenSaverSuspend {
+ CARD8 reqType;
+ CARD8 saverReqType;
+ CARD16 length B16;
+ Bool suspend B32;
+} xScreenSaverSuspendReq;
+#define sz_xScreenSaverSuspendReq 8
+
+typedef struct _ScreenSaverNotify {
+ CARD8 type; /* always eventBase + ScreenSaverNotify */
+ BYTE state; /* off, on, cycle */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32;
+ Window root B32;
+ Window window B32; /* screen saver window */
+ BYTE kind; /* blanked, internal, external */
+ BYTE forced;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xScreenSaverNotifyEvent;
+#define sz_xScreenSaverNotifyEvent 32
+
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _SAVERPROTO_H_ */
diff --git a/X11/extensions/scrnsaver.h b/X11/extensions/scrnsaver.h
new file mode 100644
index 000000000..8e8c5d6d1
--- /dev/null
+++ b/X11/extensions/scrnsaver.h
@@ -0,0 +1,136 @@
+/*
+ * $XConsortium: scrnsaver.h,v 1.6 94/04/17 20:59:34 keith Exp $
+ *
+Copyright (c) 1992 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+/* $XFree86$ */
+
+#ifndef _SCRNSAVER_H_
+#define _SCRNSAVER_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/Xlib.h>
+#include <X11/extensions/saver.h>
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* screen saver window */
+ Window root; /* root window of event screen */
+ int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverCycle*/
+ int kind; /* ScreenSaverBlanked, ...Internal, ...External */
+ Bool forced; /* extents of new region */
+ Time time; /* event timestamp */
+} XScreenSaverNotifyEvent;
+
+typedef struct {
+ Window window; /* screen saver window - may not exist */
+ int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverDisabled*/
+ int kind; /* ScreenSaverBlanked, ...Internal, ...External */
+ unsigned long til_or_since; /* time til or since screen saver */
+ unsigned long idle; /* total time since last user input */
+ unsigned long eventMask; /* currently selected events for this client */
+} XScreenSaverInfo;
+
+_XFUNCPROTOBEGIN
+
+extern Bool XScreenSaverQueryExtension (
+ Display* /* display */,
+ int* /* event_base */,
+ int* /* error_base */
+);
+
+extern Status XScreenSaverQueryVersion (
+ Display* /* display */,
+ int* /* major_version */,
+ int* /* minor_version */
+);
+
+extern XScreenSaverInfo *XScreenSaverAllocInfo (
+ void
+);
+
+extern Status XScreenSaverQueryInfo (
+ Display* /* display */,
+ Drawable /* drawable */,
+ XScreenSaverInfo* /* info */
+);
+
+extern void XScreenSaverSelectInput (
+ Display* /* display */,
+ Drawable /* drawable */,
+ unsigned long /* eventMask */
+);
+
+extern void XScreenSaverSetAttributes (
+ Display* /* display */,
+ Drawable /* drawable */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual * /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes * /* attributes */
+);
+
+extern void XScreenSaverUnsetAttributes (
+ Display* /* display */,
+ Drawable /* drawable */
+);
+
+extern Status XScreenSaverRegister (
+ Display* /* display */,
+ int /* screen */,
+ XID /* xid */,
+ Atom /* type */
+);
+
+extern Status XScreenSaverUnregister (
+ Display* /* display */,
+ int /* screen */
+);
+
+extern Status XScreenSaverGetRegistered (
+ Display* /* display */,
+ int /* screen */,
+ XID* /* xid */,
+ Atom* /* type */
+);
+
+extern void XScreenSaverSuspend (
+ Display* /* display */,
+ Bool /* suspend */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _SCRNSAVER_H_ */
diff --git a/X11/extensions/scrnsaverproto.pc.in b/X11/extensions/scrnsaverproto.pc.in
new file mode 100644
index 000000000..87f9ddc69
--- /dev/null
+++ b/X11/extensions/scrnsaverproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ScrnSaverProto
+Description: ScrnSaver extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/security.h b/X11/extensions/security.h
new file mode 100644
index 000000000..fc7ade236
--- /dev/null
+++ b/X11/extensions/security.h
@@ -0,0 +1,111 @@
+/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+*/
+/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
+
+#ifndef _SECURITY_H
+#define _SECURITY_H
+
+#define _XAUTH_STRUCT_ONLY
+#include <X11/Xauth.h>
+
+/* constants that server, library, and application all need */
+
+#define XSecurityNumberEvents 1
+#define XSecurityNumberErrors 2
+#define XSecurityBadAuthorization 0
+#define XSecurityBadAuthorizationProtocol 1
+
+/* trust levels */
+#define XSecurityClientTrusted 0
+#define XSecurityClientUntrusted 1
+
+/* authorization attribute masks */
+#define XSecurityTimeout (1<<0)
+#define XSecurityTrustLevel (1<<1)
+#define XSecurityGroup (1<<2)
+#define XSecurityEventMask (1<<3)
+#define XSecurityAllAuthorizationAttributes \
+ (XSecurityTimeout | XSecurityTrustLevel | XSecurityGroup | XSecurityEventMask)
+
+/* event masks */
+#define XSecurityAuthorizationRevokedMask (1<<0)
+#define XSecurityAllEventMasks XSecurityAuthorizationRevokedMask
+
+/* event offsets */
+#define XSecurityAuthorizationRevoked 0
+
+#define XSecurityAuthorizationName "XC-QUERY-SECURITY-1"
+#define XSecurityAuthorizationNameLen 19
+
+
+#ifndef _SECURITY_SERVER
+
+_XFUNCPROTOBEGIN
+
+Status XSecurityQueryExtension (
+ Display *dpy,
+ int *major_version_return,
+ int *minor_version_return);
+
+Xauth *XSecurityAllocXauth(void);
+
+void XSecurityFreeXauth(Xauth *auth);
+
+/* type for returned auth ids */
+typedef unsigned long XSecurityAuthorization;
+
+typedef struct {
+ unsigned int timeout;
+ unsigned int trust_level;
+ XID group;
+ long event_mask;
+} XSecurityAuthorizationAttributes;
+
+Xauth *XSecurityGenerateAuthorization(
+ Display *dpy,
+ Xauth *auth_in,
+ unsigned long valuemask,
+ XSecurityAuthorizationAttributes *attributes,
+ XSecurityAuthorization *auth_id_return);
+
+Status XSecurityRevokeAuthorization(
+ Display *dpy,
+ XSecurityAuthorization auth_id);
+
+_XFUNCPROTOEND
+
+typedef struct {
+ int type; /* event base + XSecurityAuthorizationRevoked */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ XSecurityAuthorization auth_id; /* revoked authorization id */
+} XSecurityAuthorizationRevokedEvent;
+
+#endif /* _SECURITY_SERVER */
+
+#endif /* _SECURITY_H */
diff --git a/X11/extensions/securstr.h b/X11/extensions/securstr.h
new file mode 100644
index 000000000..50c764441
--- /dev/null
+++ b/X11/extensions/securstr.h
@@ -0,0 +1,116 @@
+/* $Xorg: securstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+*/
+/* $XFree86: xc/include/extensions/securstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */
+
+#ifndef _SECURSTR_H
+#define _SECURSTR_H
+
+#include <X11/extensions/security.h>
+
+#define SECURITY_EXTENSION_NAME "SECURITY"
+#define SECURITY_MAJOR_VERSION 1
+#define SECURITY_MINOR_VERSION 0
+
+#define X_SecurityQueryVersion 0
+#define X_SecurityGenerateAuthorization 1
+#define X_SecurityRevokeAuthorization 2
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xSecurityQueryVersionReq;
+#define sz_xSecurityQueryVersionReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xSecurityQueryVersionReply;
+#define sz_xSecurityQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD16 nbytesAuthProto B16;
+ CARD16 nbytesAuthData B16;
+ CARD32 valueMask B32;
+ /* auth protocol name padded to 4 bytes */
+ /* auth protocol data padded to 4 bytes */
+ /* list of CARD32 values, if any */
+} xSecurityGenerateAuthorizationReq;
+#define sz_xSecurityGenerateAuthorizationReq 12
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 authId B32;
+ CARD16 dataLength B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xSecurityGenerateAuthorizationReply;
+#define sz_xSecurityGenerateAuthorizationReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD32 authId B32;
+} xSecurityRevokeAuthorizationReq;
+#define sz_xSecurityRevokeAuthorizationReq 8
+
+typedef struct _xSecurityAuthorizationRevokedEvent {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ CARD32 authId B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xSecurityAuthorizationRevokedEvent;
+#define sz_xSecurityAuthorizationRevokedEvent 32
+
+#endif /* _SECURSTR_H */
diff --git a/X11/extensions/shape.h b/X11/extensions/shape.h
new file mode 100644
index 000000000..d173efef8
--- /dev/null
+++ b/X11/extensions/shape.h
@@ -0,0 +1,180 @@
+/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _SHAPE_H_
+#define _SHAPE_H_
+
+#include <X11/Xfuncproto.h>
+
+#define X_ShapeQueryVersion 0
+#define X_ShapeRectangles 1
+#define X_ShapeMask 2
+#define X_ShapeCombine 3
+#define X_ShapeOffset 4
+#define X_ShapeQueryExtents 5
+#define X_ShapeSelectInput 6
+#define X_ShapeInputSelected 7
+#define X_ShapeGetRectangles 8
+
+#define ShapeSet 0
+#define ShapeUnion 1
+#define ShapeIntersect 2
+#define ShapeSubtract 3
+#define ShapeInvert 4
+
+#define ShapeBounding 0
+#define ShapeClip 1
+#define ShapeInput 2
+
+#define ShapeNotifyMask (1L << 0)
+#define ShapeNotify 0
+
+#define ShapeNumberEvents (ShapeNotify + 1)
+
+#ifndef _SHAPE_SERVER_
+
+#include <X11/Xutil.h>
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int kind; /* ShapeBounding or ShapeClip */
+ int x, y; /* extents of new region */
+ unsigned width, height;
+ Time time; /* server timestamp when region changed */
+ Bool shaped; /* true if the region exists */
+} XShapeEvent;
+
+_XFUNCPROTOBEGIN
+
+extern Bool XShapeQueryExtension (
+ Display* /* display */,
+ int* /* event_base */,
+ int* /* error_base */
+);
+
+extern Status XShapeQueryVersion (
+ Display* /* display */,
+ int* /* major_version */,
+ int* /* minor_version */
+);
+
+extern void XShapeCombineRegion (
+ Display* /* display */,
+ Window /* dest */,
+ int /* dest_kind */,
+ int /* x_off */,
+ int /* y_off */,
+ Region /* region */,
+ int /* op */
+);
+
+extern void XShapeCombineRectangles (
+ Display* /* display */,
+ Window /* dest */,
+ int /* dest_kind */,
+ int /* x_off */,
+ int /* y_off */,
+ XRectangle* /* rectangles */,
+ int /* n_rects */,
+ int /* op */,
+ int /* ordering */
+);
+
+extern void XShapeCombineMask (
+ Display* /* display */,
+ Window /* dest */,
+ int /* dest_kind */,
+ int /* x_off */,
+ int /* y_off */,
+ Pixmap /* src */,
+ int /* op */
+);
+
+extern void XShapeCombineShape (
+ Display* /* display */,
+ Window /* dest */,
+ int /* dest_kind */,
+ int /* x_off */,
+ int /* y_off */,
+ Window /* src */,
+ int /* src_kind */,
+ int /* op */
+);
+
+extern void XShapeOffsetShape (
+ Display* /* display */,
+ Window /* dest */,
+ int /* dest_kind */,
+ int /* x_off */,
+ int /* y_off */
+);
+
+extern Status XShapeQueryExtents (
+ Display* /* display */,
+ Window /* window */,
+ Bool* /* bounding_shaped */,
+ int* /* x_bounding */,
+ int* /* y_bounding */,
+ unsigned int* /* w_bounding */,
+ unsigned int* /* h_bounding */,
+ Bool* /* clip_shaped */,
+ int* /* x_clip */,
+ int* /* y_clip */,
+ unsigned int* /* w_clip */,
+ unsigned int* /* h_clip */
+);
+
+extern void XShapeSelectInput (
+ Display* /* display */,
+ Window /* window */,
+ unsigned long /* mask */
+);
+
+extern unsigned long XShapeInputSelected (
+ Display* /* display */,
+ Window /* window */
+);
+
+extern XRectangle *XShapeGetRectangles (
+ Display* /* display */,
+ Window /* window */,
+ int /* kind */,
+ int* /* count */,
+ int* /* ordering */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _SHAPE_SERVER_ */
+
+#endif /* _SHAPE_H_ */
diff --git a/X11/extensions/shapestr.h b/X11/extensions/shapestr.h
new file mode 100644
index 000000000..4742ba8e9
--- /dev/null
+++ b/X11/extensions/shapestr.h
@@ -0,0 +1,234 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* $Xorg: shapestr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#ifndef _SHAPESTR_H_
+#define _SHAPESTR_H_
+
+/*
+ * Protocol requests constants and alignment values
+ * These would really be in SHAPE's X.h and Xproto.h equivalents
+ */
+
+#include "shape.h"
+
+#define Window CARD32
+#define Time CARD32
+
+#define SHAPENAME "SHAPE"
+
+#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
+#define SHAPE_MINOR_VERSION 1
+
+typedef struct _ShapeQueryVersion {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeQueryVersion */
+ CARD16 length B16;
+} xShapeQueryVersionReq;
+#define sz_xShapeQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of SHAPE protocol */
+ CARD16 minorVersion B16; /* minor version of SHAPE protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xShapeQueryVersionReply;
+#define sz_xShapeQueryVersionReply 32
+
+typedef struct _ShapeRectangles {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeRectangles */
+ CARD16 length B16;
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
+ CARD8 pad0; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xShapeRectanglesReq; /* followed by xRects */
+#define sz_xShapeRectanglesReq 16
+
+typedef struct _ShapeMask {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeMask */
+ CARD16 length B16;
+
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD16 junk B16; /* not used */
+
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+ CARD32 src B32; /* 1 bit pixmap */
+} xShapeMaskReq;
+#define sz_xShapeMaskReq 20
+
+typedef struct _ShapeCombine {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeCombine */
+ CARD16 length B16;
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 srcKind; /* ShapeBounding or ShapeClip */
+ CARD8 junk; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+ Window src B32;
+} xShapeCombineReq;
+#define sz_xShapeCombineReq 20
+
+typedef struct _ShapeOffset {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeOffset */
+ CARD16 length B16;
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 junk1; /* not used */
+ CARD16 junk2 B16; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xShapeOffsetReq;
+#define sz_xShapeOffsetReq 16
+
+typedef struct _ShapeQueryExtents {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeQueryExtents */
+ CARD16 length B16;
+ Window window B32;
+} xShapeQueryExtentsReq;
+#define sz_xShapeQueryExtentsReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 boundingShaped; /* window has bounding shape */
+ CARD8 clipShaped; /* window has clip shape */
+ CARD16 unused1 B16;
+ INT16 xBoundingShape B16; /* extents of bounding shape */
+ INT16 yBoundingShape B16;
+ CARD16 widthBoundingShape B16;
+ CARD16 heightBoundingShape B16;
+ INT16 xClipShape B16; /* extents of clip shape */
+ INT16 yClipShape B16;
+ CARD16 widthClipShape B16;
+ CARD16 heightClipShape B16;
+ CARD32 pad1 B32;
+} xShapeQueryExtentsReply;
+#define sz_xShapeQueryExtentsReply 32
+
+typedef struct _ShapeSelectInput {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeSelectInput */
+ CARD16 length B16;
+ Window window B32;
+ BYTE enable; /* xTrue -> send events */
+ BYTE pad1;
+ CARD16 pad2 B16;
+} xShapeSelectInputReq;
+#define sz_xShapeSelectInputReq 12
+
+typedef struct _ShapeNotify {
+ BYTE type; /* always eventBase + ShapeNotify */
+ BYTE kind; /* either ShapeBounding or ShapeClip */
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ INT16 x B16;
+ INT16 y B16; /* extents of new shape */
+ CARD16 width B16;
+ CARD16 height B16;
+ Time time B32; /* time of change */
+ BYTE shaped; /* set when a shape actual exists */
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xShapeNotifyEvent;
+#define sz_xShapeNotifyEvent 32
+
+typedef struct _ShapeInputSelected {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeInputSelected */
+ CARD16 length B16;
+ Window window B32;
+} xShapeInputSelectedReq;
+#define sz_xShapeInputSelectedReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 enabled; /* current status */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xShapeInputSelectedReply;
+#define sz_xShapeInputSelectedReply 32
+
+typedef struct _ShapeGetRectangles {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeGetRectangles */
+ CARD16 length B16;
+ Window window B32;
+ CARD8 kind; /* ShapeBounding or ShapeClip */
+ CARD8 junk1;
+ CARD16 junk2 B16;
+} xShapeGetRectanglesReq;
+#define sz_xShapeGetRectanglesReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* not zero */
+ CARD32 nrects B32; /* number of rectangles */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xShapeGetRectanglesReply; /* followed by xRectangles */
+#define sz_xShapeGetRectanglesReply 32
+
+#undef Window
+#undef Time
+
+#endif /* _SHAPESTR_H_ */
diff --git a/X11/extensions/shmstr.h b/X11/extensions/shmstr.h
new file mode 100644
index 000000000..b15538d4e
--- /dev/null
+++ b/X11/extensions/shmstr.h
@@ -0,0 +1,217 @@
+/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHMSTR_H_
+#define _SHMSTR_H_
+
+/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+#include "XShm.h"
+
+#define ShmSeg CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define GContext CARD32
+#define Pixmap CARD32
+
+#define SHMNAME "MIT-SHM"
+
+#define SHM_MAJOR_VERSION 1 /* current version numbers */
+#define SHM_MINOR_VERSION 1
+
+#ifdef _XSHM_SERVER_
+#define XSHM_PUT_IMAGE_ARGS \
+ DrawablePtr /* dst */, \
+ GCPtr /* pGC */, \
+ int /* depth */, \
+ unsigned int /* format */, \
+ int /* w */, \
+ int /* h */, \
+ int /* sx */, \
+ int /* sy */, \
+ int /* sw */, \
+ int /* sh */, \
+ int /* dx */, \
+ int /* dy */, \
+ char * /* data */
+
+#define XSHM_CREATE_PIXMAP_ARGS \
+ ScreenPtr /* pScreen */, \
+ int /* width */, \
+ int /* height */, \
+ int /* depth */, \
+ char * /* addr */
+
+typedef struct _ShmFuncs {
+ PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
+ void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
+} ShmFuncs, *ShmFuncsPtr;
+#endif
+
+typedef struct _ShmQueryVersion {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmQueryVersion */
+ CARD16 length B16;
+} xShmQueryVersionReq;
+#define sz_xShmQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sharedPixmaps;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of SHM protocol */
+ CARD16 minorVersion B16; /* minor version of SHM protocol */
+ CARD16 uid B16;
+ CARD16 gid B16;
+ CARD8 pixmapFormat;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xShmQueryVersionReply;
+#define sz_xShmQueryVersionReply 32
+
+typedef struct _ShmAttach {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmAttach */
+ CARD16 length B16;
+ ShmSeg shmseg B32;
+ CARD32 shmid B32;
+ BOOL readOnly;
+ BYTE pad0;
+ CARD16 pad1 B16;
+} xShmAttachReq;
+#define sz_xShmAttachReq 16
+
+typedef struct _ShmDetach {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmDetach */
+ CARD16 length B16;
+ ShmSeg shmseg B32;
+} xShmDetachReq;
+#define sz_xShmDetachReq 8
+
+typedef struct _ShmPutImage {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmPutImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ CARD16 totalWidth B16;
+ CARD16 totalHeight B16;
+ CARD16 srcX B16;
+ CARD16 srcY B16;
+ CARD16 srcWidth B16;
+ CARD16 srcHeight B16;
+ INT16 dstX B16;
+ INT16 dstY B16;
+ CARD8 depth;
+ CARD8 format;
+ CARD8 sendEvent;
+ CARD8 bpad;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmPutImageReq;
+#define sz_xShmPutImageReq 40
+
+typedef struct _ShmGetImage {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmGetImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 planeMask B32;
+ CARD8 format;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmGetImageReq;
+#define sz_xShmGetImageReq 32
+
+typedef struct _ShmGetImageReply {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ VisualID visual B32;
+ CARD32 size B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xShmGetImageReply;
+#define sz_xShmGetImageReply 32
+
+typedef struct _ShmCreatePixmap {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmCreatePixmap */
+ CARD16 length B16;
+ Pixmap pid B32;
+ Drawable drawable B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 depth;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmCreatePixmapReq;
+#define sz_xShmCreatePixmapReq 28
+
+typedef struct _ShmCompletion {
+ BYTE type; /* always eventBase + ShmCompletion */
+ BYTE bpad0;
+ CARD16 sequenceNumber B16;
+ Drawable drawable B32;
+ CARD16 minorEvent B16;
+ BYTE majorEvent;
+ BYTE bpad1;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xShmCompletionEvent;
+#define sz_xShmCompletionEvent 32
+
+#undef ShmSeg
+#undef Drawable
+#undef VisualID
+#undef GContext
+#undef Pixmap
+
+#endif /* _SHMSTR_H_ */
diff --git a/X11/extensions/sync.h b/X11/extensions/sync.h
new file mode 100644
index 000000000..9fbe6d72f
--- /dev/null
+++ b/X11/extensions/sync.h
@@ -0,0 +1,469 @@
+/* $Xorg: sync.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1991, 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/extensions/sync.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */
+
+#ifndef _SYNC_H_
+#define _SYNC_H_
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+#define SYNC_NAME "SYNC"
+
+#define SYNC_MAJOR_VERSION 3
+#define SYNC_MINOR_VERSION 0
+
+#define X_SyncInitialize 0
+#define X_SyncListSystemCounters 1
+#define X_SyncCreateCounter 2
+#define X_SyncSetCounter 3
+#define X_SyncChangeCounter 4
+#define X_SyncQueryCounter 5
+#define X_SyncDestroyCounter 6
+#define X_SyncAwait 7
+#define X_SyncCreateAlarm 8
+#define X_SyncChangeAlarm 9
+#define X_SyncQueryAlarm 10
+#define X_SyncDestroyAlarm 11
+#define X_SyncSetPriority 12
+#define X_SyncGetPriority 13
+
+#define XSyncCounterNotify 0
+#define XSyncAlarmNotify 1
+#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify)
+
+#define XSyncNumberEvents 2L
+
+#define XSyncBadCounter 0L
+#define XSyncBadAlarm 1L
+#define XSyncNumberErrors (XSyncBadAlarm + 1)
+
+/*
+ * Flags for Alarm Attributes
+ */
+#define XSyncCACounter (1L<<0)
+#define XSyncCAValueType (1L<<1)
+#define XSyncCAValue (1L<<2)
+#define XSyncCATestType (1L<<3)
+#define XSyncCADelta (1L<<4)
+#define XSyncCAEvents (1L<<5)
+
+/*
+ * Constants for the value_type argument of various requests
+ */
+typedef enum {
+ XSyncAbsolute,
+ XSyncRelative
+} XSyncValueType;
+
+/*
+ * Alarm Test types
+ */
+typedef enum {
+ XSyncPositiveTransition,
+ XSyncNegativeTransition,
+ XSyncPositiveComparison,
+ XSyncNegativeComparison
+} XSyncTestType;
+
+/*
+ * Alarm state constants
+ */
+typedef enum {
+ XSyncAlarmActive,
+ XSyncAlarmInactive,
+ XSyncAlarmDestroyed
+} XSyncAlarmState;
+
+
+typedef XID XSyncCounter;
+typedef XID XSyncAlarm;
+typedef struct _XSyncValue {
+ int hi;
+ unsigned int lo;
+} XSyncValue;
+
+/*
+ * Macros/functions for manipulating 64 bit values
+ */
+
+/* have to put these prototypes before the corresponding macro definitions */
+
+extern void XSyncIntToValue(
+ XSyncValue* /*pv*/,
+ int /*i*/
+);
+
+extern void XSyncIntsToValue(
+ XSyncValue* /*pv*/,
+ unsigned int /*l*/,
+ int /*h*/
+);
+
+extern Bool XSyncValueGreaterThan(
+ XSyncValue /*a*/,
+ XSyncValue /*b*/
+);
+
+extern Bool XSyncValueLessThan(
+ XSyncValue /*a*/,
+ XSyncValue /*b*/
+);
+
+extern Bool XSyncValueGreaterOrEqual(
+ XSyncValue /*a*/,
+ XSyncValue /*b*/
+);
+
+extern Bool XSyncValueLessOrEqual(
+ XSyncValue /*a*/,
+ XSyncValue /*b*/
+);
+
+extern Bool XSyncValueEqual(
+ XSyncValue /*a*/,
+ XSyncValue /*b*/
+);
+
+extern Bool XSyncValueIsNegative(
+ XSyncValue /*v*/
+);
+
+extern Bool XSyncValueIsZero(
+ XSyncValue /*a*/
+);
+
+extern Bool XSyncValueIsPositive(
+ XSyncValue /*v*/
+);
+
+extern unsigned int XSyncValueLow32(
+ XSyncValue /*v*/
+);
+
+extern int XSyncValueHigh32(
+ XSyncValue /*v*/
+);
+
+extern void XSyncValueAdd(
+ XSyncValue* /*presult*/,
+ XSyncValue /*a*/,
+ XSyncValue /*b*/,
+ int* /*poverflow*/
+);
+
+extern void XSyncValueSubtract(
+ XSyncValue* /*presult*/,
+ XSyncValue /*a*/,
+ XSyncValue /*b*/,
+ int* /*poverflow*/
+);
+
+extern void XSyncMaxValue(
+ XSyncValue* /*pv*/
+);
+
+extern void XSyncMinValue(
+ XSyncValue* /*pv*/
+);
+
+_XFUNCPROTOEND
+
+/* The _XSync macros below are for library internal use only. They exist
+ * so that if we have to make a fix, we can change it in this one place
+ * and have both the macro and function variants inherit the fix.
+ */
+
+#define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i))
+#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h))
+#define _XSyncValueGreaterThan(a, b)\
+ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo))
+#define _XSyncValueLessThan(a, b)\
+ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo))
+#define _XSyncValueGreaterOrEqual(a, b)\
+ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo))
+#define _XSyncValueLessOrEqual(a, b)\
+ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo))
+#define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi)
+#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0)
+#define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0)
+#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1)
+#define _XSyncValueLow32(v) ((v).lo)
+#define _XSyncValueHigh32(v) ((v).hi)
+#define _XSyncValueAdd(presult,a,b,poverflow) {\
+ int t = (a).lo;\
+ Bool signa = XSyncValueIsNegative(a);\
+ Bool signb = XSyncValueIsNegative(b);\
+ ((presult)->lo = (a).lo + (b).lo);\
+ ((presult)->hi = (a).hi + (b).hi);\
+ if (t>(presult)->lo) (presult)->hi++;\
+ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+ }
+#define _XSyncValueSubtract(presult,a,b,poverflow) {\
+ int t = (a).lo;\
+ Bool signa = XSyncValueIsNegative(a);\
+ Bool signb = XSyncValueIsNegative(b);\
+ ((presult)->lo = (a).lo - (b).lo);\
+ ((presult)->hi = (a).hi - (b).hi);\
+ if (t>(presult)->lo) (presult)->hi--;\
+ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+ }
+#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff)
+#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0)
+
+/*
+ * These are the publically usable macros. If you want the function version
+ * of one of these, just #undef the macro to uncover the function.
+ * (This is the same convention that the ANSI C library uses.)
+ */
+
+#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i)
+#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h)
+#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b)
+#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b)
+#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b)
+#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b)
+#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b)
+#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v)
+#define XSyncValueIsZero(a) _XSyncValueIsZero(a)
+#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v)
+#define XSyncValueLow32(v) _XSyncValueLow32(v)
+#define XSyncValueHigh32(v) _XSyncValueHigh32(v)
+#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow)
+#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow)
+#define XSyncMaxValue(pv) _XSyncMaxValue(pv)
+#define XSyncMinValue(pv) _XSyncMinValue(pv)
+
+#ifndef _SYNC_SERVER
+
+typedef struct _XSyncSystemCounter {
+ char *name; /* null-terminated name of system counter */
+ XSyncCounter counter; /* counter id of this system counter */
+ XSyncValue resolution; /* resolution of this system counter */
+} XSyncSystemCounter;
+
+
+typedef struct {
+ XSyncCounter counter; /* counter to trigger on */
+ XSyncValueType value_type; /* absolute/relative */
+ XSyncValue wait_value; /* value to compare counter to */
+ XSyncTestType test_type; /* pos/neg comparison/transtion */
+} XSyncTrigger;
+
+typedef struct {
+ XSyncTrigger trigger; /* trigger for await */
+ XSyncValue event_threshold; /* send event if past threshold */
+} XSyncWaitCondition;
+
+
+typedef struct {
+ XSyncTrigger trigger;
+ XSyncValue delta;
+ Bool events;
+ XSyncAlarmState state;
+} XSyncAlarmAttributes;
+
+/*
+ * Events
+ */
+
+typedef struct {
+ int type; /* event base + XSyncCounterNotify */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ XSyncCounter counter; /* counter involved in await */
+ XSyncValue wait_value; /* value being waited for */
+ XSyncValue counter_value; /* counter value when this event was sent */
+ Time time; /* milliseconds */
+ int count; /* how many more events to come */
+ Bool destroyed; /* True if counter was destroyed */
+} XSyncCounterNotifyEvent;
+
+typedef struct {
+ int type; /* event base + XSyncCounterNotify */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ XSyncAlarm alarm; /* alarm that triggered */
+ XSyncValue counter_value; /* value that triggered the alarm */
+ XSyncValue alarm_value; /* test value of trigger in alarm */
+ Time time; /* milliseconds */
+ XSyncAlarmState state; /* new state of alarm */
+} XSyncAlarmNotifyEvent;
+
+/*
+ * Errors
+ */
+
+typedef struct {
+ int type;
+ Display *display; /* Display the event was read from */
+ XSyncAlarm alarm; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error base + XSyncBadAlarm */
+ unsigned char request_code; /* Major op-code of failed request */
+ unsigned char minor_code; /* Minor op-code of failed request */
+} XSyncAlarmError;
+
+typedef struct {
+ int type;
+ Display *display; /* Display the event was read from */
+ XSyncCounter counter; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error base + XSyncBadCounter */
+ unsigned char request_code; /* Major op-code of failed request */
+ unsigned char minor_code; /* Minor op-code of failed request */
+} XSyncCounterError;
+
+/*
+ * Prototypes
+ */
+
+_XFUNCPROTOBEGIN
+
+extern Status XSyncQueryExtension(
+ Display* /*dpy*/,
+ int* /*event_base_return*/,
+ int* /*error_base_return*/
+);
+
+extern Status XSyncInitialize(
+ Display* /*dpy*/,
+ int* /*major_version_return*/,
+ int* /*minor_version_return*/
+);
+
+extern XSyncSystemCounter *XSyncListSystemCounters(
+ Display* /*dpy*/,
+ int* /*n_counters_return*/
+);
+
+extern void XSyncFreeSystemCounterList(
+ XSyncSystemCounter* /*list*/
+);
+
+extern XSyncCounter XSyncCreateCounter(
+ Display* /*dpy*/,
+ XSyncValue /*initial_value*/
+);
+
+extern Status XSyncSetCounter(
+ Display* /*dpy*/,
+ XSyncCounter /*counter*/,
+ XSyncValue /*value*/
+);
+
+extern Status XSyncChangeCounter(
+ Display* /*dpy*/,
+ XSyncCounter /*counter*/,
+ XSyncValue /*value*/
+);
+
+extern Status XSyncDestroyCounter(
+ Display* /*dpy*/,
+ XSyncCounter /*counter*/
+);
+
+extern Status XSyncQueryCounter(
+ Display* /*dpy*/,
+ XSyncCounter /*counter*/,
+ XSyncValue* /*value_return*/
+);
+
+extern Status XSyncAwait(
+ Display* /*dpy*/,
+ XSyncWaitCondition* /*wait_list*/,
+ int /*n_conditions*/
+);
+
+extern XSyncAlarm XSyncCreateAlarm(
+ Display* /*dpy*/,
+ unsigned long /*values_mask*/,
+ XSyncAlarmAttributes* /*values*/
+);
+
+extern Status XSyncDestroyAlarm(
+ Display* /*dpy*/,
+ XSyncAlarm /*alarm*/
+);
+
+extern Status XSyncQueryAlarm(
+ Display* /*dpy*/,
+ XSyncAlarm /*alarm*/,
+ XSyncAlarmAttributes* /*values_return*/
+);
+
+extern Status XSyncChangeAlarm(
+ Display* /*dpy*/,
+ XSyncAlarm /*alarm*/,
+ unsigned long /*values_mask*/,
+ XSyncAlarmAttributes* /*values*/
+);
+
+extern Status XSyncSetPriority(
+ Display* /*dpy*/,
+ XID /*client_resource_id*/,
+ int /*priority*/
+);
+
+extern Status XSyncGetPriority(
+ Display* /*dpy*/,
+ XID /*client_resource_id*/,
+ int* /*return_priority*/
+);
+
+#endif /* _SYNC_SERVER */
+
+_XFUNCPROTOEND
+
+#endif /* _SYNC_H_ */
diff --git a/X11/extensions/syncstr.h b/X11/extensions/syncstr.h
new file mode 100644
index 000000000..4e384f22e
--- /dev/null
+++ b/X11/extensions/syncstr.h
@@ -0,0 +1,494 @@
+/* $Xorg: syncstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1991, 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/extensions/syncstr.h,v 1.3 2003/07/16 01:38:24 dawes Exp $ */
+
+#ifndef _SYNCSTR_H_
+#define _SYNCSTR_H_
+
+#include "sync.h"
+
+#ifndef _SYNC_OS
+
+/* cover up types from sync.h to make sure they're the right size for
+ * protocol packaging. These will be undef'ed after all the protocol
+ * structures are defined.
+ */
+#define XSyncCounter CARD32
+#define XSyncAlarm CARD32
+
+/*
+ * Initialize
+ */
+typedef struct _xSyncInitialize {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD8 majorVersion;
+ CARD8 minorVersion;
+ CARD16 pad B16;
+} xSyncInitializeReq;
+#define sz_xSyncInitializeReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 majorVersion;
+ CARD8 minorVersion;
+ CARD16 pad B16;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncInitializeReply;
+#define sz_xSyncInitializeReply 32
+
+/*
+ * ListSystemCounters
+ */
+typedef struct _xSyncListSystemCounters
+{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+} xSyncListSystemCountersReq;
+#define sz_xSyncListSystemCountersReq 4
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 nCounters B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncListSystemCountersReply;
+#define sz_xSyncListSystemCountersReply 32
+
+typedef struct {
+ XSyncCounter counter B32;
+ INT32 resolution_hi B32;
+ CARD32 resolution_lo B32;
+ CARD16 name_length B16;
+} xSyncSystemCounter;
+#define sz_xSyncSystemCounter 14
+
+/*
+ * Create Counter
+ */
+typedef struct _xSyncCreateCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 initial_value_hi B32;
+ CARD32 initial_value_lo B32;
+} xSyncCreateCounterReq;
+#define sz_xSyncCreateCounterReq 16
+
+/*
+ * Change Counter
+ */
+typedef struct _xSyncChangeCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+} xSyncChangeCounterReq;
+#define sz_xSyncChangeCounterReq 16
+
+/*
+ * Set Counter
+ */
+typedef struct _xSyncSetCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+} xSyncSetCounterReq;
+#define sz_xSyncSetCounterReq 16
+
+/*
+ * Destroy Counter
+ */
+typedef struct _xSyncDestroyCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter counter B32;
+} xSyncDestroyCounterReq;
+#define sz_xSyncDestroyCounterReq 8
+
+/*
+ * Query Counter
+ */
+typedef struct _xSyncQueryCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter counter B32;
+} xSyncQueryCounterReq;
+#define sz_xSyncQueryCounterReq 8
+
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xSyncQueryCounterReply;
+#define sz_xSyncQueryCounterReply 32
+
+/*
+ * Await
+ */
+typedef struct _xSyncAwaitReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+} xSyncAwaitReq;
+#define sz_xSyncAwaitReq 4
+
+typedef struct _xSyncWaitCondition {
+ XSyncCounter counter B32;
+ CARD32 value_type B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ CARD32 test_type B32;
+ INT32 event_threshold_hi B32;
+ CARD32 event_threshold_lo B32;
+} xSyncWaitCondition;
+#define sz_xSyncWaitCondition 28
+
+/*
+ * Create Alarm
+ */
+typedef struct _xSyncCreateAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm id B32;
+ CARD32 valueMask B32;
+} xSyncCreateAlarmReq;
+#define sz_xSyncCreateAlarmReq 12
+
+/*
+ * Destroy Alarm
+ */
+typedef struct _xSyncDestroyAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+} xSyncDestroyAlarmReq;
+#define sz_xSyncDestroyAlarmReq 8
+
+/*
+ * Query Alarm
+ */
+typedef struct _xSyncQueryAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+} xSyncQueryAlarmReq;
+#define sz_xSyncQueryAlarmReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ XSyncCounter counter B32;
+ CARD32 value_type B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ CARD32 test_type B32;
+ INT32 delta_hi B32;
+ CARD32 delta_lo B32;
+ BOOL events;
+ BYTE state;
+ BYTE pad0;
+ BYTE pad1;
+} xSyncQueryAlarmReply;
+#define sz_xSyncQueryAlarmReply 40
+
+/*
+ * Change Alarm
+ */
+typedef struct _xSyncChangeAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+ CARD32 valueMask B32;
+} xSyncChangeAlarmReq;
+#define sz_xSyncChangeAlarmReq 12
+
+/*
+ * SetPriority
+ */
+typedef struct _xSyncSetPriority{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD32 id B32;
+ INT32 priority B32;
+} xSyncSetPriorityReq;
+#define sz_xSyncSetPriorityReq 12
+
+/*
+ * Get Priority
+ */
+typedef struct _xSyncGetPriority{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD32 id B32; /*XXX XID? */
+} xSyncGetPriorityReq;
+#define sz_xSyncGetPriorityReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 priority B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncGetPriorityReply;
+#define sz_xSyncGetPriorityReply 32
+
+/*
+ * Events
+ */
+
+typedef struct _xSyncCounterNotifyEvent {
+ BYTE type;
+ BYTE kind;
+ CARD16 sequenceNumber B16;
+ XSyncCounter counter B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ INT32 counter_value_hi B32;
+ CARD32 counter_value_lo B32;
+ CARD32 time B32;
+ CARD16 count B16;
+ BOOL destroyed;
+ BYTE pad0;
+} xSyncCounterNotifyEvent;
+
+typedef struct _xSyncAlarmNotifyEvent {
+ BYTE type;
+ BYTE kind;
+ CARD16 sequenceNumber B16;
+ XSyncAlarm alarm B32;
+ INT32 counter_value_hi B32;
+ CARD32 counter_value_lo B32;
+ INT32 alarm_value_hi B32;
+ CARD32 alarm_value_lo B32;
+ CARD32 time B32;
+ CARD8 state;
+ BYTE pad0;
+ BYTE pad1;
+ BYTE pad2;
+} xSyncAlarmNotifyEvent;
+
+#undef XSyncCounter
+#undef XSyncAlarm
+
+#endif /* _SYNC_OS */
+
+#ifdef _SYNC_SERVER
+
+#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
+
+typedef struct _SyncCounter {
+ ClientPtr client; /* Owning client. 0 for system counters */
+ XSyncCounter id; /* resource ID */
+ CARD64 value; /* counter value */
+ struct _SyncTriggerList *pTriglist; /* list of triggers */
+ Bool beingDestroyed; /* in process of going away */
+ struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
+} SyncCounter;
+
+/*
+ * The System Counter interface
+ */
+
+typedef enum {
+ XSyncCounterNeverChanges,
+ XSyncCounterNeverIncreases,
+ XSyncCounterNeverDecreases,
+ XSyncCounterUnrestricted
+} SyncCounterType;
+
+typedef struct _SysCounterInfo {
+ char *name;
+ CARD64 resolution;
+ CARD64 bracket_greater;
+ CARD64 bracket_less;
+ SyncCounterType counterType; /* how can this counter change */
+ void (*QueryValue)(
+ pointer /*pCounter*/,
+ CARD64 * /*freshvalue*/
+);
+ void (*BracketValues)(
+ pointer /*pCounter*/,
+ CARD64 * /*lessthan*/,
+ CARD64 * /*greaterthan*/
+);
+} SysCounterInfo;
+
+
+
+typedef struct _SyncTrigger {
+ SyncCounter *pCounter;
+ CARD64 wait_value; /* wait value */
+ unsigned int value_type; /* Absolute or Relative */
+ unsigned int test_type; /* transition or Comparision type */
+ CARD64 test_value; /* trigger event threshold value */
+ Bool (*CheckTrigger)(
+ struct _SyncTrigger * /*pTrigger*/,
+ CARD64 /*newval*/
+ );
+ void (*TriggerFired)(
+ struct _SyncTrigger * /*pTrigger*/
+ );
+ void (*CounterDestroyed)(
+ struct _SyncTrigger * /*pTrigger*/
+ );
+} SyncTrigger;
+
+typedef struct _SyncTriggerList {
+ SyncTrigger *pTrigger;
+ struct _SyncTriggerList *next;
+} SyncTriggerList;
+
+typedef struct _SyncAlarmClientList {
+ ClientPtr client;
+ XID delete_id;
+ struct _SyncAlarmClientList *next;
+} SyncAlarmClientList;
+
+typedef struct _SyncAlarm {
+ SyncTrigger trigger;
+ ClientPtr client;
+ XSyncAlarm alarm_id;
+ CARD64 delta;
+ int events;
+ int state;
+ SyncAlarmClientList *pEventClients;
+} SyncAlarm;
+
+typedef struct {
+ ClientPtr client;
+ CARD32 delete_id;
+ int num_waitconditions;
+} SyncAwaitHeader;
+
+typedef struct {
+ SyncTrigger trigger;
+ CARD64 event_threshold;
+ SyncAwaitHeader *pHeader;
+} SyncAwait;
+
+typedef union {
+ SyncAwaitHeader header;
+ SyncAwait await;
+} SyncAwaitUnion;
+
+
+extern pointer SyncCreateSystemCounter(
+ char * /* name */,
+ CARD64 /* inital_value */,
+ CARD64 /* resolution */,
+ SyncCounterType /* change characterization */,
+ void (* /*QueryValue*/ ) (
+ pointer /* pCounter */,
+ CARD64 * /* pValue_return */), /* XXX prototype */
+ void (* /*BracketValues*/) (
+ pointer /* pCounter */,
+ CARD64 * /* pbracket_less */,
+ CARD64 * /* pbracket_greater */)
+);
+
+extern void SyncChangeCounter(
+ SyncCounter * /* pCounter*/,
+ CARD64 /* new_value */
+);
+
+extern void SyncDestroySystemCounter(
+ pointer pCounter
+);
+extern void InitServertime(void);
+
+#endif /* _SYNC_SERVER */
+
+#endif /* _SYNCSTR_H_ */
diff --git a/X11/extensions/xcmiscproto.pc.in b/X11/extensions/xcmiscproto.pc.in
new file mode 100644
index 000000000..86b030a69
--- /dev/null
+++ b/X11/extensions/xcmiscproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCMiscProto
+Description: XCMisc extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/xcmiscstr.h b/X11/extensions/xcmiscstr.h
new file mode 100644
index 000000000..2aa45e617
--- /dev/null
+++ b/X11/extensions/xcmiscstr.h
@@ -0,0 +1,112 @@
+/* $Xorg: xcmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86$ */
+
+#ifndef _XCMISCSTR_H_
+#define _XCMISCSTR_H_
+
+#define X_XCMiscGetVersion 0
+#define X_XCMiscGetXIDRange 1
+#define X_XCMiscGetXIDList 2
+
+#define XCMiscNumberEvents 0
+
+#define XCMiscNumberErrors 0
+
+#define XCMiscMajorVersion 1
+#define XCMiscMinorVersion 1
+
+#define XCMiscExtensionName "XC-MISC"
+
+typedef struct {
+ CARD8 reqType; /* always XCMiscCode */
+ CARD8 miscReqType; /* always X_XCMiscGetVersion */
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xXCMiscGetVersionReq;
+#define sz_xXCMiscGetVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXCMiscGetVersionReply;
+#define sz_xXCMiscGetVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always XCMiscCode */
+ CARD8 miscReqType; /* always X_XCMiscGetXIDRange */
+ CARD16 length B16;
+} xXCMiscGetXIDRangeReq;
+#define sz_xXCMiscGetXIDRangeReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 start_id B32;
+ CARD32 count B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xXCMiscGetXIDRangeReply;
+#define sz_xXCMiscGetXIDRangeReply 32
+
+typedef struct {
+ CARD8 reqType; /* always XCMiscCode */
+ CARD8 miscReqType; /* always X_XCMiscGetXIDList */
+ CARD16 length B16;
+ CARD32 count B32; /* number of IDs requested */
+} xXCMiscGetXIDListReq;
+#define sz_xXCMiscGetXIDListReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 count B32; /* number of IDs requested */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXCMiscGetXIDListReply;
+#define sz_xXCMiscGetXIDListReply 32
+
+#endif /* _XCMISCSTR_H_ */
diff --git a/X11/extensions/xextproto.pc.in b/X11/extensions/xextproto.pc.in
new file mode 100644
index 000000000..e85200fde
--- /dev/null
+++ b/X11/extensions/xextproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XExtProto
+Description: XExt extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/extensions/xfixesproto.h b/X11/extensions/xfixesproto.h
new file mode 100644
index 000000000..d3899810a
--- /dev/null
+++ b/X11/extensions/xfixesproto.h
@@ -0,0 +1,520 @@
+/*
+ * $XFree86: xc/include/extensions/xfixesproto.h,v 1.1 2002/11/30 06:21:43 keithp Exp $
+ *
+ * Copyright © 2006 Sun Microsystems
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Sun Microsystems not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Sun Microsystems makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _XFIXESPROTO_H_
+#define _XFIXESPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/xfixeswire.h>
+#define _SHAPE_SERVER_
+#include <X11/extensions/shape.h>
+#undef _SHAPE_SERVER_
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define Picture CARD32
+
+/*************** Version 1 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesReq;
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xXFixesQueryVersionReq;
+
+#define sz_xXFixesQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXFixesQueryVersionReply;
+
+#define sz_xXFixesQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ BYTE mode; /* SetModeInsert/SetModeDelete*/
+ BYTE target; /* SaveSetNearest/SaveSetRoot*/
+ BYTE map; /* SaveSetMap/SaveSetUnmap */
+ BYTE pad1;
+ Window window;
+} xXFixesChangeSaveSetReq;
+
+#define sz_xXFixesChangeSaveSetReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+ Atom selection B32;
+ CARD32 eventMask B32;
+} xXFixesSelectSelectionInputReq;
+
+#define sz_xXFixesSelectSelectionInputReq 16
+
+typedef struct {
+ CARD8 type;
+ CARD8 subtype;
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ Window owner B32;
+ Atom selection B32;
+ Time timestamp B32;
+ Time selectionTimestamp B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesSelectionNotifyEvent;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD32 eventMask B32;
+} xXFixesSelectCursorInputReq;
+
+#define sz_xXFixesSelectCursorInputReq 12
+
+typedef struct {
+ CARD8 type;
+ CARD8 subtype;
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ CARD32 cursorSerial B32;
+ Time timestamp;
+ Atom name B32; /* Version 2 */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesCursorNotifyEvent;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesGetCursorImageReq;
+
+#define sz_xXFixesGetCursorImageReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 xhot B16;
+ CARD16 yhot B16;
+ CARD32 cursorSerial B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesGetCursorImageReply;
+
+#define sz_xXFixesGetCursorImageReply 32
+
+/*************** Version 2 ******************/
+
+#define Region CARD32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesCreateRegionReq;
+
+#define sz_xXFixesCreateRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Pixmap bitmap B32;
+} xXFixesCreateRegionFromBitmapReq;
+
+#define sz_xXFixesCreateRegionFromBitmapReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Window window B32;
+ CARD8 kind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xXFixesCreateRegionFromWindowReq;
+
+#define sz_xXFixesCreateRegionFromWindowReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ GContext gc B32;
+} xXFixesCreateRegionFromGCReq;
+
+#define sz_xXFixesCreateRegionFromGCReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Picture picture B32;
+} xXFixesCreateRegionFromPictureReq;
+
+#define sz_xXFixesCreateRegionFromPictureReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesDestroyRegionReq;
+
+#define sz_xXFixesDestroyRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesSetRegionReq;
+
+#define sz_xXFixesSetRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+} xXFixesCopyRegionReq;
+
+#define sz_xXFixesCopyRegionReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source1 B32;
+ Region source2 B32;
+ Region destination B32;
+} xXFixesCombineRegionReq,
+ xXFixesUnionRegionReq,
+ xXFixesIntersectRegionReq,
+ xXFixesSubtractRegionReq;
+
+#define sz_xXFixesCombineRegionReq 16
+#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ Region destination B32;
+} xXFixesInvertRegionReq;
+
+#define sz_xXFixesInvertRegionReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ INT16 dx B16, dy B16;
+} xXFixesTranslateRegionReq;
+
+#define sz_xXFixesTranslateRegionReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+} xXFixesRegionExtentsReq;
+
+#define sz_xXFixesRegionExtentsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesFetchRegionReq;
+
+#define sz_xXFixesFetchRegionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXFixesFetchRegionReply;
+
+#define sz_xXFixesFetchRegionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ GContext gc B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetGCClipRegionReq;
+
+#define sz_xXFixesSetGCClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window dest;
+ BYTE destKind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ INT16 xOff B16, yOff B16;
+ Region region;
+} xXFixesSetWindowShapeRegionReq;
+
+#define sz_xXFixesSetWindowShapeRegionReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetPictureClipRegionReq;
+
+#define sz_xXFixesSetPictureClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesSetCursorNameReq;
+
+#define sz_xXFixesSetCursorNameReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+} xXFixesGetCursorNameReq;
+
+#define sz_xXFixesGetCursorNameReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom atom B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXFixesGetCursorNameReply;
+
+#define sz_xXFixesGetCursorNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesGetCursorImageAndNameReq;
+
+#define sz_xXFixesGetCursorImageAndNameReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 xhot B16;
+ CARD16 yhot B16;
+ CARD32 cursorSerial B32;
+ Atom cursorName B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesGetCursorImageAndNameReply;
+
+#define sz_xXFixesGetCursorImageAndNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ Cursor destination B32;
+} xXFixesChangeCursorReq;
+
+#define sz_xXFixesChangeCursorReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ CARD16 nbytes;
+ CARD16 pad;
+} xXFixesChangeCursorByNameReq;
+
+#define sz_xXFixesChangeCursorByNameReq 12
+
+/*************** Version 3 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+ CARD16 left B16;
+ CARD16 right B16;
+ CARD16 top B16;
+ CARD16 bottom B16;
+} xXFixesExpandRegionReq;
+
+#define sz_xXFixesExpandRegionReq 20
+
+/*************** Version 4.0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+} xXFixesHideCursorReq;
+
+#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+} xXFixesShowCursorReq;
+
+#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq)
+
+#undef Region
+#undef Picture
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _XFIXESPROTO_H_ */
diff --git a/X11/extensions/xfixeswire.h b/X11/extensions/xfixeswire.h
new file mode 100644
index 000000000..e9bb5f5d0
--- /dev/null
+++ b/X11/extensions/xfixeswire.h
@@ -0,0 +1,127 @@
+/*
+ * $XFree86: xc/include/extensions/xfixeswire.h,v 1.1 2002/11/30 06:21:43 keithp Exp $
+ *
+ * Copyright © 2006 Sun Microsystems
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Sun Microsystems not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Sun Microsystems makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifndef _XFIXESWIRE_H_
+#define _XFIXESWIRE_H_
+
+#define XFIXES_NAME "XFIXES"
+#define XFIXES_MAJOR 4
+#define XFIXES_MINOR 0
+
+/*************** Version 1 ******************/
+#define X_XFixesQueryVersion 0
+#define X_XFixesChangeSaveSet 1
+#define X_XFixesSelectSelectionInput 2
+#define X_XFixesSelectCursorInput 3
+#define X_XFixesGetCursorImage 4
+/*************** Version 2 ******************/
+#define X_XFixesCreateRegion 5
+#define X_XFixesCreateRegionFromBitmap 6
+#define X_XFixesCreateRegionFromWindow 7
+#define X_XFixesCreateRegionFromGC 8
+#define X_XFixesCreateRegionFromPicture 9
+#define X_XFixesDestroyRegion 10
+#define X_XFixesSetRegion 11
+#define X_XFixesCopyRegion 12
+#define X_XFixesUnionRegion 13
+#define X_XFixesIntersectRegion 14
+#define X_XFixesSubtractRegion 15
+#define X_XFixesInvertRegion 16
+#define X_XFixesTranslateRegion 17
+#define X_XFixesRegionExtents 18
+#define X_XFixesFetchRegion 19
+#define X_XFixesSetGCClipRegion 20
+#define X_XFixesSetWindowShapeRegion 21
+#define X_XFixesSetPictureClipRegion 22
+#define X_XFixesSetCursorName 23
+#define X_XFixesGetCursorName 24
+#define X_XFixesGetCursorImageAndName 25
+#define X_XFixesChangeCursor 26
+#define X_XFixesChangeCursorByName 27
+/*************** Version 3 ******************/
+#define X_XFixesExpandRegion 28
+/*************** Version 4 ******************/
+#define X_XFixesHideCursor 29
+#define X_XFixesShowCursor 30
+
+#define XFixesNumberRequests (X_XFixesShowCursor+1)
+
+/* Selection events share one event number */
+#define XFixesSelectionNotify 0
+
+/* Within the selection, the 'subtype' field distinguishes */
+#define XFixesSetSelectionOwnerNotify 0
+#define XFixesSelectionWindowDestroyNotify 1
+#define XFixesSelectionClientCloseNotify 2
+
+#define XFixesSetSelectionOwnerNotifyMask (1L << 0)
+#define XFixesSelectionWindowDestroyNotifyMask (1L << 1)
+#define XFixesSelectionClientCloseNotifyMask (1L << 2)
+
+/* There's only one cursor event so far */
+#define XFixesCursorNotify 1
+
+#define XFixesDisplayCursorNotify 0
+
+#define XFixesDisplayCursorNotifyMask (1L << 0)
+
+#define XFixesNumberEvents (2)
+
+/* errors */
+#define BadRegion 0
+#define XFixesNumberErrors (BadRegion+1)
+
+#define SaveSetNearest 0
+#define SaveSetRoot 1
+
+#define SaveSetMap 0
+#define SaveSetUnmap 1
+
+/*************** Version 2 ******************/
+
+#define WindowRegionBounding 0
+#define WindowRegionClip 1
+
+#endif /* _XFIXESWIRE_H_ */
diff --git a/X11/extensions/xtestext1.h b/X11/extensions/xtestext1.h
new file mode 100644
index 000000000..8f49cad07
--- /dev/null
+++ b/X11/extensions/xtestext1.h
@@ -0,0 +1,326 @@
+/* $Xorg: xtestext1.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+ * xtestext1.h
+ *
+ * X11 Input Synthesis Extension include file
+ */
+
+/*
+
+
+Copyright 1986, 1987, 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Hewlett-Packard not be used in
+advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+Hewlett-Packard makes no representations about the
+suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+
+*/
+
+/*
+ * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
+ */
+
+/*
+ * used in the XTestPressButton and XTestPressKey functions
+ */
+#define XTestPRESS 1 << 0
+#define XTestRELEASE 1 << 1
+#define XTestSTROKE 1 << 2
+
+/*
+ * When doing a key or button stroke, the number of milliseconds
+ * to delay between the press and the release of a key or button
+ * in the XTestPressButton and XTestPressKey functions.
+ */
+
+#define XTestSTROKE_DELAY_TIME 10
+
+/*
+ * used in the XTestGetInput function
+ */
+#define XTestEXCLUSIVE 1 << 0
+#define XTestPACKED_ACTIONS 1 << 1
+#define XTestPACKED_MOTION 1 << 2
+
+/*
+ * used in the XTestFakeInput function
+ */
+#define XTestFAKE_ACK_NOT_NEEDED 0
+#define XTestFAKE_ACK_REQUEST 1
+
+/*
+ * used in the XTest extension initialization routine
+ */
+#define XTestEXTENSION_NAME "XTestExtension1"
+#define XTestEVENT_COUNT 2
+
+/*
+ * XTest request type values
+ *
+ * used in the XTest extension protocol requests
+ */
+#define X_TestFakeInput 1
+#define X_TestGetInput 2
+#define X_TestStopInput 3
+#define X_TestReset 4
+#define X_TestQueryInputSize 5
+
+/*
+ * This defines the maximum size of a list of input actions
+ * to be sent to the server. It should always be a multiple of
+ * 4 so that the entire xTestFakeInputReq structure size is a
+ * multiple of 4.
+ */
+#define XTestMAX_ACTION_LIST_SIZE 64
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestFakeInput */
+ CARD16 length B16; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */
+ CARD32 ack B32;
+ CARD8 action_list[XTestMAX_ACTION_LIST_SIZE];
+} xTestFakeInputReq;
+#define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8)
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestGetInput */
+ CARD16 length B16; /* 2 */
+ CARD32 mode B32;
+} xTestGetInputReq;
+#define sz_xTestGetInputReq 8
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestStopInput */
+ CARD16 length B32; /* 1 */
+} xTestStopInputReq;
+#define sz_xTestStopInputReq 4
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestReset */
+ CARD16 length B16; /* 1 */
+} xTestResetReq;
+#define sz_xTestResetReq 4
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestQueryInputSize */
+ CARD16 length B16; /* 1 */
+} xTestQueryInputSizeReq;
+#define sz_xTestQueryInputSizeReq 4
+
+/*
+ * This is the definition of the reply for the xTestQueryInputSize
+ * request. It should remain the same minimum size as other replies
+ * (32 bytes).
+ */
+typedef struct {
+ CARD8 type; /* always X_Reply */
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* always 0 */
+ CARD32 size_return B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xTestQueryInputSizeReply;
+
+/*
+ * This is the definition for the input action wire event structure.
+ * This event is sent to the client when the server has one or
+ * more user input actions to report to the client. It must
+ * remain the same size as all other wire events (32 bytes).
+ */
+#define XTestACTIONS_SIZE 28
+
+typedef struct {
+ CARD8 type; /* always XTestInputActionType */
+ CARD8 pad00;
+ CARD16 sequenceNumber B16;
+ CARD8 actions[XTestACTIONS_SIZE];
+} xTestInputActionEvent;
+
+/*
+ * This is the definition for the xTestFakeAck wire event structure.
+ * This event is sent to the client when the server has completely
+ * processed its input action buffer, and is ready for more.
+ * It must remain the same size as all other wire events (32 bytes).
+ */
+typedef struct {
+ CARD8 type; /* always XTestFakeAckType */
+ CARD8 pad00;
+ CARD16 sequenceNumber B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+ CARD32 pad07 B32;
+ CARD32 pad08 B32;
+} xTestFakeAckEvent;
+
+/*
+ * The server side of this extension does not (and should not) have
+ * definitions for Display and Window. The ifndef allows the server
+ * side of the extension to ignore the following typedefs.
+ */
+#ifndef XTestSERVER_SIDE
+/*
+ * This is the definition for the input action host format event structure.
+ * This is the form that a client using this extension will see when
+ * it receives an input action event.
+ */
+typedef struct {
+ int type; /* always XTestInputActionType */
+ Display *display;
+ Window window;
+ CARD8 actions[XTestACTIONS_SIZE];
+} XTestInputActionEvent;
+
+/*
+ * This is the definition for the xTestFakeAck host format event structure.
+ * This is the form that a client using this extension will see when
+ * it receives an XTestFakeAck event.
+ */
+typedef struct {
+ int type; /* always XTestFakeAckType */
+ Display *display;
+ Window window;
+} XTestFakeAckEvent;
+#endif
+
+/*
+ * This is the definition for the format of the header byte
+ * in the input action structures.
+ */
+#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */
+#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */
+#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */
+#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */
+#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */
+
+#define XTestMAX_DEVICE_ID 0x0f
+#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4)
+#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4)
+
+/*
+ * These are the possible action types.
+ */
+#define XTestDELAY_ACTION 0
+#define XTestKEY_ACTION 1
+#define XTestMOTION_ACTION 2
+#define XTestJUMP_ACTION 3
+
+/*
+ * These are the definitions for key/button motion input actions.
+ */
+#define XTestKEY_UP 0x04
+#define XTestKEY_DOWN 0x00
+
+typedef struct {
+ CARD8 header; /* which device, key up/down */
+ CARD8 keycode; /* which key/button to move */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestKeyInfo;
+
+/*
+ * This is the definition for pointer jump input actions.
+ */
+typedef struct {
+ CARD8 header; /* which pointer */
+ CARD8 pad1; /* unused padding byte */
+ CARD16 jumpx B16; /* x coord to jump to */
+ CARD16 jumpy B16; /* y coord to jump to */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestJumpInfo;
+
+/*
+ * These are the definitions for pointer relative motion input
+ * actions.
+ *
+ * The sign bits for the x and y relative motions are contained
+ * in the header byte. The x and y relative motions are packed
+ * into one byte to make things fit in 32 bits. If the relative
+ * motion range is larger than +/-15, use the pointer jump action.
+ */
+#define XTestMOTION_MAX 15
+#define XTestMOTION_MIN -15
+
+#define XTestX_NEGATIVE 0x04
+#define XTestY_NEGATIVE 0x08
+
+#define XTestX_MOTION_MASK 0x0f
+#define XTestY_MOTION_MASK 0xf0
+
+#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
+#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK)
+
+#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
+#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4)
+
+typedef struct {
+ CARD8 header; /* which pointer */
+ CARD8 motion_data; /* x,y relative motion */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestMotionInfo;
+
+/*
+ * These are the definitions for a long delay input action. It is
+ * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
+ * (approximately one minute) is needed.
+ *
+ * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
+ * This guarantees that a header byte with a value of 0 is not
+ * a valid header, so it can be used as a flag to indicate that
+ * there are no more input actions in an XTestInputAction event.
+ */
+
+#define XTestSHORT_DELAY_TIME 0xffff
+#define XTestDELAY_DEVICE_ID 0x0f
+
+typedef struct {
+ CARD8 header; /* always XTestDELAY_DEVICE_ID */
+ CARD8 pad1; /* unused padding byte */
+ CARD16 pad2 B16; /* unused padding word */
+ CARD32 delay_time B32; /* how long to delay (in ms) */
+} XTestDelayInfo;
diff --git a/X11/extensions/xteststr.h b/X11/extensions/xteststr.h
new file mode 100644
index 000000000..a196b775d
--- /dev/null
+++ b/X11/extensions/xteststr.h
@@ -0,0 +1,120 @@
+/* $Xorg: xteststr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1992, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifndef _XTESTSTR_H_
+#define _XTESTSTR_H_
+
+#define Window CARD32
+#define Time CARD32
+#define Cursor CARD32
+
+#define XTestCurrentCursor ((Cursor)1)
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestGetVersion */
+ CARD16 length B16;
+ CARD8 majorVersion;
+ CARD8 pad;
+ CARD16 minorVersion B16;
+} xXTestGetVersionReq;
+#define sz_xXTestGetVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 majorVersion;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 minorVersion B16;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXTestGetVersionReply;
+#define sz_xXTestGetVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestCompareCursor */
+ CARD16 length B16;
+ Window window B32;
+ Cursor cursor B32;
+} xXTestCompareCursorReq;
+#define sz_xXTestCompareCursorReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL same;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXTestCompareCursorReply;
+#define sz_xXTestCompareCursorReply 32
+
+/* used only on the client side */
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestFakeInput */
+ CARD16 length B16;
+ BYTE type;
+ BYTE detail;
+ CARD16 pad0 B16;
+ Time time B32;
+ Window root B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ INT16 rootX B16, rootY B16;
+ CARD32 pad3 B32;
+ CARD16 pad4 B16;
+ CARD8 pad5;
+ CARD8 deviceid;
+} xXTestFakeInputReq;
+#define sz_xXTestFakeInputReq 36
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestGrabControl */
+ CARD16 length B16;
+ BOOL impervious;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+} xXTestGrabControlReq;
+#define sz_xXTestGrabControlReq 8
+
+#undef Window
+#undef Time
+#undef Cursor
+
+#endif /* _XTESTSTR_H_ */
diff --git a/X11/fonts/COPYING b/X11/fonts/COPYING
new file mode 100644
index 000000000..eac45aaed
--- /dev/null
+++ b/X11/fonts/COPYING
@@ -0,0 +1,86 @@
+Copyright 1990, 1991 Network Computing Devices;
+Portions Copyright 1987 by Digital Equipment Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of Network Computing Devices or Digital
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+Network Computing Devices and Digital make no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+
+Copyright 1990, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
diff --git a/X11/fonts/ChangeLog b/X11/fonts/ChangeLog
new file mode 100644
index 000000000..c722b519a
--- /dev/null
+++ b/X11/fonts/ChangeLog
@@ -0,0 +1,4 @@
+2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+
+ * configure.ac:
+ Update package version number for final X11R7 release candidate.
diff --git a/X11/fonts/FS.h b/X11/fonts/FS.h
new file mode 100644
index 000000000..e90752233
--- /dev/null
+++ b/X11/fonts/FS.h
@@ -0,0 +1,132 @@
+/* $Xorg: FS.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
+
+/*
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * Network Computing Devices and Digital make no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+/*
+
+Portions Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/include/fonts/FS.h,v 1.9 2003/07/09 15:27:28 tsi Exp $ */
+
+#ifndef _FS_H_
+#define _FS_H_
+
+#include <X11/Xdefs.h>
+#include <X11/fonts/fsmasks.h>
+
+#define FS_PROTOCOL 2
+#define FS_PROTOCOL_MINOR 0
+
+#ifndef X_PROTOCOL
+/* protocol familes */
+#define FamilyInternet 0
+#define FamilyDECnet 1
+#define FamilyChaos 2
+#define FamilyInternet6 6
+
+
+typedef unsigned int FSDrawDirection;
+#endif
+
+#ifndef None
+#define None 0L
+#endif
+
+#define LeftToRightDrawDirection 0
+#define RightToLeftDrawDirection 1
+
+/* font info flags */
+#define FontInfoAllCharsExist (1L << 0)
+#define FontInfoInkInside (1L << 1)
+#define FontInfoHorizontalOverlap (1L << 2)
+
+/* auth status flags */
+#define AuthSuccess 0
+#define AuthContinue 1
+#define AuthBusy 2
+#define AuthDenied 3
+
+/* property types */
+#define PropTypeString 0
+#define PropTypeUnsigned 1
+#define PropTypeSigned 2
+
+#ifndef LSBFirst
+/* byte order */
+#define LSBFirst 0
+#define MSBFirst 1
+#endif
+
+/* event masks */
+#define CatalogueChangeNotifyMask (1L << 0)
+#define FontChangeNotifyMask (1L << 1)
+
+/* errors */
+#define FSSuccess -1
+#define FSBadRequest 0
+#define FSBadFormat 1
+#define FSBadFont 2
+#define FSBadRange 3
+#define FSBadEventMask 4
+#define FSBadAccessContext 5
+#define FSBadIDChoice 6
+#define FSBadName 7
+#define FSBadResolution 8
+#define FSBadAlloc 9
+#define FSBadLength 10
+#define FSBadImplementation 11
+
+#define FirstExtensionError 128
+#define LastExtensionError 255
+
+/* events */
+#define KeepAlive 0
+#define CatalogueChangeNotify 1
+#define FontChangeNotify 2
+#define FSLASTEvent 3
+
+#endif /* _FS_H_ */
diff --git a/X11/fonts/FSproto.h b/X11/fonts/FSproto.h
new file mode 100644
index 000000000..03b28089f
--- /dev/null
+++ b/X11/fonts/FSproto.h
@@ -0,0 +1,816 @@
+/* $Xorg: FSproto.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */
+/*
+
+Copyright 1990, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices, or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ *
+ * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+/* $XFree86: xc/include/fonts/FSproto.h,v 1.2 2001/08/01 00:44:37 tsi Exp $ */
+
+#ifndef _FS_PROTO_H_
+#define _FS_PROTO_H_
+
+#include <X11/fonts/FS.h>
+
+#define sz_fsPropOffset 20
+#define sz_fsPropInfo 8
+#define sz_fsResolution 6
+
+#define sz_fsChar2b 2
+#define sz_fsChar2b_version1 2
+#define sz_fsOffset32 8
+#define sz_fsRange 4
+
+#define sz_fsXCharInfo 12
+#define sz_fsXFontInfoHeader 40
+
+#define sz_fsConnClientPrefix 8
+#define sz_fsConnSetup 12
+#define sz_fsConnSetupExtra 8
+#define sz_fsConnSetupAccept 12
+
+/* request sizes */
+#define sz_fsReq 4
+#define sz_fsListExtensionsReq 4
+#define sz_fsResourceReq 8
+
+#define sz_fsNoopReq 4
+#define sz_fsListExtensionReq 4
+#define sz_fsQueryExtensionReq 4
+#define sz_fsListCataloguesReq 12
+#define sz_fsSetCataloguesReq 4
+#define sz_fsGetCataloguesReq 4
+#define sz_fsSetEventMaskReq 8
+#define sz_fsGetEventMaskReq 4
+#define sz_fsCreateACReq 8
+#define sz_fsFreeACReq 8
+#define sz_fsSetAuthorizationReq 8
+#define sz_fsSetResolutionReq 4
+#define sz_fsGetResolutionReq 4
+#define sz_fsListFontsReq 12
+#define sz_fsListFontsWithXInfoReq 12
+#define sz_fsOpenBitmapFontReq 16
+#define sz_fsQueryXInfoReq 8
+#define sz_fsQueryXExtents8Req 12
+#define sz_fsQueryXExtents16Req 12
+#define sz_fsQueryXBitmaps8Req 16
+#define sz_fsQueryXBitmaps16Req 16
+#define sz_fsCloseReq 8
+
+/* reply sizes */
+#define sz_fsReply 8
+#define sz_fsGenericReply 8
+
+#define sz_fsListExtensionsReply 8
+#define sz_fsQueryExtensionReply 20
+#define sz_fsListCataloguesReply 16
+#define sz_fsGetCataloguesReply 8
+#define sz_fsGetEventMaskReply 12
+#define sz_fsCreateACReply 12
+#define sz_fsGetResolutionReply 8
+#define sz_fsListFontsReply 16
+#define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader)
+#define sz_fsOpenBitmapFontReply 16
+#define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader)
+#define sz_fsQueryXExtents8Reply 12
+#define sz_fsQueryXExtents16Reply 12
+#define sz_fsQueryXBitmaps8Reply 20
+#define sz_fsQueryXBitmaps16Reply 20
+
+#define sz_fsError 16
+#define sz_fsEvent 12
+#define sz_fsKeepAliveEvent 12
+
+#define fsTrue 1
+#define fsFalse 0
+
+/* temp decls */
+#define Mask CARD32
+#define Font CARD32
+#define AccContext CARD32
+
+typedef CARD32 fsTimestamp;
+
+#ifdef NOTDEF /* in fsmasks.h */
+typedef CARD32 fsBitmapFormat;
+typedef CARD32 fsBitmapFormatMask;
+#endif
+
+#define sz_fsBitmapFormat 4
+
+typedef struct {
+ INT16 left B16,
+ right B16;
+ INT16 width B16;
+ INT16 ascent B16,
+ descent B16;
+ CARD16 attributes B16;
+} fsXCharInfo;
+
+typedef struct {
+ CARD8 high;
+ CARD8 low;
+} fsChar2b;
+
+typedef struct {
+ CARD8 low;
+ CARD8 high;
+} fsChar2b_version1;
+
+typedef struct {
+ CARD8 min_char_high;
+ CARD8 min_char_low;
+ CARD8 max_char_high;
+ CARD8 max_char_low;
+} fsRange;
+
+typedef struct {
+ CARD32 position B32;
+ CARD32 length B32;
+} fsOffset32;
+
+typedef struct {
+ fsOffset32 name;
+ fsOffset32 value;
+ CARD8 type;
+ BYTE pad0;
+ CARD16 pad1 B16;
+} fsPropOffset;
+
+typedef struct {
+ CARD32 num_offsets B32;
+ CARD32 data_len B32;
+ /* offsets */
+ /* data */
+} fsPropInfo;
+
+typedef struct {
+ CARD16 x_resolution B16;
+ CARD16 y_resolution B16;
+ CARD16 point_size B16;
+} fsResolution;
+
+
+typedef struct {
+ CARD32 flags B32;
+ CARD8 char_range_min_char_high;
+ CARD8 char_range_min_char_low;
+ CARD8 char_range_max_char_high;
+ CARD8 char_range_max_char_low;
+
+ CARD8 draw_direction;
+ CARD8 pad;
+ CARD8 default_char_high;
+ CARD8 default_char_low;
+ INT16 min_bounds_left B16;
+ INT16 min_bounds_right B16;
+
+ INT16 min_bounds_width B16;
+ INT16 min_bounds_ascent B16;
+ INT16 min_bounds_descent B16;
+ CARD16 min_bounds_attributes B16;
+
+ INT16 max_bounds_left B16;
+ INT16 max_bounds_right B16;
+ INT16 max_bounds_width B16;
+ INT16 max_bounds_ascent B16;
+
+ INT16 max_bounds_descent B16;
+ CARD16 max_bounds_attributes B16;
+ INT16 font_ascent B16;
+ INT16 font_descent B16;
+ /* propinfo */
+} fsXFontInfoHeader;
+
+
+/* requests */
+
+typedef struct {
+ BYTE byteOrder;
+ CARD8 num_auths;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD16 auth_len B16;
+ /* auth data */
+} fsConnClientPrefix;
+
+typedef struct {
+ CARD16 status B16;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD8 num_alternates;
+ CARD8 auth_index;
+ CARD16 alternate_len B16;
+ CARD16 auth_len B16;
+ /* alternates */
+ /* auth data */
+} fsConnSetup;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* more auth data */
+} fsConnSetupExtra;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 max_request_len B16;
+ CARD16 vendor_len B16;
+ CARD32 release_number B32;
+ /* vendor string */
+} fsConnSetupAccept;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+} fsReq;
+
+/*
+ * The fsFakeReq structure is never used in the protocol; it is prepended
+ * to incoming packets when setting up a connection so we can index
+ * through InitialVector. To avoid alignment problems, it is padded
+ * to the size of a word on the largest machine this code runs on.
+ * Hence no sz_fsFakeReq constant is necessary.
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+ CARD32 pad B32; /* to fill out to multiple of 64 bits */
+} fsFakeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font id B32;
+} fsResourceReq;
+
+typedef fsReq fsNoopReq;
+typedef fsReq fsListExtensionsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE nbytes;
+ CARD16 length B16;
+ /* name */
+} fsQueryExtensionReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+ CARD32 maxNames B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ /* pattern */
+} fsListCataloguesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_catalogues;
+ CARD16 length B16;
+ /* catalogues */
+} fsSetCataloguesReq;
+
+typedef fsReq fsGetCataloguesReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ext_opcode;
+ CARD16 length B16;
+ Mask event_mask;
+} fsSetEventMaskReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ext_opcode;
+ CARD16 length B16;
+} fsGetEventMaskReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_auths;
+ CARD16 length B16;
+ AccContext acid B32;
+ /* auth protocols */
+} fsCreateACReq;
+
+typedef fsResourceReq fsFreeACReq;
+typedef fsResourceReq fsSetAuthorizationReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_resolutions;
+ CARD16 length B16;
+ /* resolutions */
+} fsSetResolutionReq;
+
+typedef fsReq fsGetResolutionReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 maxNames B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ /* pattern */
+} fsListFontsReq;
+
+typedef fsListFontsReq fsListFontsWithXInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font fid B32;
+ fsBitmapFormatMask format_mask B32;
+ fsBitmapFormat format_hint B32;
+ /* pattern */
+} fsOpenBitmapFontReq;
+
+typedef fsResourceReq fsQueryXInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL range;
+ CARD16 length B16;
+ Font fid B32;
+ CARD32 num_ranges B32;
+ /* list of chars */
+} fsQueryXExtents8Req;
+
+typedef fsQueryXExtents8Req fsQueryXExtents16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL range;
+ CARD16 length B16;
+ Font fid B32;
+ fsBitmapFormat format B32;
+ CARD32 num_ranges B32;
+ /* list of chars */
+} fsQueryXBitmaps8Req;
+
+typedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req;
+
+typedef fsResourceReq fsCloseReq;
+
+
+/* replies */
+typedef struct {
+ BYTE type;
+ BYTE data1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+} fsGenericReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 nExtensions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* extension names */
+} fsListExtensionsReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 present;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 num_events;
+ CARD8 first_error;
+ CARD8 num_errors;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} fsQueryExtensionReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_replies B32;
+ CARD32 num_catalogues B32;
+ /* catalog names */
+} fsListCataloguesReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 num_catalogues;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* catalogue names */
+} fsGetCataloguesReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 event_mask B32;
+} fsGetEventMaskReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 auth_index;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* auth data */
+} fsCreateACReply;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* auth data */
+} fsCreateACExtraReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 num_resolutions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* resolutions */
+} fsGetResolutionReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 following B32;
+ CARD32 nFonts B32;
+ /* font names */
+} fsListFontsReply;
+
+/*
+ * this one is messy. the reply itself is variable length (unknown
+ * number of replies) and the contents of each is variable (unknown
+ * number of properties)
+ *
+ */
+
+typedef struct {
+ BYTE type;
+ CARD8 nameLength; /* 0 is end-of-reply */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nReplies B32;
+ CARD32 font_header_flags B32;
+ CARD8 font_hdr_char_range_min_char_high;
+ CARD8 font_hdr_char_range_min_char_low;
+ CARD8 font_hdr_char_range_max_char_high;
+ CARD8 font_hdr_char_range_max_char_low;
+ CARD8 font_header_draw_direction;
+ CARD8 font_header_pad;
+ CARD8 font_header_default_char_high;
+ CARD8 font_header_default_char_low;
+ INT16 font_header_min_bounds_left B16;
+ INT16 font_header_min_bounds_right B16;
+ INT16 font_header_min_bounds_width B16;
+ INT16 font_header_min_bounds_ascent B16;
+ INT16 font_header_min_bounds_descent B16;
+ CARD16 font_header_min_bounds_attributes B16;
+ INT16 font_header_max_bounds_left B16;
+ INT16 font_header_max_bounds_right B16;
+ INT16 font_header_max_bounds_width B16;
+ INT16 font_header_max_bounds_ascent B16;
+ INT16 font_header_max_bounds_descent B16;
+ CARD16 font_header_max_bounds_attributes B16;
+ INT16 font_header_font_ascent B16;
+ INT16 font_header_font_descent B16;
+ /* propinfo */
+ /* name */
+} fsListFontsWithXInfoReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 otherid_valid;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 otherid B32;
+ BYTE cachable;
+ BYTE pad1;
+ CARD16 pad2 B16;
+} fsOpenBitmapFontReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 font_header_flags B32;
+ CARD8 font_hdr_char_range_min_char_high;
+ CARD8 font_hdr_char_range_min_char_low;
+ CARD8 font_hdr_char_range_max_char_high;
+ CARD8 font_hdr_char_range_max_char_low;
+ CARD8 font_header_draw_direction;
+ CARD8 font_header_pad;
+ CARD8 font_header_default_char_high;
+ CARD8 font_header_default_char_low;
+ INT16 font_header_min_bounds_left B16;
+ INT16 font_header_min_bounds_right B16;
+ INT16 font_header_min_bounds_width B16;
+ INT16 font_header_min_bounds_ascent B16;
+ INT16 font_header_min_bounds_descent B16;
+ CARD16 font_header_min_bounds_attributes B16;
+ INT16 font_header_max_bounds_left B16;
+ INT16 font_header_max_bounds_right B16;
+ INT16 font_header_max_bounds_width B16;
+ INT16 font_header_max_bounds_ascent B16;
+ INT16 font_header_max_bounds_descent B16;
+ CARD16 font_header_max_bounds_attributes B16;
+ INT16 font_header_font_ascent B16;
+ INT16 font_header_font_descent B16;
+ /* propinfo */
+} fsQueryXInfoReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_extents B32;
+ /* extents */
+} fsQueryXExtents8Reply;
+
+typedef fsQueryXExtents8Reply fsQueryXExtents16Reply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 replies_hint B32;
+ CARD32 num_chars B32;
+ CARD32 nbytes B32;
+ /* offsets */
+ /* glyphs */
+} fsQueryXBitmaps8Reply;
+
+typedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply;
+
+typedef union {
+ fsGenericReply generic;
+ fsListExtensionsReply extensions;
+ fsGetResolutionReply getres;
+} fsReply;
+
+/* errors */
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsRequestError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ fsBitmapFormat format B32;
+} fsFormatError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Font fontid;
+} fsFontError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ fsRange range;
+} fsRangeError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Mask event_mask;
+} fsEventMaskError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ AccContext acid;
+} fsAccessContextError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Font fontid;
+} fsIDChoiceError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsNameError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ fsResolution resolution;
+} fsResolutionError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsAllocError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ CARD32 bad_length B32;
+} fsLengthError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsImplementationError;
+
+/* events */
+typedef struct {
+ BYTE type;
+ BYTE event_code;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+} fsKeepAliveEvent;
+
+typedef struct {
+ BYTE type;
+ BYTE event_code;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ BOOL added;
+ BOOL deleted;
+ CARD16 pad B16;
+} fsCatalogueChangeNotifyEvent;
+
+typedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent;
+
+typedef fsCatalogueChangeNotifyEvent fsEvent;
+
+/* reply codes */
+#define FS_Reply 0 /* normal reply */
+#define FS_Error 1 /* error */
+#define FS_Event 2
+
+/* request codes */
+#define FS_Noop 0
+#define FS_ListExtensions 1
+#define FS_QueryExtension 2
+#define FS_ListCatalogues 3
+#define FS_SetCatalogues 4
+#define FS_GetCatalogues 5
+#define FS_SetEventMask 6
+#define FS_GetEventMask 7
+#define FS_CreateAC 8
+#define FS_FreeAC 9
+#define FS_SetAuthorization 10
+#define FS_SetResolution 11
+#define FS_GetResolution 12
+#define FS_ListFonts 13
+#define FS_ListFontsWithXInfo 14
+#define FS_OpenBitmapFont 15
+#define FS_QueryXInfo 16
+#define FS_QueryXExtents8 17
+#define FS_QueryXExtents16 18
+#define FS_QueryXBitmaps8 19
+#define FS_QueryXBitmaps16 20
+#define FS_CloseFont 21
+
+/* restore decls */
+#undef Mask
+#undef Font
+#undef AccContext
+
+#endif /* _FS_PROTO_H_ */
diff --git a/X11/fonts/Makefile.am b/X11/fonts/Makefile.am
new file mode 100644
index 000000000..c207a03b3
--- /dev/null
+++ b/X11/fonts/Makefile.am
@@ -0,0 +1,13 @@
+fontsdir = $(includedir)/X11/fonts
+fonts_HEADERS = \
+ font.h \
+ fontproto.h \
+ fontstruct.h \
+ FS.h \
+ fsmasks.h \
+ FSproto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontsproto.pc
+
+EXTRA_DIST = autogen.sh fontsproto.pc.in
diff --git a/X11/fonts/Makefile.in b/X11/fonts/Makefile.in
new file mode 100644
index 000000000..9bae52072
--- /dev/null
+++ b/X11/fonts/Makefile.in
@@ -0,0 +1,439 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+fontsdir = $(includedir)/X11/fonts
+fonts_HEADERS = \
+ font.h \
+ fontproto.h \
+ fontstruct.h \
+ FS.h \
+ fsmasks.h \
+ FSproto.h
+
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontsproto.pc
+
+EXTRA_DIST = autogen.sh fontsproto.pc.in
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES = fontsproto.pc
+DIST_SOURCES =
+DATA = $(pkgconfig_DATA)
+
+HEADERS = $(fonts_HEADERS)
+
+DIST_COMMON = $(fonts_HEADERS) $(srcdir)/Makefile.in \
+ $(srcdir)/configure COPYING ChangeLog Makefile.am aclocal.m4 \
+ configure configure.ac fontsproto.pc.in install-sh missing \
+ mkinstalldirs
+all: all-am
+
+.SUFFIXES:
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.ac
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+fontsproto.pc: $(top_builddir)/config.status fontsproto.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f"; \
+ $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(pkgconfigdir)/$$f"; \
+ rm -f $(DESTDIR)$(pkgconfigdir)/$$f; \
+ done
+fontsHEADERS_INSTALL = $(INSTALL_HEADER)
+install-fontsHEADERS: $(fonts_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(fontsdir)
+ @list='$(fonts_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(fontsHEADERS_INSTALL) $$d$$p $(DESTDIR)$(fontsdir)/$$f"; \
+ $(fontsHEADERS_INSTALL) $$d$$p $(DESTDIR)$(fontsdir)/$$f; \
+ done
+
+uninstall-fontsHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(fonts_HEADERS)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(fontsdir)/$$f"; \
+ rm -f $(DESTDIR)$(fontsdir)/$$f; \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkinstalldirs) $(distdir)/.
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(fontsdir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-fontsHEADERS install-pkgconfigDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-fontsHEADERS uninstall-info-am \
+ uninstall-pkgconfigDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic ctags \
+ dist dist-all dist-bzip2 dist-gzip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-fontsHEADERS install-info install-info-am install-man \
+ install-pkgconfigDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-fontsHEADERS uninstall-info-am \
+ uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/X11/fonts/aclocal.m4 b/X11/fonts/aclocal.m4
new file mode 100644
index 000000000..50595c27e
--- /dev/null
+++ b/X11/fonts/aclocal.m4
@@ -0,0 +1,879 @@
+# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.7.9])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
+
+AC_DEFUN([XORG_RELEASE_VERSION],[
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+])
+
diff --git a/X11/fonts/autogen.sh b/X11/fonts/autogen.sh
new file mode 100644
index 000000000..904cd6746
--- /dev/null
+++ b/X11/fonts/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/X11/fonts/configure b/X11/fonts/configure
new file mode 100644
index 000000000..d57cc806d
--- /dev/null
+++ b/X11/fonts/configure
@@ -0,0 +1,2587 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for FontsProto 2.0.2.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='FontsProto'
+PACKAGE_TARNAME='fontsproto'
+PACKAGE_VERSION='2.0.2'
+PACKAGE_STRING='FontsProto 2.0.2'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures FontsProto 2.0.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of FontsProto 2.0.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+FontsProto configure 2.0.2
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by FontsProto $as_me 2.0.2, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.7"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='fontsproto'
+ VERSION='2.0.2'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+
+
+# Check whether --with-release-version or --without-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval="$with_release_version"
+ RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi;
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+
+ ac_config_files="$ac_config_files Makefile fontsproto.pc"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by FontsProto $as_me 2.0.2, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+FontsProto config.status 2.0.2
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "fontsproto.pc" ) CONFIG_FILES="$CONFIG_FILES fontsproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/X11/fonts/configure.ac b/X11/fonts/configure.ac
new file mode 100644
index 000000000..a17a47b5a
--- /dev/null
+++ b/X11/fonts/configure.ac
@@ -0,0 +1,8 @@
+AC_PREREQ([2.57])
+AC_INIT([FontsProto], [2.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile
+ fontsproto.pc])
diff --git a/X11/fonts/font.h b/X11/fonts/font.h
new file mode 100644
index 000000000..e6a00cddb
--- /dev/null
+++ b/X11/fonts/font.h
@@ -0,0 +1,169 @@
+/* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */
+/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
+
+#ifndef FONT_H
+#define FONT_H
+
+#ifndef BitmapFormatByteOrderMask
+#include "fsmasks.h"
+#endif
+
+/* data structures */
+#ifndef _XTYPEDEF_FONTPTR
+typedef struct _Font *FontPtr;
+#define _XTYPEDEF_FONTPTR
+#endif
+
+typedef struct _FontInfo *FontInfoPtr;
+typedef struct _FontProp *FontPropPtr;
+typedef struct _ExtentInfo *ExtentInfoPtr;
+typedef struct _FontPathElement *FontPathElementPtr;
+
+#ifndef _XTYPEDEF_CHARINFOPTR
+typedef struct _CharInfo *CharInfoPtr;
+#define _XTYPEDEF_CHARINFOPTR
+#endif
+
+typedef struct _FontNames *FontNamesPtr;
+typedef struct _FontResolution *FontResolutionPtr;
+
+#define NullCharInfo ((CharInfoPtr) 0)
+#define NullFont ((FontPtr) 0)
+#define NullFontInfo ((FontInfoPtr) 0)
+
+ /* draw direction */
+#define LeftToRight 0
+#define RightToLeft 1
+#define BottomToTop 2
+#define TopToBottom 3
+typedef int DrawDirection;
+
+#define NO_SUCH_CHAR -1
+
+
+#define FontAliasType 0x1000
+
+#define AllocError 80
+#define StillWorking 81
+#define FontNameAlias 82
+#define BadFontName 83
+#define Suspended 84
+#define Successful 85
+#define BadFontPath 86
+#define BadCharRange 87
+#define BadFontFormat 88
+#define FPEResetFailed 89 /* for when an FPE reset won't work */
+
+/* OpenFont flags */
+#define FontLoadInfo 0x0001
+#define FontLoadProps 0x0002
+#define FontLoadMetrics 0x0004
+#define FontLoadBitmaps 0x0008
+#define FontLoadAll 0x000f
+#define FontOpenSync 0x0010
+#define FontReopen 0x0020
+
+/* Query flags */
+#define LoadAll 0x1
+#define FinishRamge 0x2
+#define EightBitFont 0x4
+#define SixteenBitFont 0x8
+
+/* Glyph Caching Modes */
+#define CACHING_OFF 0
+#define CACHE_16_BIT_GLYPHS 1
+#define CACHE_ALL_GLYPHS 2
+#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
+extern int glyphCachingMode;
+
+struct _Client;
+
+extern int StartListFontsWithInfo(
+ struct _Client * /*client*/,
+ int /*length*/,
+ unsigned char * /*pattern*/,
+ int /*max_names*/
+);
+
+extern FontNamesPtr MakeFontNamesRecord(
+ unsigned /* size */
+);
+
+extern void FreeFontNames(
+ FontNamesPtr /* pFN*/
+);
+
+extern int AddFontNamesName(
+ FontNamesPtr /* names */,
+ char * /* name */,
+ int /* length */
+);
+
+#if 0 /* unused */
+extern int FontToFSError();
+extern FontResolutionPtr GetClientResolution();
+#endif
+
+typedef struct _FontPatternCache *FontPatternCachePtr;
+
+extern FontPatternCachePtr MakeFontPatternCache (
+ void
+);
+
+extern void FreeFontPatternCache (
+ FontPatternCachePtr /* cache */
+);
+
+extern void EmptyFontPatternCache (
+ FontPatternCachePtr /* cache */
+);
+
+extern void CacheFontPattern (
+ FontPatternCachePtr /* cache */,
+ char * /* pattern */,
+ int /* patlen */,
+ FontPtr /* pFont */
+);
+extern FontResolutionPtr GetClientResolutions(
+ int * /* num */
+);
+
+extern FontPtr FindCachedFontPattern (
+ FontPatternCachePtr /* cache */,
+ char * /* pattern */,
+ int /* patlen */
+);
+
+extern void RemoveCachedFontPattern (
+ FontPatternCachePtr /* cache */,
+ FontPtr /* pFont */
+);
+
+typedef enum {
+ Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
+} FontEncoding;
+
+#endif /* FONT_H */
diff --git a/X11/fonts/fontproto.h b/X11/fonts/fontproto.h
new file mode 100644
index 000000000..83c9a00c0
--- /dev/null
+++ b/X11/fonts/fontproto.h
@@ -0,0 +1,93 @@
+/* $XFree86: xc/include/fonts/fontproto.h,v 1.2 1999/09/04 09:14:08 dawes Exp $ */
+
+/***********************************************************
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
+
+*/
+#ifndef _FONTPROTO_H
+#define _FONTPROTO_H
+
+/* Externally provided functions required by libXfont */
+
+extern int RegisterFPEFunctions ( NameCheckFunc name_func,
+ InitFpeFunc init_func,
+ FreeFpeFunc free_func,
+ ResetFpeFunc reset_func,
+ OpenFontFunc open_func,
+ CloseFontFunc close_func,
+ ListFontsFunc list_func,
+ StartLfwiFunc start_lfwi_func,
+ NextLfwiFunc next_lfwi_func,
+ WakeupFpeFunc wakeup_func,
+ ClientDiedFunc client_died,
+ LoadGlyphsFunc load_glyphs,
+ StartLaFunc start_list_alias_func,
+ NextLaFunc next_list_alias_func,
+ SetPathFunc set_path_func);
+
+extern int GetDefaultPointSize ( void );
+
+extern int init_fs_handlers ( FontPathElementPtr fpe,
+ BlockHandlerProcPtr block_handler);
+extern void remove_fs_handlers ( FontPathElementPtr fpe,
+ BlockHandlerProcPtr block_handler,
+ Bool all );
+
+extern int client_auth_generation ( ClientPtr client );
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern Bool ClientSignal ( ClientPtr client );
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern void DeleteFontClientID ( Font id );
+extern Font GetNewFontClientID ( void );
+extern int StoreFontClientFont ( FontPtr pfont, Font id );
+extern void FontFileRegisterFpeFunctions ( void );
+extern void FontFileCheckRegisterFpeFunctions ( void );
+
+extern Bool XpClientIsBitmapClient ( ClientPtr client );
+extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe );
+extern void PrinterFontRegisterFpeFunctions ( void );
+
+extern void fs_register_fpe_functions ( void );
+extern void check_fs_register_fpe_functions ( void );
+
+/* util/private.c */
+extern FontPtr CreateFontRec (void);
+extern void DestroyFontRec (FontPtr font);
+extern Bool _FontSetNewPrivate (FontPtr /* pFont */,
+ int /* n */,
+ pointer /* ptr */);
+extern int AllocateFontPrivateIndex (void);
+extern void ResetFontPrivateIndex (void);
+
+/* Type1/t1funcs.c */
+extern void Type1RegisterFontFileFunctions(void);
+extern void CIDRegisterFontFileFunctions(void);
+
+/* Speedo/spfuncs.c */
+extern void SpeedoRegisterFontFileFunctions(void);
+
+/* FreeType/ftfuncs.c */
+extern void FreeTypeRegisterFontFileFunctions(void);
+
+#endif
diff --git a/X11/fonts/fontsproto.pc.in b/X11/fonts/fontsproto.pc.in
new file mode 100644
index 000000000..b7db1694e
--- /dev/null
+++ b/X11/fonts/fontsproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FontsProto
+Description: Fonts extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/fonts/fontstruct.h b/X11/fonts/fontstruct.h
new file mode 100644
index 000000000..451ed6a12
--- /dev/null
+++ b/X11/fonts/fontstruct.h
@@ -0,0 +1,295 @@
+/* $Xorg: fontstruct.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */
+
+#ifndef FONTSTR_H
+#define FONTSTR_H
+
+#include <X11/Xproto.h>
+#include "font.h"
+#include <X11/Xfuncproto.h>
+#include <X11/Xdefs.h>
+
+/*
+ * This version of the server font data strucutre is only for describing
+ * the in memory data structure. The file structure is not necessarily a
+ * copy of this. That is up to the compiler and the OS layer font loading
+ * machinery.
+ */
+
+#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */
+
+typedef struct _FontProp {
+ long name;
+ long value; /* assumes ATOM is not larger than INT32 */
+} FontPropRec;
+
+typedef struct _FontResolution {
+ unsigned short x_resolution;
+ unsigned short y_resolution;
+ unsigned short point_size;
+} FontResolutionRec;
+
+typedef struct _ExtentInfo {
+ DrawDirection drawDirection;
+ int fontAscent;
+ int fontDescent;
+ int overallAscent;
+ int overallDescent;
+ int overallWidth;
+ int overallLeft;
+ int overallRight;
+} ExtentInfoRec;
+
+typedef struct _CharInfo {
+ xCharInfo metrics; /* info preformatted for Queries */
+ char *bits; /* pointer to glyph image */
+} CharInfoRec;
+
+/*
+ * Font is created at font load time. It is specific to a single encoding.
+ * e.g. not all of the glyphs in a font may be part of a single encoding.
+ */
+
+typedef struct _FontInfo {
+ unsigned short firstCol;
+ unsigned short lastCol;
+ unsigned short firstRow;
+ unsigned short lastRow;
+ unsigned short defaultCh;
+ unsigned int noOverlap:1;
+ unsigned int terminalFont:1;
+ unsigned int constantMetrics:1;
+ unsigned int constantWidth:1;
+ unsigned int inkInside:1;
+ unsigned int inkMetrics:1;
+ unsigned int allExist:1;
+ unsigned int drawDirection:2;
+ unsigned int cachable:1;
+ unsigned int anamorphic:1;
+ short maxOverlap;
+ short pad;
+ xCharInfo maxbounds;
+ xCharInfo minbounds;
+ xCharInfo ink_maxbounds;
+ xCharInfo ink_minbounds;
+ short fontAscent;
+ short fontDescent;
+ int nprops;
+ FontPropPtr props;
+ char *isStringProp;
+} FontInfoRec;
+
+typedef struct _Font {
+ int refcnt;
+ FontInfoRec info;
+ char bit;
+ char byte;
+ char glyph;
+ char scan;
+ fsBitmapFormat format;
+ int (*get_glyphs) (FontPtr /* font */,
+ unsigned long /* count */,
+ unsigned char * /* chars */,
+ FontEncoding /* encoding */,
+ unsigned long * /* count */,
+ CharInfoPtr * /* glyphs */);
+ int (*get_metrics) (FontPtr /* font */,
+ unsigned long /* count */,
+ unsigned char * /* chars */,
+ FontEncoding /* encoding */,
+ unsigned long * /* count */,
+ xCharInfo ** /* glyphs */);
+ void (*unload_font) (FontPtr /* font */);
+ void (*unload_glyphs) (FontPtr /* font */);
+ FontPathElementPtr fpe;
+ pointer svrPrivate;
+ pointer fontPrivate;
+ pointer fpePrivate;
+ int maxPrivate;
+ pointer *devPrivates;
+} FontRec;
+
+#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \
+ (pFont)->devPrivates[n])
+
+#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
+ _FontSetNewPrivate (pFont, n, ptr) : \
+ ((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE))
+
+typedef struct _FontNames {
+ int nnames;
+ int size;
+ int *length;
+ char **names;
+} FontNamesRec;
+
+/* External view of font paths */
+typedef struct _FontPathElement {
+ int name_length;
+ char *name;
+ int type;
+ int refcount;
+ pointer private;
+} FontPathElementRec;
+
+typedef Bool (*NameCheckFunc) (char *name);
+typedef int (*InitFpeFunc) (FontPathElementPtr fpe);
+typedef int (*FreeFpeFunc) (FontPathElementPtr fpe);
+typedef int (*ResetFpeFunc) (FontPathElementPtr fpe);
+typedef int (*OpenFontFunc) ( pointer client,
+ FontPathElementPtr fpe,
+ Mask flags,
+ char* name,
+ int namelen,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ XID id,
+ FontPtr* pFont,
+ char** aliasName,
+ FontPtr non_cachable_font);
+typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont);
+typedef int (*ListFontsFunc) (pointer client,
+ FontPathElementPtr fpe,
+ char* pat,
+ int len,
+ int max,
+ FontNamesPtr names);
+
+typedef int (*StartLfwiFunc) (pointer client,
+ FontPathElementPtr fpe,
+ char* pat,
+ int len,
+ int max,
+ pointer* privatep);
+
+typedef int (*NextLfwiFunc) (pointer client,
+ FontPathElementPtr fpe,
+ char** name,
+ int* namelen,
+ FontInfoPtr* info,
+ int* numFonts,
+ pointer private);
+
+typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe,
+ unsigned long* LastSelectMask);
+
+typedef void (*ClientDiedFunc) (pointer client,
+ FontPathElementPtr fpe);
+
+typedef int (*LoadGlyphsFunc) (pointer client,
+ FontPtr pfont,
+ Bool range_flag,
+ unsigned int nchars,
+ int item_size,
+ unsigned char* data);
+
+typedef int (*StartLaFunc) (pointer client,
+ FontPathElementPtr fpe,
+ char* pat,
+ int len,
+ int max,
+ pointer* privatep);
+
+typedef int (*NextLaFunc) (pointer client,
+ FontPathElementPtr fpe,
+ char** namep,
+ int* namelenp,
+ char** resolvedp,
+ int* resolvedlenp,
+ pointer private);
+
+typedef void (*SetPathFunc)(void);
+
+typedef struct _FPEFunctions {
+ NameCheckFunc name_check;
+ InitFpeFunc init_fpe;
+ ResetFpeFunc reset_fpe;
+ FreeFpeFunc free_fpe;
+ OpenFontFunc open_font;
+ CloseFontFunc close_font;
+ ListFontsFunc list_fonts;
+ StartLaFunc start_list_fonts_and_aliases;
+ NextLaFunc list_next_font_or_alias;
+ StartLfwiFunc start_list_fonts_with_info;
+ NextLfwiFunc list_next_font_with_info;
+ WakeupFpeFunc wakeup_fpe;
+ ClientDiedFunc client_died;
+ /* for load_glyphs, range_flag = 0 ->
+ nchars = # of characters in data
+ item_size = bytes/char
+ data = list of characters
+ range_flag = 1 ->
+ nchars = # of fsChar2b's in data
+ item_size is ignored
+ data = list of fsChar2b's */
+ LoadGlyphsFunc load_glyphs;
+ SetPathFunc set_path_hook;
+} FPEFunctionsRec, FPEFunctions;
+
+/*
+ * Various macros for computing values based on contents of
+ * the above structures
+ */
+
+#define GLYPHWIDTHPIXELS(pci) \
+ ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
+
+#define GLYPHHEIGHTPIXELS(pci) \
+ ((pci)->metrics.ascent + (pci)->metrics.descent)
+
+#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
+
+#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7)
+
+#define BYTES_PER_ROW(bits, nbytes) \
+ ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \
+ :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \
+ :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \
+ :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
+ : 0)
+
+#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \
+ BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad))
+/*
+ * Macros for computing different bounding boxes for fonts; from
+ * the font protocol
+ */
+
+#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \
+ (pi)->fontAscent : (pi)->ink_maxbounds.ascent)
+#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \
+ (pi)->fontDescent : (pi)->ink_maxbounds.descent)
+#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi))
+#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \
+ (pi)->ink_minbounds.leftSideBearing : 0)
+#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \
+ (pi)->ink_maxbounds.characterWidth ? \
+ (pi)->ink_maxbounds.rightSideBearing : \
+ (pi)->ink_maxbounds.characterWidth)
+#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi))
+
+#include "fontproto.h"
+
+#endif /* FONTSTR_H */
diff --git a/X11/fonts/fsmasks.h b/X11/fonts/fsmasks.h
new file mode 100644
index 000000000..434ee97b5
--- /dev/null
+++ b/X11/fonts/fsmasks.h
@@ -0,0 +1,98 @@
+/* $Xorg: fsmasks.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */
+/*
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * Network Computing Devices and Digital make no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+/*
+
+Portions Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+
+/*
+ * masks & values used by the font lib and the font server
+ */
+
+#ifndef _FSMASKS_H_
+#define _FSMASKS_H_
+
+#include <X11/Xmd.h>
+
+/* font format macros */
+#define BitmapFormatByteOrderMask (1L << 0)
+#define BitmapFormatBitOrderMask (1L << 1)
+#define BitmapFormatImageRectMask (3L << 2)
+#define BitmapFormatScanlinePadMask (3L << 8)
+#define BitmapFormatScanlineUnitMask (3L << 12)
+
+#define BitmapFormatByteOrderLSB (0)
+#define BitmapFormatByteOrderMSB (1L << 0)
+#define BitmapFormatBitOrderLSB (0)
+#define BitmapFormatBitOrderMSB (1L << 1)
+
+#define BitmapFormatImageRectMin (0L << 2)
+#define BitmapFormatImageRectMaxWidth (1L << 2)
+#define BitmapFormatImageRectMax (2L << 2)
+
+#define BitmapFormatScanlinePad8 (0L << 8)
+#define BitmapFormatScanlinePad16 (1L << 8)
+#define BitmapFormatScanlinePad32 (2L << 8)
+#define BitmapFormatScanlinePad64 (3L << 8)
+
+#define BitmapFormatScanlineUnit8 (0L << 12)
+#define BitmapFormatScanlineUnit16 (1L << 12)
+#define BitmapFormatScanlineUnit32 (2L << 12)
+#define BitmapFormatScanlineUnit64 (3L << 12)
+
+#define BitmapFormatMaskByte (1L << 0)
+#define BitmapFormatMaskBit (1L << 1)
+#define BitmapFormatMaskImageRectangle (1L << 2)
+#define BitmapFormatMaskScanLinePad (1L << 3)
+#define BitmapFormatMaskScanLineUnit (1L << 4)
+
+typedef CARD32 fsBitmapFormat;
+typedef CARD32 fsBitmapFormatMask;
+
+#endif /* _FSMASKS_H_ */
diff --git a/X11/fonts/install-sh b/X11/fonts/install-sh
new file mode 100644
index 000000000..6ce63b9f7
--- /dev/null
+++ b/X11/fonts/install-sh
@@ -0,0 +1,294 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+#
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "$0: no input file specified" >&2
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d "$dst" ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f "$src" ] || [ -d "$src" ]
+ then
+ :
+ else
+ echo "$0: $src does not exist" >&2
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "$0: no destination specified" >&2
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d "$dst" ]
+ then
+ dst=$dst/`basename "$src"`
+ else
+ :
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp=$pathcomp$1
+ shift
+
+ if [ ! -d "$pathcomp" ] ;
+ then
+ $mkdirprog "$pathcomp"
+ else
+ :
+ fi
+
+ pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd "$dst" &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ :
+ fi
+
+# Make a couple of temp file names in the proper directory.
+
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
+
+# Now rename the file to the real destination.
+
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+ (exit 0); exit
+}
diff --git a/X11/fonts/missing b/X11/fonts/missing
new file mode 100644
index 000000000..fc54c64ec
--- /dev/null
+++ b/X11/fonts/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.4 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/X11/fonts/mkinstalldirs b/X11/fonts/mkinstalldirs
new file mode 100644
index 000000000..d2d5f21b6
--- /dev/null
+++ b/X11/fonts/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/X11/install-sh b/X11/install-sh
new file mode 100644
index 000000000..4fbbae7b7
--- /dev/null
+++ b/X11/install-sh
@@ -0,0 +1,507 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-10-14.15
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ shift
+ shift
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix=/ ;;
+ -*) prefix=./ ;;
+ *) prefix= ;;
+ esac
+
+ case $posix_glob in
+ '')
+ if (set -f) 2>/dev/null; then
+ posix_glob=true
+ else
+ posix_glob=false
+ fi ;;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob && set -f
+ set fnord $dstdir
+ shift
+ $posix_glob && set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dst"; then
+ $doit $rmcmd -f "$dst" 2>/dev/null \
+ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+ || {
+ echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ } || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/keysym.h b/X11/keysym.h
new file mode 100644
index 000000000..04e2956a7
--- /dev/null
+++ b/X11/keysym.h
@@ -0,0 +1,76 @@
+/* $Xorg: keysym.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/keysym.h,v 1.3 2001/01/17 17:53:12 dawes Exp $ */
+
+/* default keysyms */
+#define XK_MISCELLANY
+#define XK_XKB_KEYS
+#define XK_LATIN1
+#define XK_LATIN2
+#define XK_LATIN3
+#define XK_LATIN4
+#define XK_LATIN8
+#define XK_LATIN9
+#define XK_CAUCASUS
+#define XK_GREEK
+#define XK_KATAKANA
+#define XK_ARABIC
+#define XK_CYRILLIC
+#define XK_HEBREW
+#define XK_THAI
+#define XK_KOREAN
+#define XK_ARMENIAN
+#define XK_GEORGIAN
+#define XK_VIETNAMESE
+#define XK_CURRENCY
+#define XK_MATHEMATICAL
+#define XK_BRAILLE
+
+#include <X11/keysymdef.h>
+
diff --git a/X11/keysymdef.h b/X11/keysymdef.h
new file mode 100644
index 000000000..2e4908271
--- /dev/null
+++ b/X11/keysymdef.h
@@ -0,0 +1,2374 @@
+/* $Xorg: keysymdef.h,v 1.4 2001/02/09 02:03:23 $ */
+
+/***********************************************************
+Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: $ */
+
+/*
+ * The "X11 Window System Protocol" standard defines in Appendix A the
+ * keysym codes. These 29-bit integer values identify characters or
+ * functions associated with each key (e.g., via the visible
+ * engraving) of a keyboard layout. This file assigns mnemonic macro
+ * names for these keysyms.
+ *
+ * This file is also compiled (by src/util/makekeys.c in libX11) into
+ * hash tables that can be accessed with X11 library functions such as
+ * XStringToKeysym() and XKeysymToString().
+ *
+ * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
+ * character, this is noted in a comment that provides both the U+xxxx
+ * Unicode position, as well as the official Unicode name of the
+ * character.
+ *
+ * Where the correspondence is either not one-to-one or semantically
+ * unclear, the Unicode position and name are enclosed in
+ * parentheses. Such legacy keysyms should be considered deprecated
+ * and are not recommended for use in future keyboard mappings.
+ *
+ * For any future extension of the keysyms with characters already
+ * found in ISO 10646 / Unicode, the following algorithm shall be
+ * used. The new keysym code position will simply be the character's
+ * Unicode number plus 0x01000000. The keysym values in the range
+ * 0x01000100 to 0x0110ffff are reserved to represent Unicode
+ * characters in the range U+0100 to U+10FFFF.
+ *
+ * While most newer Unicode-based X11 clients do already accept
+ * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
+ * will remain necessary for clients -- in the interest of
+ * compatibility with existing servers -- to also understand the
+ * existing legacy keysym values in the range 0x0100 to 0x20ff.
+ *
+ * Where several mnemonic names are defined for the same keysym in this
+ * file, all but the first one listed should be considered deprecated.
+ *
+ * Mnemonic names for keysyms are defined in this file with lines
+ * that match one of these Perl regular expressions:
+ *
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
+ *
+ * Before adding new keysyms, please do consider the following: In
+ * addition to the keysym names defined in this file, the
+ * XStringToKeysym() and XKeysymToString() functions will also handle
+ * any keysym string of the form "U0020" to "U007E" and "U00A0" to
+ * "U10FFFF" for all possible Unicode characters. In other words,
+ * every possible Unicode character has already a keysym string
+ * defined algorithmically, even if it is not listed here. Therefore,
+ * defining an additional keysym macro is only necessary where a
+ * non-hexadecimal mnemonic name is needed, or where the new keysym
+ * does not represent any existing Unicode character.
+ *
+ * When adding new keysyms to this file, do not forget to also update the
+ * following:
+ *
+ * - the mappings in src/KeyBind.c in the repo
+ * git://anongit.freedesktop.org/xorg/lib/libX11
+ *
+ * - the protocol specification in specs/XProtocol/X11.keysyms
+ * in the repo git://anongit.freedesktop.org/xorg/doc/xorg-docs
+ *
+ */
+
+#define XK_VoidSymbol 0xffffff /* Void symbol */
+
+#ifdef XK_MISCELLANY
+/*
+ * TTY function keys, cleverly chosen to map to ASCII, for convenience of
+ * programming, but could have been arbitrary (at the cost of lookup
+ * tables in client code).
+ */
+
+#define XK_BackSpace 0xff08 /* Back space, back char */
+#define XK_Tab 0xff09
+#define XK_Linefeed 0xff0a /* Linefeed, LF */
+#define XK_Clear 0xff0b
+#define XK_Return 0xff0d /* Return, enter */
+#define XK_Pause 0xff13 /* Pause, hold */
+#define XK_Scroll_Lock 0xff14
+#define XK_Sys_Req 0xff15
+#define XK_Escape 0xff1b
+#define XK_Delete 0xffff /* Delete, rubout */
+
+
+
+/* International & multi-key character composition */
+
+#define XK_Multi_key 0xff20 /* Multi-key character compose */
+#define XK_Codeinput 0xff37
+#define XK_SingleCandidate 0xff3c
+#define XK_MultipleCandidate 0xff3d
+#define XK_PreviousCandidate 0xff3e
+
+/* Japanese keyboard support */
+
+#define XK_Kanji 0xff21 /* Kanji, Kanji convert */
+#define XK_Muhenkan 0xff22 /* Cancel Conversion */
+#define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */
+#define XK_Henkan 0xff23 /* Alias for Henkan_Mode */
+#define XK_Romaji 0xff24 /* to Romaji */
+#define XK_Hiragana 0xff25 /* to Hiragana */
+#define XK_Katakana 0xff26 /* to Katakana */
+#define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
+#define XK_Zenkaku 0xff28 /* to Zenkaku */
+#define XK_Hankaku 0xff29 /* to Hankaku */
+#define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
+#define XK_Touroku 0xff2b /* Add to Dictionary */
+#define XK_Massyo 0xff2c /* Delete from Dictionary */
+#define XK_Kana_Lock 0xff2d /* Kana Lock */
+#define XK_Kana_Shift 0xff2e /* Kana Shift */
+#define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */
+#define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */
+#define XK_Kanji_Bangou 0xff37 /* Codeinput */
+#define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
+#define XK_Mae_Koho 0xff3e /* Previous Candidate */
+
+/* 0xff31 thru 0xff3f are under XK_KOREAN */
+
+/* Cursor control & motion */
+
+#define XK_Home 0xff50
+#define XK_Left 0xff51 /* Move left, left arrow */
+#define XK_Up 0xff52 /* Move up, up arrow */
+#define XK_Right 0xff53 /* Move right, right arrow */
+#define XK_Down 0xff54 /* Move down, down arrow */
+#define XK_Prior 0xff55 /* Prior, previous */
+#define XK_Page_Up 0xff55
+#define XK_Next 0xff56 /* Next */
+#define XK_Page_Down 0xff56
+#define XK_End 0xff57 /* EOL */
+#define XK_Begin 0xff58 /* BOL */
+
+
+/* Misc functions */
+
+#define XK_Select 0xff60 /* Select, mark */
+#define XK_Print 0xff61
+#define XK_Execute 0xff62 /* Execute, run, do */
+#define XK_Insert 0xff63 /* Insert, insert here */
+#define XK_Undo 0xff65
+#define XK_Redo 0xff66 /* Redo, again */
+#define XK_Menu 0xff67
+#define XK_Find 0xff68 /* Find, search */
+#define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */
+#define XK_Help 0xff6a /* Help */
+#define XK_Break 0xff6b
+#define XK_Mode_switch 0xff7e /* Character set switch */
+#define XK_script_switch 0xff7e /* Alias for mode_switch */
+#define XK_Num_Lock 0xff7f
+
+/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
+
+#define XK_KP_Space 0xff80 /* Space */
+#define XK_KP_Tab 0xff89
+#define XK_KP_Enter 0xff8d /* Enter */
+#define XK_KP_F1 0xff91 /* PF1, KP_A, ... */
+#define XK_KP_F2 0xff92
+#define XK_KP_F3 0xff93
+#define XK_KP_F4 0xff94
+#define XK_KP_Home 0xff95
+#define XK_KP_Left 0xff96
+#define XK_KP_Up 0xff97
+#define XK_KP_Right 0xff98
+#define XK_KP_Down 0xff99
+#define XK_KP_Prior 0xff9a
+#define XK_KP_Page_Up 0xff9a
+#define XK_KP_Next 0xff9b
+#define XK_KP_Page_Down 0xff9b
+#define XK_KP_End 0xff9c
+#define XK_KP_Begin 0xff9d
+#define XK_KP_Insert 0xff9e
+#define XK_KP_Delete 0xff9f
+#define XK_KP_Equal 0xffbd /* Equals */
+#define XK_KP_Multiply 0xffaa
+#define XK_KP_Add 0xffab
+#define XK_KP_Separator 0xffac /* Separator, often comma */
+#define XK_KP_Subtract 0xffad
+#define XK_KP_Decimal 0xffae
+#define XK_KP_Divide 0xffaf
+
+#define XK_KP_0 0xffb0
+#define XK_KP_1 0xffb1
+#define XK_KP_2 0xffb2
+#define XK_KP_3 0xffb3
+#define XK_KP_4 0xffb4
+#define XK_KP_5 0xffb5
+#define XK_KP_6 0xffb6
+#define XK_KP_7 0xffb7
+#define XK_KP_8 0xffb8
+#define XK_KP_9 0xffb9
+
+
+
+/*
+ * Auxiliary functions; note the duplicate definitions for left and right
+ * function keys; Sun keyboards and a few other manufacturers have such
+ * function key groups on the left and/or right sides of the keyboard.
+ * We've not found a keyboard with more than 35 function keys total.
+ */
+
+#define XK_F1 0xffbe
+#define XK_F2 0xffbf
+#define XK_F3 0xffc0
+#define XK_F4 0xffc1
+#define XK_F5 0xffc2
+#define XK_F6 0xffc3
+#define XK_F7 0xffc4
+#define XK_F8 0xffc5
+#define XK_F9 0xffc6
+#define XK_F10 0xffc7
+#define XK_F11 0xffc8
+#define XK_L1 0xffc8
+#define XK_F12 0xffc9
+#define XK_L2 0xffc9
+#define XK_F13 0xffca
+#define XK_L3 0xffca
+#define XK_F14 0xffcb
+#define XK_L4 0xffcb
+#define XK_F15 0xffcc
+#define XK_L5 0xffcc
+#define XK_F16 0xffcd
+#define XK_L6 0xffcd
+#define XK_F17 0xffce
+#define XK_L7 0xffce
+#define XK_F18 0xffcf
+#define XK_L8 0xffcf
+#define XK_F19 0xffd0
+#define XK_L9 0xffd0
+#define XK_F20 0xffd1
+#define XK_L10 0xffd1
+#define XK_F21 0xffd2
+#define XK_R1 0xffd2
+#define XK_F22 0xffd3
+#define XK_R2 0xffd3
+#define XK_F23 0xffd4
+#define XK_R3 0xffd4
+#define XK_F24 0xffd5
+#define XK_R4 0xffd5
+#define XK_F25 0xffd6
+#define XK_R5 0xffd6
+#define XK_F26 0xffd7
+#define XK_R6 0xffd7
+#define XK_F27 0xffd8
+#define XK_R7 0xffd8
+#define XK_F28 0xffd9
+#define XK_R8 0xffd9
+#define XK_F29 0xffda
+#define XK_R9 0xffda
+#define XK_F30 0xffdb
+#define XK_R10 0xffdb
+#define XK_F31 0xffdc
+#define XK_R11 0xffdc
+#define XK_F32 0xffdd
+#define XK_R12 0xffdd
+#define XK_F33 0xffde
+#define XK_R13 0xffde
+#define XK_F34 0xffdf
+#define XK_R14 0xffdf
+#define XK_F35 0xffe0
+#define XK_R15 0xffe0
+
+/* Modifiers */
+
+#define XK_Shift_L 0xffe1 /* Left shift */
+#define XK_Shift_R 0xffe2 /* Right shift */
+#define XK_Control_L 0xffe3 /* Left control */
+#define XK_Control_R 0xffe4 /* Right control */
+#define XK_Caps_Lock 0xffe5 /* Caps lock */
+#define XK_Shift_Lock 0xffe6 /* Shift lock */
+
+#define XK_Meta_L 0xffe7 /* Left meta */
+#define XK_Meta_R 0xffe8 /* Right meta */
+#define XK_Alt_L 0xffe9 /* Left alt */
+#define XK_Alt_R 0xffea /* Right alt */
+#define XK_Super_L 0xffeb /* Left super */
+#define XK_Super_R 0xffec /* Right super */
+#define XK_Hyper_L 0xffed /* Left hyper */
+#define XK_Hyper_R 0xffee /* Right hyper */
+#endif /* XK_MISCELLANY */
+
+/*
+ * Keyboard (XKB) Extension function and modifier keys
+ * (from Appendix C of "The X Keyboard Extension: Protocol Specification")
+ * Byte 3 = 0xfe
+ */
+
+#ifdef XK_XKB_KEYS
+#define XK_ISO_Lock 0xfe01
+#define XK_ISO_Level2_Latch 0xfe02
+#define XK_ISO_Level3_Shift 0xfe03
+#define XK_ISO_Level3_Latch 0xfe04
+#define XK_ISO_Level3_Lock 0xfe05
+#define XK_ISO_Level5_Shift 0xfe11
+#define XK_ISO_Level5_Latch 0xfe12
+#define XK_ISO_Level5_Lock 0xfe13
+#define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
+#define XK_ISO_Group_Latch 0xfe06
+#define XK_ISO_Group_Lock 0xfe07
+#define XK_ISO_Next_Group 0xfe08
+#define XK_ISO_Next_Group_Lock 0xfe09
+#define XK_ISO_Prev_Group 0xfe0a
+#define XK_ISO_Prev_Group_Lock 0xfe0b
+#define XK_ISO_First_Group 0xfe0c
+#define XK_ISO_First_Group_Lock 0xfe0d
+#define XK_ISO_Last_Group 0xfe0e
+#define XK_ISO_Last_Group_Lock 0xfe0f
+
+#define XK_ISO_Left_Tab 0xfe20
+#define XK_ISO_Move_Line_Up 0xfe21
+#define XK_ISO_Move_Line_Down 0xfe22
+#define XK_ISO_Partial_Line_Up 0xfe23
+#define XK_ISO_Partial_Line_Down 0xfe24
+#define XK_ISO_Partial_Space_Left 0xfe25
+#define XK_ISO_Partial_Space_Right 0xfe26
+#define XK_ISO_Set_Margin_Left 0xfe27
+#define XK_ISO_Set_Margin_Right 0xfe28
+#define XK_ISO_Release_Margin_Left 0xfe29
+#define XK_ISO_Release_Margin_Right 0xfe2a
+#define XK_ISO_Release_Both_Margins 0xfe2b
+#define XK_ISO_Fast_Cursor_Left 0xfe2c
+#define XK_ISO_Fast_Cursor_Right 0xfe2d
+#define XK_ISO_Fast_Cursor_Up 0xfe2e
+#define XK_ISO_Fast_Cursor_Down 0xfe2f
+#define XK_ISO_Continuous_Underline 0xfe30
+#define XK_ISO_Discontinuous_Underline 0xfe31
+#define XK_ISO_Emphasize 0xfe32
+#define XK_ISO_Center_Object 0xfe33
+#define XK_ISO_Enter 0xfe34
+
+#define XK_dead_grave 0xfe50
+#define XK_dead_acute 0xfe51
+#define XK_dead_circumflex 0xfe52
+#define XK_dead_tilde 0xfe53
+#define XK_dead_perispomeni 0xfe53 /* alias for dead_tilde */
+#define XK_dead_macron 0xfe54
+#define XK_dead_breve 0xfe55
+#define XK_dead_abovedot 0xfe56
+#define XK_dead_diaeresis 0xfe57
+#define XK_dead_abovering 0xfe58
+#define XK_dead_doubleacute 0xfe59
+#define XK_dead_caron 0xfe5a
+#define XK_dead_cedilla 0xfe5b
+#define XK_dead_ogonek 0xfe5c
+#define XK_dead_iota 0xfe5d
+#define XK_dead_voiced_sound 0xfe5e
+#define XK_dead_semivoiced_sound 0xfe5f
+#define XK_dead_belowdot 0xfe60
+#define XK_dead_hook 0xfe61
+#define XK_dead_horn 0xfe62
+#define XK_dead_stroke 0xfe63
+#define XK_dead_abovecomma 0xfe64
+#define XK_dead_psili 0xfe64 /* alias for dead_abovecomma */
+#define XK_dead_abovereversedcomma 0xfe65
+#define XK_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */
+#define XK_dead_belowring 0xfe67
+#define XK_dead_belowmacron 0xfe68
+#define XK_dead_belowcircumflex 0xfe69
+#define XK_dead_belowtilde 0xfe6a
+#define XK_dead_belowbreve 0xfe6b
+#define XK_dead_belowdiaeresis 0xfe6c
+
+#define XK_First_Virtual_Screen 0xfed0
+#define XK_Prev_Virtual_Screen 0xfed1
+#define XK_Next_Virtual_Screen 0xfed2
+#define XK_Last_Virtual_Screen 0xfed4
+#define XK_Terminate_Server 0xfed5
+
+#define XK_AccessX_Enable 0xfe70
+#define XK_AccessX_Feedback_Enable 0xfe71
+#define XK_RepeatKeys_Enable 0xfe72
+#define XK_SlowKeys_Enable 0xfe73
+#define XK_BounceKeys_Enable 0xfe74
+#define XK_StickyKeys_Enable 0xfe75
+#define XK_MouseKeys_Enable 0xfe76
+#define XK_MouseKeys_Accel_Enable 0xfe77
+#define XK_Overlay1_Enable 0xfe78
+#define XK_Overlay2_Enable 0xfe79
+#define XK_AudibleBell_Enable 0xfe7a
+
+#define XK_Pointer_Left 0xfee0
+#define XK_Pointer_Right 0xfee1
+#define XK_Pointer_Up 0xfee2
+#define XK_Pointer_Down 0xfee3
+#define XK_Pointer_UpLeft 0xfee4
+#define XK_Pointer_UpRight 0xfee5
+#define XK_Pointer_DownLeft 0xfee6
+#define XK_Pointer_DownRight 0xfee7
+#define XK_Pointer_Button_Dflt 0xfee8
+#define XK_Pointer_Button1 0xfee9
+#define XK_Pointer_Button2 0xfeea
+#define XK_Pointer_Button3 0xfeeb
+#define XK_Pointer_Button4 0xfeec
+#define XK_Pointer_Button5 0xfeed
+#define XK_Pointer_DblClick_Dflt 0xfeee
+#define XK_Pointer_DblClick1 0xfeef
+#define XK_Pointer_DblClick2 0xfef0
+#define XK_Pointer_DblClick3 0xfef1
+#define XK_Pointer_DblClick4 0xfef2
+#define XK_Pointer_DblClick5 0xfef3
+#define XK_Pointer_Drag_Dflt 0xfef4
+#define XK_Pointer_Drag1 0xfef5
+#define XK_Pointer_Drag2 0xfef6
+#define XK_Pointer_Drag3 0xfef7
+#define XK_Pointer_Drag4 0xfef8
+#define XK_Pointer_Drag5 0xfefd
+
+#define XK_Pointer_EnableKeys 0xfef9
+#define XK_Pointer_Accelerate 0xfefa
+#define XK_Pointer_DfltBtnNext 0xfefb
+#define XK_Pointer_DfltBtnPrev 0xfefc
+
+#endif /* XK_XKB_KEYS */
+
+/*
+ * 3270 Terminal Keys
+ * Byte 3 = 0xfd
+ */
+
+#ifdef XK_3270
+#define XK_3270_Duplicate 0xfd01
+#define XK_3270_FieldMark 0xfd02
+#define XK_3270_Right2 0xfd03
+#define XK_3270_Left2 0xfd04
+#define XK_3270_BackTab 0xfd05
+#define XK_3270_EraseEOF 0xfd06
+#define XK_3270_EraseInput 0xfd07
+#define XK_3270_Reset 0xfd08
+#define XK_3270_Quit 0xfd09
+#define XK_3270_PA1 0xfd0a
+#define XK_3270_PA2 0xfd0b
+#define XK_3270_PA3 0xfd0c
+#define XK_3270_Test 0xfd0d
+#define XK_3270_Attn 0xfd0e
+#define XK_3270_CursorBlink 0xfd0f
+#define XK_3270_AltCursor 0xfd10
+#define XK_3270_KeyClick 0xfd11
+#define XK_3270_Jump 0xfd12
+#define XK_3270_Ident 0xfd13
+#define XK_3270_Rule 0xfd14
+#define XK_3270_Copy 0xfd15
+#define XK_3270_Play 0xfd16
+#define XK_3270_Setup 0xfd17
+#define XK_3270_Record 0xfd18
+#define XK_3270_ChangeScreen 0xfd19
+#define XK_3270_DeleteWord 0xfd1a
+#define XK_3270_ExSelect 0xfd1b
+#define XK_3270_CursorSelect 0xfd1c
+#define XK_3270_PrintScreen 0xfd1d
+#define XK_3270_Enter 0xfd1e
+#endif /* XK_3270 */
+
+/*
+ * Latin 1
+ * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
+ * Byte 3 = 0
+ */
+#ifdef XK_LATIN1
+#define XK_space 0x0020 /* U+0020 SPACE */
+#define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
+#define XK_quotedbl 0x0022 /* U+0022 QUOTATION MARK */
+#define XK_numbersign 0x0023 /* U+0023 NUMBER SIGN */
+#define XK_dollar 0x0024 /* U+0024 DOLLAR SIGN */
+#define XK_percent 0x0025 /* U+0025 PERCENT SIGN */
+#define XK_ampersand 0x0026 /* U+0026 AMPERSAND */
+#define XK_apostrophe 0x0027 /* U+0027 APOSTROPHE */
+#define XK_quoteright 0x0027 /* deprecated */
+#define XK_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */
+#define XK_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */
+#define XK_asterisk 0x002a /* U+002A ASTERISK */
+#define XK_plus 0x002b /* U+002B PLUS SIGN */
+#define XK_comma 0x002c /* U+002C COMMA */
+#define XK_minus 0x002d /* U+002D HYPHEN-MINUS */
+#define XK_period 0x002e /* U+002E FULL STOP */
+#define XK_slash 0x002f /* U+002F SOLIDUS */
+#define XK_0 0x0030 /* U+0030 DIGIT ZERO */
+#define XK_1 0x0031 /* U+0031 DIGIT ONE */
+#define XK_2 0x0032 /* U+0032 DIGIT TWO */
+#define XK_3 0x0033 /* U+0033 DIGIT THREE */
+#define XK_4 0x0034 /* U+0034 DIGIT FOUR */
+#define XK_5 0x0035 /* U+0035 DIGIT FIVE */
+#define XK_6 0x0036 /* U+0036 DIGIT SIX */
+#define XK_7 0x0037 /* U+0037 DIGIT SEVEN */
+#define XK_8 0x0038 /* U+0038 DIGIT EIGHT */
+#define XK_9 0x0039 /* U+0039 DIGIT NINE */
+#define XK_colon 0x003a /* U+003A COLON */
+#define XK_semicolon 0x003b /* U+003B SEMICOLON */
+#define XK_less 0x003c /* U+003C LESS-THAN SIGN */
+#define XK_equal 0x003d /* U+003D EQUALS SIGN */
+#define XK_greater 0x003e /* U+003E GREATER-THAN SIGN */
+#define XK_question 0x003f /* U+003F QUESTION MARK */
+#define XK_at 0x0040 /* U+0040 COMMERCIAL AT */
+#define XK_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */
+#define XK_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */
+#define XK_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */
+#define XK_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */
+#define XK_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */
+#define XK_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */
+#define XK_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */
+#define XK_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */
+#define XK_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */
+#define XK_J 0x004a /* U+004A LATIN CAPITAL LETTER J */
+#define XK_K 0x004b /* U+004B LATIN CAPITAL LETTER K */
+#define XK_L 0x004c /* U+004C LATIN CAPITAL LETTER L */
+#define XK_M 0x004d /* U+004D LATIN CAPITAL LETTER M */
+#define XK_N 0x004e /* U+004E LATIN CAPITAL LETTER N */
+#define XK_O 0x004f /* U+004F LATIN CAPITAL LETTER O */
+#define XK_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */
+#define XK_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */
+#define XK_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */
+#define XK_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */
+#define XK_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */
+#define XK_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */
+#define XK_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */
+#define XK_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */
+#define XK_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */
+#define XK_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */
+#define XK_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */
+#define XK_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */
+#define XK_backslash 0x005c /* U+005C REVERSE SOLIDUS */
+#define XK_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */
+#define XK_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */
+#define XK_underscore 0x005f /* U+005F LOW LINE */
+#define XK_grave 0x0060 /* U+0060 GRAVE ACCENT */
+#define XK_quoteleft 0x0060 /* deprecated */
+#define XK_a 0x0061 /* U+0061 LATIN SMALL LETTER A */
+#define XK_b 0x0062 /* U+0062 LATIN SMALL LETTER B */
+#define XK_c 0x0063 /* U+0063 LATIN SMALL LETTER C */
+#define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
+#define XK_e 0x0065 /* U+0065 LATIN SMALL LETTER E */
+#define XK_f 0x0066 /* U+0066 LATIN SMALL LETTER F */
+#define XK_g 0x0067 /* U+0067 LATIN SMALL LETTER G */
+#define XK_h 0x0068 /* U+0068 LATIN SMALL LETTER H */
+#define XK_i 0x0069 /* U+0069 LATIN SMALL LETTER I */
+#define XK_j 0x006a /* U+006A LATIN SMALL LETTER J */
+#define XK_k 0x006b /* U+006B LATIN SMALL LETTER K */
+#define XK_l 0x006c /* U+006C LATIN SMALL LETTER L */
+#define XK_m 0x006d /* U+006D LATIN SMALL LETTER M */
+#define XK_n 0x006e /* U+006E LATIN SMALL LETTER N */
+#define XK_o 0x006f /* U+006F LATIN SMALL LETTER O */
+#define XK_p 0x0070 /* U+0070 LATIN SMALL LETTER P */
+#define XK_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */
+#define XK_r 0x0072 /* U+0072 LATIN SMALL LETTER R */
+#define XK_s 0x0073 /* U+0073 LATIN SMALL LETTER S */
+#define XK_t 0x0074 /* U+0074 LATIN SMALL LETTER T */
+#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */
+#define XK_v 0x0076 /* U+0076 LATIN SMALL LETTER V */
+#define XK_w 0x0077 /* U+0077 LATIN SMALL LETTER W */
+#define XK_x 0x0078 /* U+0078 LATIN SMALL LETTER X */
+#define XK_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */
+#define XK_z 0x007a /* U+007A LATIN SMALL LETTER Z */
+#define XK_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */
+#define XK_bar 0x007c /* U+007C VERTICAL LINE */
+#define XK_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */
+#define XK_asciitilde 0x007e /* U+007E TILDE */
+
+#define XK_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */
+#define XK_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */
+#define XK_cent 0x00a2 /* U+00A2 CENT SIGN */
+#define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */
+#define XK_currency 0x00a4 /* U+00A4 CURRENCY SIGN */
+#define XK_yen 0x00a5 /* U+00A5 YEN SIGN */
+#define XK_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */
+#define XK_section 0x00a7 /* U+00A7 SECTION SIGN */
+#define XK_diaeresis 0x00a8 /* U+00A8 DIAERESIS */
+#define XK_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */
+#define XK_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */
+#define XK_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_notsign 0x00ac /* U+00AC NOT SIGN */
+#define XK_hyphen 0x00ad /* U+00AD SOFT HYPHEN */
+#define XK_registered 0x00ae /* U+00AE REGISTERED SIGN */
+#define XK_macron 0x00af /* U+00AF MACRON */
+#define XK_degree 0x00b0 /* U+00B0 DEGREE SIGN */
+#define XK_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */
+#define XK_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */
+#define XK_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */
+#define XK_acute 0x00b4 /* U+00B4 ACUTE ACCENT */
+#define XK_mu 0x00b5 /* U+00B5 MICRO SIGN */
+#define XK_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */
+#define XK_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */
+#define XK_cedilla 0x00b8 /* U+00B8 CEDILLA */
+#define XK_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */
+#define XK_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */
+#define XK_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */
+#define XK_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */
+#define XK_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */
+#define XK_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */
+#define XK_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */
+#define XK_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */
+#define XK_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
+#define XK_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */
+#define XK_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */
+#define XK_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */
+#define XK_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */
+#define XK_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */
+#define XK_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */
+#define XK_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
+#define XK_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
+#define XK_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */
+#define XK_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */
+#define XK_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */
+#define XK_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
+#define XK_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */
+#define XK_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */
+#define XK_Eth 0x00d0 /* deprecated */
+#define XK_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */
+#define XK_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */
+#define XK_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */
+#define XK_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
+#define XK_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */
+#define XK_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */
+#define XK_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */
+#define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */
+#define XK_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */
+#define XK_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
+#define XK_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */
+#define XK_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */
+#define XK_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */
+#define XK_Thorn 0x00de /* deprecated */
+#define XK_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */
+#define XK_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */
+#define XK_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */
+#define XK_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */
+#define XK_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */
+#define XK_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */
+#define XK_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */
+#define XK_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */
+#define XK_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */
+#define XK_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */
+#define XK_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
+#define XK_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */
+#define XK_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */
+#define XK_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */
+#define XK_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */
+#define XK_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */
+#define XK_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */
+#define XK_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */
+#define XK_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */
+#define XK_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */
+#define XK_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */
+#define XK_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */
+#define XK_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */
+#define XK_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */
+#define XK_division 0x00f7 /* U+00F7 DIVISION SIGN */
+#define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */
+#define XK_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */
+#define XK_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */
+#define XK_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */
+#define XK_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */
+#define XK_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */
+#define XK_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
+#endif /* XK_LATIN1 */
+
+/*
+ * Latin 2
+ * Byte 3 = 1
+ */
+
+#ifdef XK_LATIN2
+#define XK_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */
+#define XK_breve 0x01a2 /* U+02D8 BREVE */
+#define XK_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
+#define XK_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */
+#define XK_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */
+#define XK_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */
+#define XK_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */
+#define XK_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */
+#define XK_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */
+#define XK_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */
+#define XK_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+#define XK_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */
+#define XK_ogonek 0x01b2 /* U+02DB OGONEK */
+#define XK_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */
+#define XK_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */
+#define XK_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */
+#define XK_caron 0x01b7 /* U+02C7 CARON */
+#define XK_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */
+#define XK_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */
+#define XK_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */
+#define XK_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */
+#define XK_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */
+#define XK_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */
+#define XK_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */
+#define XK_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */
+#define XK_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */
+#define XK_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */
+#define XK_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */
+#define XK_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */
+#define XK_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */
+#define XK_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */
+#define XK_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */
+#define XK_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */
+#define XK_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */
+#define XK_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */
+#define XK_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+#define XK_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */
+#define XK_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */
+#define XK_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+#define XK_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */
+#define XK_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */
+#define XK_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */
+#define XK_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */
+#define XK_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */
+#define XK_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */
+#define XK_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */
+#define XK_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */
+#define XK_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */
+#define XK_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */
+#define XK_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */
+#define XK_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */
+#define XK_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+#define XK_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+#define XK_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */
+#define XK_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */
+#define XK_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */
+#define XK_abovedot 0x01ff /* U+02D9 DOT ABOVE */
+#endif /* XK_LATIN2 */
+
+/*
+ * Latin 3
+ * Byte 3 = 2
+ */
+
+#ifdef XK_LATIN3
+#define XK_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */
+#define XK_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
+#define XK_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */
+#define XK_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */
+#define XK_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
+#define XK_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */
+#define XK_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */
+#define XK_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */
+#define XK_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */
+#define XK_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */
+#define XK_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */
+#define XK_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
+#define XK_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */
+#define XK_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
+#define XK_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */
+#define XK_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
+#define XK_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */
+#define XK_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */
+#define XK_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */
+#define XK_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */
+#define XK_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */
+#define XK_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */
+#endif /* XK_LATIN3 */
+
+
+/*
+ * Latin 4
+ * Byte 3 = 3
+ */
+
+#ifdef XK_LATIN4
+#define XK_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */
+#define XK_kappa 0x03a2 /* deprecated */
+#define XK_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */
+#define XK_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */
+#define XK_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */
+#define XK_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */
+#define XK_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */
+#define XK_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */
+#define XK_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */
+#define XK_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */
+#define XK_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */
+#define XK_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */
+#define XK_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */
+#define XK_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */
+#define XK_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */
+#define XK_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */
+#define XK_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */
+#define XK_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */
+#define XK_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */
+#define XK_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */
+#define XK_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */
+#define XK_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */
+#define XK_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */
+#define XK_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */
+#define XK_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */
+#define XK_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */
+#define XK_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */
+#define XK_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */
+#define XK_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */
+#define XK_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */
+#define XK_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */
+#define XK_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */
+#define XK_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */
+#define XK_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */
+#define XK_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */
+#define XK_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */
+#endif /* XK_LATIN4 */
+
+/*
+ * Latin 8
+ */
+#ifdef XK_LATIN8
+#define XK_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */
+#define XK_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */
+#define XK_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */
+#define XK_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */
+#define XK_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */
+#define XK_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */
+#define XK_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */
+#define XK_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */
+#define XK_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */
+#define XK_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */
+#define XK_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */
+#define XK_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */
+#define XK_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */
+#define XK_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */
+#define XK_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */
+#define XK_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */
+#define XK_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */
+#define XK_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */
+#define XK_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */
+#define XK_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */
+#define XK_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+#define XK_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */
+#define XK_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+#define XK_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */
+#define XK_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */
+#define XK_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+#endif /* XK_LATIN8 */
+
+/*
+ * Latin 9
+ * Byte 3 = 0x13
+ */
+
+#ifdef XK_LATIN9
+#define XK_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */
+#define XK_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */
+#define XK_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */
+#endif /* XK_LATIN9 */
+
+/*
+ * Katakana
+ * Byte 3 = 4
+ */
+
+#ifdef XK_KATAKANA
+#define XK_overline 0x047e /* U+203E OVERLINE */
+#define XK_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */
+#define XK_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */
+#define XK_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */
+#define XK_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */
+#define XK_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */
+#define XK_kana_middledot 0x04a5 /* deprecated */
+#define XK_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */
+#define XK_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */
+#define XK_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */
+#define XK_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */
+#define XK_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */
+#define XK_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */
+#define XK_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */
+#define XK_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */
+#define XK_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */
+#define XK_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */
+#define XK_kana_tu 0x04af /* deprecated */
+#define XK_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */
+#define XK_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */
+#define XK_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */
+#define XK_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */
+#define XK_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */
+#define XK_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */
+#define XK_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */
+#define XK_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */
+#define XK_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */
+#define XK_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */
+#define XK_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */
+#define XK_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */
+#define XK_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */
+#define XK_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */
+#define XK_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */
+#define XK_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */
+#define XK_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */
+#define XK_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */
+#define XK_kana_TI 0x04c1 /* deprecated */
+#define XK_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */
+#define XK_kana_TU 0x04c2 /* deprecated */
+#define XK_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */
+#define XK_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */
+#define XK_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */
+#define XK_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */
+#define XK_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */
+#define XK_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */
+#define XK_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */
+#define XK_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */
+#define XK_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */
+#define XK_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */
+#define XK_kana_HU 0x04cc /* deprecated */
+#define XK_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */
+#define XK_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */
+#define XK_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */
+#define XK_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */
+#define XK_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */
+#define XK_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */
+#define XK_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */
+#define XK_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */
+#define XK_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */
+#define XK_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */
+#define XK_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */
+#define XK_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */
+#define XK_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */
+#define XK_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */
+#define XK_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */
+#define XK_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */
+#define XK_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */
+#define XK_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */
+#define XK_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+#define XK_kana_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_KATAKANA */
+
+/*
+ * Arabic
+ * Byte 3 = 5
+ */
+
+#ifdef XK_ARABIC
+#define XK_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */
+#define XK_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */
+#define XK_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */
+#define XK_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */
+#define XK_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */
+#define XK_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */
+#define XK_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */
+#define XK_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */
+#define XK_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */
+#define XK_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */
+#define XK_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */
+#define XK_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */
+#define XK_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */
+#define XK_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */
+#define XK_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */
+#define XK_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */
+#define XK_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */
+#define XK_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */
+#define XK_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */
+#define XK_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */
+#define XK_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */
+#define XK_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */
+#define XK_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */
+#define XK_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */
+#define XK_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */
+#define XK_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */
+#define XK_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */
+#define XK_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */
+#define XK_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */
+#define XK_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */
+#define XK_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
+#define XK_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
+#define XK_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
+#define XK_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */
+#define XK_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */
+#define XK_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */
+#define XK_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */
+#define XK_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */
+#define XK_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */
+#define XK_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */
+#define XK_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */
+#define XK_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */
+#define XK_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */
+#define XK_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */
+#define XK_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */
+#define XK_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */
+#define XK_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */
+#define XK_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */
+#define XK_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */
+#define XK_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */
+#define XK_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */
+#define XK_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */
+#define XK_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */
+#define XK_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */
+#define XK_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */
+#define XK_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */
+#define XK_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */
+#define XK_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */
+#define XK_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */
+#define XK_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */
+#define XK_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */
+#define XK_Arabic_heh 0x05e7 /* deprecated */
+#define XK_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */
+#define XK_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */
+#define XK_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */
+#define XK_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */
+#define XK_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */
+#define XK_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */
+#define XK_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */
+#define XK_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */
+#define XK_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */
+#define XK_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */
+#define XK_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */
+#define XK_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */
+#define XK_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */
+#define XK_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */
+#define XK_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */
+#define XK_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */
+#define XK_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */
+#define XK_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */
+#define XK_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */
+#define XK_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
+#define XK_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */
+#define XK_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */
+#define XK_Arabic_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_ARABIC */
+
+/*
+ * Cyrillic
+ * Byte 3 = 6
+ */
+#ifdef XK_CYRILLIC
+#define XK_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */
+#define XK_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */
+#define XK_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */
+#define XK_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */
+
+#define XK_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */
+#define XK_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */
+#define XK_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */
+#define XK_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */
+#define XK_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */
+#define XK_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */
+#define XK_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */
+#define XK_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */
+
+#define XK_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */
+#define XK_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */
+#define XK_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */
+#define XK_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */
+#define XK_Ukranian_je 0x06a4 /* deprecated */
+#define XK_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */
+#define XK_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_i 0x06a6 /* deprecated */
+#define XK_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */
+#define XK_Ukranian_yi 0x06a7 /* deprecated */
+#define XK_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */
+#define XK_Serbian_je 0x06a8 /* deprecated */
+#define XK_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */
+#define XK_Serbian_lje 0x06a9 /* deprecated */
+#define XK_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */
+#define XK_Serbian_nje 0x06aa /* deprecated */
+#define XK_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */
+#define XK_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */
+#define XK_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */
+#define XK_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */
+#define XK_Serbian_dze 0x06af /* deprecated */
+#define XK_numerosign 0x06b0 /* U+2116 NUMERO SIGN */
+#define XK_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */
+#define XK_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */
+#define XK_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */
+#define XK_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */
+#define XK_Ukranian_JE 0x06b4 /* deprecated */
+#define XK_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */
+#define XK_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_I 0x06b6 /* deprecated */
+#define XK_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */
+#define XK_Ukranian_YI 0x06b7 /* deprecated */
+#define XK_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */
+#define XK_Serbian_JE 0x06b8 /* deprecated */
+#define XK_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */
+#define XK_Serbian_LJE 0x06b9 /* deprecated */
+#define XK_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */
+#define XK_Serbian_NJE 0x06ba /* deprecated */
+#define XK_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */
+#define XK_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */
+#define XK_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */
+#define XK_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */
+#define XK_Serbian_DZE 0x06bf /* deprecated */
+#define XK_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */
+#define XK_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */
+#define XK_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */
+#define XK_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */
+#define XK_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */
+#define XK_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */
+#define XK_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */
+#define XK_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */
+#define XK_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */
+#define XK_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */
+#define XK_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */
+#define XK_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */
+#define XK_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */
+#define XK_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */
+#define XK_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */
+#define XK_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */
+#define XK_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */
+#define XK_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */
+#define XK_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */
+#define XK_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */
+#define XK_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */
+#define XK_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */
+#define XK_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */
+#define XK_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */
+#define XK_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */
+#define XK_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */
+#define XK_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */
+#define XK_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */
+#define XK_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */
+#define XK_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */
+#define XK_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */
+#define XK_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */
+#define XK_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */
+#define XK_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */
+#define XK_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */
+#define XK_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */
+#define XK_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */
+#define XK_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */
+#define XK_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */
+#define XK_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */
+#define XK_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */
+#define XK_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */
+#define XK_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */
+#define XK_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */
+#define XK_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */
+#define XK_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */
+#define XK_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */
+#define XK_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */
+#define XK_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */
+#define XK_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */
+#define XK_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */
+#define XK_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */
+#define XK_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */
+#define XK_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */
+#define XK_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */
+#define XK_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */
+#define XK_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */
+#define XK_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */
+#define XK_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */
+#define XK_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */
+#define XK_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */
+#define XK_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
+#define XK_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */
+#define XK_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */
+#endif /* XK_CYRILLIC */
+
+/*
+ * Greek
+ * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)
+ * Byte 3 = 7
+ */
+
+#ifdef XK_GREEK
+#define XK_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */
+#define XK_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */
+#define XK_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */
+#define XK_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */
+#define XK_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_IOTAdiaeresis 0x07a5 /* old typo */
+#define XK_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */
+#define XK_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */
+#define XK_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */
+#define XK_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */
+#define XK_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */
+#define XK_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */
+#define XK_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */
+#define XK_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */
+#define XK_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */
+#define XK_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */
+#define XK_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */
+#define XK_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */
+#define XK_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */
+#define XK_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */
+#define XK_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */
+#define XK_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */
+#define XK_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */
+#define XK_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */
+#define XK_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */
+#define XK_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */
+#define XK_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */
+#define XK_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */
+#define XK_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */
+#define XK_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */
+#define XK_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */
+#define XK_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */
+#define XK_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */
+#define XK_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */
+#define XK_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */
+#define XK_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */
+#define XK_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */
+#define XK_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */
+#define XK_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */
+#define XK_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */
+#define XK_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */
+#define XK_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */
+#define XK_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */
+#define XK_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */
+#define XK_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */
+#define XK_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */
+#define XK_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */
+#define XK_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */
+#define XK_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */
+#define XK_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */
+#define XK_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */
+#define XK_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */
+#define XK_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */
+#define XK_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */
+#define XK_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */
+#define XK_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */
+#define XK_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */
+#define XK_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */
+#define XK_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */
+#define XK_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */
+#define XK_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */
+#define XK_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */
+#define XK_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */
+#define XK_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */
+#define XK_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */
+#define XK_Greek_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_GREEK */
+
+/*
+ * Technical
+ * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)
+ * Byte 3 = 8
+ */
+
+#ifdef XK_TECHNICAL
+#define XK_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */
+#define XK_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/
+#define XK_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/
+#define XK_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */
+#define XK_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */
+#define XK_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/
+#define XK_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */
+#define XK_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */
+#define XK_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */
+#define XK_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */
+#define XK_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */
+#define XK_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */
+#define XK_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */
+#define XK_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */
+#define XK_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */
+#define XK_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */
+#define XK_topleftsummation 0x08b1
+#define XK_botleftsummation 0x08b2
+#define XK_topvertsummationconnector 0x08b3
+#define XK_botvertsummationconnector 0x08b4
+#define XK_toprightsummation 0x08b5
+#define XK_botrightsummation 0x08b6
+#define XK_rightmiddlesummation 0x08b7
+#define XK_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */
+#define XK_notequal 0x08bd /* U+2260 NOT EQUAL TO */
+#define XK_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */
+#define XK_integral 0x08bf /* U+222B INTEGRAL */
+#define XK_therefore 0x08c0 /* U+2234 THEREFORE */
+#define XK_variation 0x08c1 /* U+221D PROPORTIONAL TO */
+#define XK_infinity 0x08c2 /* U+221E INFINITY */
+#define XK_nabla 0x08c5 /* U+2207 NABLA */
+#define XK_approximate 0x08c8 /* U+223C TILDE OPERATOR */
+#define XK_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */
+#define XK_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */
+#define XK_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */
+#define XK_identical 0x08cf /* U+2261 IDENTICAL TO */
+#define XK_radical 0x08d6 /* U+221A SQUARE ROOT */
+#define XK_includedin 0x08da /* U+2282 SUBSET OF */
+#define XK_includes 0x08db /* U+2283 SUPERSET OF */
+#define XK_intersection 0x08dc /* U+2229 INTERSECTION */
+#define XK_union 0x08dd /* U+222A UNION */
+#define XK_logicaland 0x08de /* U+2227 LOGICAL AND */
+#define XK_logicalor 0x08df /* U+2228 LOGICAL OR */
+#define XK_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */
+#define XK_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */
+#define XK_uparrow 0x08fc /* U+2191 UPWARDS ARROW */
+#define XK_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */
+#define XK_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */
+#endif /* XK_TECHNICAL */
+
+/*
+ * Special
+ * (from the DEC VT100 Special Graphics Character Set)
+ * Byte 3 = 9
+ */
+
+#ifdef XK_SPECIAL
+#define XK_blank 0x09df
+#define XK_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */
+#define XK_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */
+#define XK_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */
+#define XK_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */
+#define XK_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */
+#define XK_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */
+#define XK_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */
+#define XK_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */
+#define XK_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */
+#define XK_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */
+#define XK_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */
+#define XK_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */
+#define XK_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
+#define XK_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */
+#define XK_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */
+#define XK_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */
+#define XK_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */
+#define XK_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */
+#define XK_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+#define XK_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */
+#define XK_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */
+#define XK_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
+#define XK_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
+#endif /* XK_SPECIAL */
+
+/*
+ * Publishing
+ * (these are probably from a long forgotten DEC Publishing
+ * font that once shipped with DECwrite)
+ * Byte 3 = 0x0a
+ */
+
+#ifdef XK_PUBLISHING
+#define XK_emspace 0x0aa1 /* U+2003 EM SPACE */
+#define XK_enspace 0x0aa2 /* U+2002 EN SPACE */
+#define XK_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */
+#define XK_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */
+#define XK_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */
+#define XK_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */
+#define XK_thinspace 0x0aa7 /* U+2009 THIN SPACE */
+#define XK_hairspace 0x0aa8 /* U+200A HAIR SPACE */
+#define XK_emdash 0x0aa9 /* U+2014 EM DASH */
+#define XK_endash 0x0aaa /* U+2013 EN DASH */
+#define XK_signifblank 0x0aac /*(U+2423 OPEN BOX)*/
+#define XK_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */
+#define XK_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */
+#define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */
+#define XK_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */
+#define XK_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */
+#define XK_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */
+#define XK_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */
+#define XK_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */
+#define XK_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */
+#define XK_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */
+#define XK_careof 0x0ab8 /* U+2105 CARE OF */
+#define XK_figdash 0x0abb /* U+2012 FIGURE DASH */
+#define XK_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
+#define XK_decimalpoint 0x0abd /*(U+002E FULL STOP)*/
+#define XK_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/
+#define XK_marker 0x0abf
+#define XK_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */
+#define XK_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */
+#define XK_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */
+#define XK_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */
+#define XK_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */
+#define XK_signaturemark 0x0aca /*(U+2613 SALTIRE)*/
+#define XK_trademarkincircle 0x0acb
+#define XK_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/
+#define XK_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/
+#define XK_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/
+#define XK_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/
+#define XK_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */
+#define XK_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */
+#define XK_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */
+#define XK_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */
+#define XK_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */
+#define XK_minutes 0x0ad6 /* U+2032 PRIME */
+#define XK_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */
+#define XK_latincross 0x0ad9 /* U+271D LATIN CROSS */
+#define XK_hexagram 0x0ada
+#define XK_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/
+#define XK_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/
+#define XK_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/
+#define XK_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/
+#define XK_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/
+#define XK_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/
+#define XK_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/
+#define XK_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/
+#define XK_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/
+#define XK_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/
+#define XK_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/
+#define XK_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/
+#define XK_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/
+#define XK_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/
+#define XK_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/
+#define XK_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/
+#define XK_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/
+#define XK_club 0x0aec /* U+2663 BLACK CLUB SUIT */
+#define XK_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */
+#define XK_heart 0x0aee /* U+2665 BLACK HEART SUIT */
+#define XK_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */
+#define XK_dagger 0x0af1 /* U+2020 DAGGER */
+#define XK_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */
+#define XK_checkmark 0x0af3 /* U+2713 CHECK MARK */
+#define XK_ballotcross 0x0af4 /* U+2717 BALLOT X */
+#define XK_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */
+#define XK_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */
+#define XK_malesymbol 0x0af7 /* U+2642 MALE SIGN */
+#define XK_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */
+#define XK_telephone 0x0af9 /* U+260E BLACK TELEPHONE */
+#define XK_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */
+#define XK_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */
+#define XK_caret 0x0afc /* U+2038 CARET */
+#define XK_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */
+#define XK_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */
+#define XK_cursor 0x0aff
+#endif /* XK_PUBLISHING */
+
+/*
+ * APL
+ * Byte 3 = 0x0b
+ */
+
+#ifdef XK_APL
+#define XK_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/
+#define XK_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/
+#define XK_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/
+#define XK_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/
+#define XK_overbar 0x0bc0 /*(U+00AF MACRON)*/
+#define XK_downtack 0x0bc2 /* U+22A4 DOWN TACK */
+#define XK_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/
+#define XK_downstile 0x0bc4 /* U+230A LEFT FLOOR */
+#define XK_underbar 0x0bc6 /*(U+005F LOW LINE)*/
+#define XK_jot 0x0bca /* U+2218 RING OPERATOR */
+#define XK_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */
+#define XK_uptack 0x0bce /* U+22A5 UP TACK */
+#define XK_circle 0x0bcf /* U+25CB WHITE CIRCLE */
+#define XK_upstile 0x0bd3 /* U+2308 LEFT CEILING */
+#define XK_downshoe 0x0bd6 /*(U+222A UNION)*/
+#define XK_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/
+#define XK_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/
+#define XK_lefttack 0x0bdc /* U+22A3 LEFT TACK */
+#define XK_righttack 0x0bfc /* U+22A2 RIGHT TACK */
+#endif /* XK_APL */
+
+/*
+ * Hebrew
+ * Byte 3 = 0x0c
+ */
+
+#ifdef XK_HEBREW
+#define XK_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */
+#define XK_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */
+#define XK_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */
+#define XK_hebrew_beth 0x0ce1 /* deprecated */
+#define XK_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */
+#define XK_hebrew_gimmel 0x0ce2 /* deprecated */
+#define XK_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */
+#define XK_hebrew_daleth 0x0ce3 /* deprecated */
+#define XK_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */
+#define XK_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */
+#define XK_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */
+#define XK_hebrew_zayin 0x0ce6 /* deprecated */
+#define XK_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */
+#define XK_hebrew_het 0x0ce7 /* deprecated */
+#define XK_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */
+#define XK_hebrew_teth 0x0ce8 /* deprecated */
+#define XK_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */
+#define XK_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */
+#define XK_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */
+#define XK_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */
+#define XK_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */
+#define XK_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */
+#define XK_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */
+#define XK_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */
+#define XK_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */
+#define XK_hebrew_samekh 0x0cf1 /* deprecated */
+#define XK_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */
+#define XK_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */
+#define XK_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */
+#define XK_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */
+#define XK_hebrew_finalzadi 0x0cf5 /* deprecated */
+#define XK_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */
+#define XK_hebrew_zadi 0x0cf6 /* deprecated */
+#define XK_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */
+#define XK_hebrew_kuf 0x0cf7 /* deprecated */
+#define XK_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */
+#define XK_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */
+#define XK_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */
+#define XK_hebrew_taf 0x0cfa /* deprecated */
+#define XK_Hebrew_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_HEBREW */
+
+/*
+ * Thai
+ * Byte 3 = 0x0d
+ */
+
+#ifdef XK_THAI
+#define XK_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */
+#define XK_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */
+#define XK_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */
+#define XK_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */
+#define XK_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */
+#define XK_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */
+#define XK_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */
+#define XK_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */
+#define XK_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */
+#define XK_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */
+#define XK_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */
+#define XK_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */
+#define XK_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */
+#define XK_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */
+#define XK_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */
+#define XK_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */
+#define XK_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */
+#define XK_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */
+#define XK_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */
+#define XK_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */
+#define XK_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */
+#define XK_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */
+#define XK_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */
+#define XK_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */
+#define XK_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */
+#define XK_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */
+#define XK_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */
+#define XK_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */
+#define XK_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */
+#define XK_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */
+#define XK_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */
+#define XK_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */
+#define XK_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */
+#define XK_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */
+#define XK_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */
+#define XK_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */
+#define XK_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */
+#define XK_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */
+#define XK_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */
+#define XK_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */
+#define XK_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */
+#define XK_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */
+#define XK_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */
+#define XK_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */
+#define XK_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */
+#define XK_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */
+#define XK_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */
+#define XK_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */
+#define XK_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */
+#define XK_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */
+#define XK_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */
+#define XK_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */
+#define XK_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */
+#define XK_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */
+#define XK_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */
+#define XK_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */
+#define XK_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */
+#define XK_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */
+#define XK_Thai_maihanakat_maitho 0x0dde
+#define XK_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */
+#define XK_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */
+#define XK_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */
+#define XK_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */
+#define XK_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */
+#define XK_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */
+#define XK_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */
+#define XK_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */
+#define XK_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */
+#define XK_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */
+#define XK_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */
+#define XK_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */
+#define XK_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */
+#define XK_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */
+#define XK_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */
+#define XK_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */
+#define XK_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */
+#define XK_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */
+#define XK_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */
+#define XK_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */
+#define XK_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */
+#define XK_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */
+#define XK_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */
+#define XK_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */
+#define XK_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */
+#endif /* XK_THAI */
+
+/*
+ * Korean
+ * Byte 3 = 0x0e
+ */
+
+#ifdef XK_KOREAN
+
+#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */
+#define XK_Hangul_Start 0xff32 /* Hangul start */
+#define XK_Hangul_End 0xff33 /* Hangul end, English start */
+#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */
+#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */
+#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */
+#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */
+#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */
+#define XK_Hangul_Banja 0xff39 /* Banja mode */
+#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */
+#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */
+#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */
+#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */
+#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */
+#define XK_Hangul_Special 0xff3f /* Special symbols */
+#define XK_Hangul_switch 0xff7e /* Alias for mode_switch */
+
+/* Hangul Consonant Characters */
+#define XK_Hangul_Kiyeog 0x0ea1
+#define XK_Hangul_SsangKiyeog 0x0ea2
+#define XK_Hangul_KiyeogSios 0x0ea3
+#define XK_Hangul_Nieun 0x0ea4
+#define XK_Hangul_NieunJieuj 0x0ea5
+#define XK_Hangul_NieunHieuh 0x0ea6
+#define XK_Hangul_Dikeud 0x0ea7
+#define XK_Hangul_SsangDikeud 0x0ea8
+#define XK_Hangul_Rieul 0x0ea9
+#define XK_Hangul_RieulKiyeog 0x0eaa
+#define XK_Hangul_RieulMieum 0x0eab
+#define XK_Hangul_RieulPieub 0x0eac
+#define XK_Hangul_RieulSios 0x0ead
+#define XK_Hangul_RieulTieut 0x0eae
+#define XK_Hangul_RieulPhieuf 0x0eaf
+#define XK_Hangul_RieulHieuh 0x0eb0
+#define XK_Hangul_Mieum 0x0eb1
+#define XK_Hangul_Pieub 0x0eb2
+#define XK_Hangul_SsangPieub 0x0eb3
+#define XK_Hangul_PieubSios 0x0eb4
+#define XK_Hangul_Sios 0x0eb5
+#define XK_Hangul_SsangSios 0x0eb6
+#define XK_Hangul_Ieung 0x0eb7
+#define XK_Hangul_Jieuj 0x0eb8
+#define XK_Hangul_SsangJieuj 0x0eb9
+#define XK_Hangul_Cieuc 0x0eba
+#define XK_Hangul_Khieuq 0x0ebb
+#define XK_Hangul_Tieut 0x0ebc
+#define XK_Hangul_Phieuf 0x0ebd
+#define XK_Hangul_Hieuh 0x0ebe
+
+/* Hangul Vowel Characters */
+#define XK_Hangul_A 0x0ebf
+#define XK_Hangul_AE 0x0ec0
+#define XK_Hangul_YA 0x0ec1
+#define XK_Hangul_YAE 0x0ec2
+#define XK_Hangul_EO 0x0ec3
+#define XK_Hangul_E 0x0ec4
+#define XK_Hangul_YEO 0x0ec5
+#define XK_Hangul_YE 0x0ec6
+#define XK_Hangul_O 0x0ec7
+#define XK_Hangul_WA 0x0ec8
+#define XK_Hangul_WAE 0x0ec9
+#define XK_Hangul_OE 0x0eca
+#define XK_Hangul_YO 0x0ecb
+#define XK_Hangul_U 0x0ecc
+#define XK_Hangul_WEO 0x0ecd
+#define XK_Hangul_WE 0x0ece
+#define XK_Hangul_WI 0x0ecf
+#define XK_Hangul_YU 0x0ed0
+#define XK_Hangul_EU 0x0ed1
+#define XK_Hangul_YI 0x0ed2
+#define XK_Hangul_I 0x0ed3
+
+/* Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_Kiyeog 0x0ed4
+#define XK_Hangul_J_SsangKiyeog 0x0ed5
+#define XK_Hangul_J_KiyeogSios 0x0ed6
+#define XK_Hangul_J_Nieun 0x0ed7
+#define XK_Hangul_J_NieunJieuj 0x0ed8
+#define XK_Hangul_J_NieunHieuh 0x0ed9
+#define XK_Hangul_J_Dikeud 0x0eda
+#define XK_Hangul_J_Rieul 0x0edb
+#define XK_Hangul_J_RieulKiyeog 0x0edc
+#define XK_Hangul_J_RieulMieum 0x0edd
+#define XK_Hangul_J_RieulPieub 0x0ede
+#define XK_Hangul_J_RieulSios 0x0edf
+#define XK_Hangul_J_RieulTieut 0x0ee0
+#define XK_Hangul_J_RieulPhieuf 0x0ee1
+#define XK_Hangul_J_RieulHieuh 0x0ee2
+#define XK_Hangul_J_Mieum 0x0ee3
+#define XK_Hangul_J_Pieub 0x0ee4
+#define XK_Hangul_J_PieubSios 0x0ee5
+#define XK_Hangul_J_Sios 0x0ee6
+#define XK_Hangul_J_SsangSios 0x0ee7
+#define XK_Hangul_J_Ieung 0x0ee8
+#define XK_Hangul_J_Jieuj 0x0ee9
+#define XK_Hangul_J_Cieuc 0x0eea
+#define XK_Hangul_J_Khieuq 0x0eeb
+#define XK_Hangul_J_Tieut 0x0eec
+#define XK_Hangul_J_Phieuf 0x0eed
+#define XK_Hangul_J_Hieuh 0x0eee
+
+/* Ancient Hangul Consonant Characters */
+#define XK_Hangul_RieulYeorinHieuh 0x0eef
+#define XK_Hangul_SunkyeongeumMieum 0x0ef0
+#define XK_Hangul_SunkyeongeumPieub 0x0ef1
+#define XK_Hangul_PanSios 0x0ef2
+#define XK_Hangul_KkogjiDalrinIeung 0x0ef3
+#define XK_Hangul_SunkyeongeumPhieuf 0x0ef4
+#define XK_Hangul_YeorinHieuh 0x0ef5
+
+/* Ancient Hangul Vowel Characters */
+#define XK_Hangul_AraeA 0x0ef6
+#define XK_Hangul_AraeAE 0x0ef7
+
+/* Ancient Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_PanSios 0x0ef8
+#define XK_Hangul_J_KkogjiDalrinIeung 0x0ef9
+#define XK_Hangul_J_YeorinHieuh 0x0efa
+
+/* Korean currency symbol */
+#define XK_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/
+
+#endif /* XK_KOREAN */
+
+/*
+ * Armenian
+ */
+
+#ifdef XK_ARMENIAN
+#define XK_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */
+#define XK_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
+#define XK_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */
+#define XK_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */
+#define XK_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */
+#define XK_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */
+#define XK_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */
+#define XK_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */
+#define XK_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */
+#define XK_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */
+#define XK_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */
+#define XK_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */
+#define XK_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */
+#define XK_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */
+#define XK_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */
+#define XK_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */
+#define XK_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */
+#define XK_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */
+#define XK_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */
+#define XK_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */
+#define XK_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */
+#define XK_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */
+#define XK_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */
+#define XK_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */
+#define XK_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */
+#define XK_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */
+#define XK_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */
+#define XK_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */
+#define XK_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */
+#define XK_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */
+#define XK_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */
+#define XK_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */
+#define XK_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */
+#define XK_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */
+#define XK_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */
+#define XK_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */
+#define XK_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */
+#define XK_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */
+#define XK_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */
+#define XK_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */
+#define XK_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */
+#define XK_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */
+#define XK_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */
+#define XK_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */
+#define XK_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */
+#define XK_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */
+#define XK_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */
+#define XK_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */
+#define XK_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */
+#define XK_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */
+#define XK_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */
+#define XK_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */
+#define XK_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */
+#define XK_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */
+#define XK_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */
+#define XK_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */
+#define XK_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */
+#define XK_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */
+#define XK_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */
+#define XK_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */
+#define XK_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */
+#define XK_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */
+#define XK_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */
+#define XK_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */
+#define XK_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */
+#define XK_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */
+#define XK_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */
+#define XK_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */
+#define XK_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */
+#define XK_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */
+#define XK_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */
+#define XK_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */
+#define XK_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */
+#define XK_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */
+#define XK_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */
+#define XK_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */
+#define XK_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */
+#define XK_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */
+#endif /* XK_ARMENIAN */
+
+/*
+ * Georgian
+ */
+
+#ifdef XK_GEORGIAN
+#define XK_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */
+#define XK_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */
+#define XK_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */
+#define XK_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */
+#define XK_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */
+#define XK_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */
+#define XK_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */
+#define XK_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */
+#define XK_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */
+#define XK_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */
+#define XK_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */
+#define XK_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */
+#define XK_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */
+#define XK_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */
+#define XK_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */
+#define XK_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */
+#define XK_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */
+#define XK_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */
+#define XK_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */
+#define XK_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */
+#define XK_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */
+#define XK_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */
+#define XK_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */
+#define XK_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */
+#define XK_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */
+#define XK_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */
+#define XK_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */
+#define XK_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */
+#define XK_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */
+#define XK_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */
+#define XK_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */
+#define XK_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */
+#define XK_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */
+#define XK_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */
+#define XK_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */
+#define XK_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */
+#define XK_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */
+#define XK_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */
+#define XK_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */
+#endif /* XK_GEORGIAN */
+
+/*
+ * Azeri (and other Turkic or Caucasian languages)
+ */
+
+#ifdef XK_CAUCASUS
+/* latin */
+#define XK_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */
+#define XK_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */
+#define XK_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */
+#define XK_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */
+#define XK_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */
+#define XK_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */
+#define XK_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */
+#define XK_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */
+#define XK_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */
+#define XK_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */
+#define XK_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */
+#define XK_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */
+#define XK_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */
+#define XK_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */
+/* those are not really Caucasus */
+/* For Inupiak */
+#define XK_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */
+#define XK_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */
+#endif /* XK_CAUCASUS */
+
+/*
+ * Vietnamese
+ */
+
+#ifdef XK_VIETNAMESE
+#define XK_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */
+#define XK_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */
+#define XK_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */
+#define XK_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */
+#define XK_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */
+#define XK_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */
+#define XK_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */
+#define XK_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */
+#define XK_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */
+#define XK_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */
+#define XK_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */
+#define XK_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */
+#define XK_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */
+#define XK_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */
+#define XK_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */
+#define XK_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */
+#define XK_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */
+#define XK_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */
+#define XK_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */
+#define XK_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */
+#define XK_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */
+#define XK_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */
+#define XK_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */
+#define XK_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */
+#define XK_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */
+#define XK_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */
+#define XK_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */
+#define XK_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */
+#define XK_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */
+#define XK_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */
+#define XK_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */
+#define XK_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */
+#define XK_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */
+#define XK_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */
+#define XK_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */
+#define XK_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */
+#define XK_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */
+#define XK_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */
+#define XK_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */
+#define XK_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */
+#define XK_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */
+#define XK_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */
+#define XK_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */
+#define XK_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */
+#define XK_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */
+#define XK_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */
+#define XK_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */
+#define XK_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */
+#define XK_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */
+#define XK_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */
+#define XK_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */
+#define XK_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */
+#define XK_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */
+#define XK_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */
+
+#endif /* XK_VIETNAMESE */
+
+#ifdef XK_CURRENCY
+#define XK_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */
+#define XK_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */
+#define XK_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */
+#define XK_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */
+#define XK_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */
+#define XK_MillSign 0x10020a5 /* U+20A5 MILL SIGN */
+#define XK_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */
+#define XK_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */
+#define XK_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */
+#define XK_WonSign 0x10020a9 /* U+20A9 WON SIGN */
+#define XK_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */
+#define XK_DongSign 0x10020ab /* U+20AB DONG SIGN */
+#define XK_EuroSign 0x20ac /* U+20AC EURO SIGN */
+#endif /* XK_CURRENCY */
+
+#ifdef XK_MATHEMATICAL
+/* one, two and three are defined above. */
+#define XK_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */
+#define XK_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */
+#define XK_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */
+#define XK_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */
+#define XK_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */
+#define XK_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */
+#define XK_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */
+#define XK_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */
+#define XK_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */
+#define XK_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */
+#define XK_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */
+#define XK_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */
+#define XK_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */
+#define XK_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */
+#define XK_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */
+#define XK_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */
+#define XK_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */
+#define XK_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_emptyset 0x1002205 /* U+2205 NULL SET */
+#define XK_elementof 0x1002208 /* U+2208 ELEMENT OF */
+#define XK_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */
+#define XK_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */
+#define XK_squareroot 0x100221A /* U+221A SQUARE ROOT */
+#define XK_cuberoot 0x100221B /* U+221B CUBE ROOT */
+#define XK_fourthroot 0x100221C /* U+221C FOURTH ROOT */
+#define XK_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */
+#define XK_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */
+#define XK_because 0x1002235 /* U+2235 BECAUSE */
+#define XK_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */
+#define XK_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */
+#define XK_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */
+#define XK_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */
+#endif /* XK_MATHEMATICAL */
+
+#ifdef XK_BRAILLE
+#define XK_braille_dot_1 0xfff1
+#define XK_braille_dot_2 0xfff2
+#define XK_braille_dot_3 0xfff3
+#define XK_braille_dot_4 0xfff4
+#define XK_braille_dot_5 0xfff5
+#define XK_braille_dot_6 0xfff6
+#define XK_braille_dot_7 0xfff7
+#define XK_braille_dot_8 0xfff8
+#define XK_braille_dot_9 0xfff9
+#define XK_braille_dot_10 0xfffa
+#define XK_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */
+#define XK_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */
+#define XK_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */
+#define XK_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */
+#define XK_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */
+#define XK_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */
+#define XK_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */
+#define XK_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */
+#define XK_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */
+#define XK_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */
+#define XK_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */
+#define XK_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */
+#define XK_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */
+#define XK_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */
+#define XK_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */
+#define XK_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */
+#define XK_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */
+#define XK_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */
+#define XK_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */
+#define XK_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */
+#define XK_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */
+#define XK_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */
+#define XK_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */
+#define XK_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */
+#define XK_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */
+#define XK_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */
+#define XK_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */
+#define XK_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */
+#define XK_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */
+#define XK_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */
+#define XK_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */
+#define XK_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */
+#define XK_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */
+#define XK_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */
+#define XK_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */
+#define XK_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */
+#define XK_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */
+#define XK_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */
+#define XK_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */
+#define XK_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */
+#define XK_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */
+#define XK_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */
+#define XK_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */
+#define XK_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */
+#define XK_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */
+#define XK_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */
+#define XK_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */
+#define XK_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */
+#define XK_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */
+#define XK_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */
+#define XK_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */
+#define XK_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */
+#define XK_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */
+#define XK_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */
+#define XK_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */
+#define XK_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */
+#define XK_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */
+#define XK_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */
+#define XK_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */
+#define XK_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */
+#define XK_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */
+#define XK_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */
+#define XK_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */
+#define XK_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */
+#define XK_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */
+#define XK_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */
+#define XK_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */
+#define XK_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */
+#define XK_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */
+#define XK_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */
+#define XK_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */
+#define XK_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */
+#define XK_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */
+#define XK_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */
+#define XK_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */
+#define XK_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */
+#define XK_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */
+#define XK_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */
+#define XK_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */
+#define XK_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */
+#define XK_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */
+#define XK_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */
+#define XK_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */
+#define XK_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */
+#define XK_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */
+#define XK_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */
+#define XK_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */
+#define XK_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */
+#define XK_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */
+#define XK_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */
+#define XK_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */
+#define XK_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */
+#define XK_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */
+#define XK_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */
+#define XK_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */
+#define XK_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */
+#define XK_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */
+#define XK_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */
+#define XK_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */
+#define XK_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */
+#define XK_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */
+#define XK_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */
+#define XK_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */
+#define XK_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */
+#define XK_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */
+#define XK_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */
+#define XK_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */
+#define XK_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */
+#define XK_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */
+#define XK_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */
+#define XK_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */
+#define XK_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */
+#define XK_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */
+#define XK_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */
+#define XK_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */
+#define XK_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */
+#define XK_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */
+#define XK_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */
+#define XK_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */
+#define XK_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */
+#define XK_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */
+#define XK_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */
+#define XK_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */
+#define XK_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */
+#define XK_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */
+#define XK_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */
+#define XK_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */
+#define XK_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */
+#define XK_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */
+#define XK_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */
+#define XK_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */
+#define XK_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */
+#define XK_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */
+#define XK_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */
+#define XK_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */
+#define XK_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */
+#define XK_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */
+#define XK_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */
+#define XK_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */
+#define XK_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */
+#define XK_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */
+#define XK_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */
+#define XK_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */
+#define XK_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */
+#define XK_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */
+#define XK_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */
+#define XK_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */
+#define XK_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */
+#define XK_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */
+#define XK_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */
+#define XK_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */
+#define XK_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */
+#define XK_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */
+#define XK_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */
+#define XK_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */
+#define XK_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */
+#define XK_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */
+#define XK_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */
+#define XK_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */
+#define XK_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */
+#define XK_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */
+#define XK_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */
+#define XK_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */
+#define XK_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */
+#define XK_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */
+#define XK_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */
+#define XK_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */
+#define XK_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */
+#define XK_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */
+#define XK_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */
+#define XK_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */
+#define XK_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */
+#define XK_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */
+#define XK_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */
+#define XK_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */
+#define XK_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */
+#define XK_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */
+#define XK_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */
+#define XK_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */
+#define XK_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */
+#define XK_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */
+#define XK_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */
+#define XK_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */
+#define XK_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */
+#define XK_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */
+#define XK_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */
+#define XK_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */
+#define XK_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */
+#define XK_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */
+#define XK_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */
+#define XK_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */
+#define XK_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */
+#define XK_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */
+#define XK_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */
+#define XK_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */
+#define XK_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */
+#define XK_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */
+#define XK_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */
+#define XK_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */
+#define XK_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */
+#define XK_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */
+#define XK_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */
+#define XK_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */
+#define XK_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */
+#define XK_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */
+#define XK_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */
+#define XK_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */
+#define XK_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */
+#define XK_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */
+#define XK_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */
+#define XK_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */
+#define XK_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */
+#define XK_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */
+#define XK_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */
+#define XK_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */
+#define XK_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */
+#define XK_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */
+#define XK_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */
+#define XK_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */
+#define XK_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */
+#define XK_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */
+#define XK_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */
+#define XK_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */
+#define XK_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */
+#define XK_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */
+#define XK_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */
+#define XK_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */
+#define XK_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */
+#define XK_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */
+#define XK_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */
+#define XK_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */
+#define XK_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */
+#define XK_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */
+#define XK_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */
+#define XK_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */
+#define XK_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */
+#define XK_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */
+#define XK_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */
+#define XK_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */
+#define XK_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */
+#define XK_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */
+#define XK_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */
+#define XK_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */
+#define XK_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */
+#define XK_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */
+#define XK_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */
+#define XK_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */
+#define XK_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */
+#define XK_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */
+#define XK_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */
+#define XK_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */
+#define XK_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */
+#define XK_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */
+#define XK_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */
+#define XK_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */
+#define XK_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */
+#endif /* XK_BRAILLE */
diff --git a/X11/missing b/X11/missing
new file mode 100644
index 000000000..1c8ff7049
--- /dev/null
+++ b/X11/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/xproto.pc.in b/X11/xproto.pc.in
new file mode 100644
index 000000000..63ae864a1
--- /dev/null
+++ b/X11/xproto.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+includex11dir=@includedir@/X11
+
+Name: Xproto
+Description: Xproto headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/X11/xtrans/AUTHORS b/X11/xtrans/AUTHORS
new file mode 100644
index 000000000..87f4ec7d3
--- /dev/null
+++ b/X11/xtrans/AUTHORS
@@ -0,0 +1,7 @@
+Contributors to this package include The Open Group (another words, the
+X Consortium), NCR Corporation, Sebastien Marineau and Holger Veit
+(OS/2 support), Sun Microsystems, David Dawes, Egbert Eich, Alan Coopersmith
+Marc La France, J. Kean Johnston, Frank Giessler, Jean-Claude Michot, and
+Matthieu Herrb.
+
+Our apologies if we missed anyone.
diff --git a/X11/xtrans/COPYING b/X11/xtrans/COPYING
new file mode 100644
index 000000000..a7977606d
--- /dev/null
+++ b/X11/xtrans/COPYING
@@ -0,0 +1,124 @@
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+______________________________________________________________________________
+
+Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name NCR not be used in advertising
+or publicity pertaining to distribution of the software without specific,
+written prior permission. NCR makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+
+NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+______________________________________________________________________________
+
+Copyright 2002, 2005 Sun Microsystems, Inc. All rights reserved.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the copyright holders shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the copyright holders.
+
+______________________________________________________________________________
+
+(c) Copyright 1996 by Sebastien Marineau and Holger Veit
+ <marineau@genie.uottawa.ca>
+ <Holger.Veit@gmd.de>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Except as contained in this notice, the name of Sebastien Marineau or
+Holger Veit shall not be used in advertising or otherwise to promote
+the sale, use or other dealings in this Software without prior written
+authorization from Holger Veit or Sebastien Marineau.
+
+______________________________________________________________________________
+
+Copyright © 2003 Keith Packard, Noah Levitt
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/X11/xtrans/ChangeLog b/X11/xtrans/ChangeLog
new file mode 100644
index 000000000..de5797e3a
--- /dev/null
+++ b/X11/xtrans/ChangeLog
@@ -0,0 +1,867 @@
+commit 1185dd2966521e1a19474dfd4206306cb383fc89
+Author: Adam Jackson <ajax@redhat.com>
+Date: Tue Oct 7 09:55:22 2008 -0400
+
+ Finish removing OS/2 support
+
+commit 51b2e85aeb172f4a058d8ceceec91021ffd0b2a5
+Author: Adam Jackson <ajax@redhat.com>
+Date: Tue Oct 7 09:51:27 2008 -0400
+
+ Remove DECNET support.
+
+ This hasn't been consumed in the server or libs since 7.0.
+
+commit 892ec928da3a0653ae54c321e4c3b1aa06c4e678
+Author: Adam Jackson <ajax@redhat.com>
+Date: Thu Aug 7 10:32:11 2008 -0400
+
+ Drastically simplify TRANS_OPEN_MAX.
+
+ If your OS doesn't have sysconf(3), then life is already hard for you.
+
+commit 339ddc413559d4cb117a72f87b2a70dae6911c32
+Author: Adam Jackson <ajax@redhat.com>
+Date: Thu Aug 7 10:23:19 2008 -0400
+
+ Massive ifdef cleanup, dropping a ton of unsupported platform code.
+
+commit a78b9819cbbbddccb4a6bf364b88ec4f27d25c1f
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Tue Aug 5 17:46:37 2008 -0700
+
+ Added a flag to enable "The OS already took care of securing this, please skip checking xauth" for use with Apple launchd sockets.
+
+commit 3db805979b476d233baa881e83950ef1d2731841
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Tue Jul 15 16:56:12 2008 -0700
+
+ Apple: Allow Xquartz to provide an additional fd to xtrans since the dynamic addition code in the server isn't bulletproof yet.
+
+commit 81d8bdced6b45ab2ab3d3a0bc164ddbf1659fea1
+Author: Adam Jackson <ajax@redhat.com>
+Date: Wed Jul 2 15:24:20 2008 -0400
+
+ xtrans 1.2.1
+
+commit 302af17c4d5f0293a9af4d6c1097ab57a57d3f0f
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Jun 24 15:45:38 2008 -0700
+
+ Clear some pointer type mismatch warnings
+
+commit 4d184e41d30a8fe27380e04beb24f775d4a40782
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Jun 24 15:45:18 2008 -0700
+
+ LocalClose() takes a ConnInfoPtr, not an fd
+
+commit 177c2fd41727bd0110b493933dcbdbf21878fe09
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Fri May 23 09:48:59 2008 -0700
+
+ Launchd: This functionality has been moved into xorg-server
+
+commit 02fcb08803dca5bb2df4f8be490a845659bd7ed3
+Author: Adam Jackson <ajax@redhat.com>
+Date: Mon May 12 17:49:41 2008 -0400
+
+ Connection failure for abstract socket is ECONNREFUSED, not ENOENT.
+
+ Apropos of bug #15884.
+
+commit 906294025573d07c739894fa3b2eedc82813a379
+Author: Bill Nottingham <notting@redhat.com>
+Date: Mon May 12 17:43:36 2008 -0400
+
+ Ignore mkdir() errors when creating the abstract socket.
+
+ Red Hat bug #445303.
+
+commit 08134c2ce72bc43c172b6ae134d8a94a40b45c9b
+Author: James Cloos <cloos@jhcloos.com>
+Date: Sat May 10 07:02:09 2008 -0400
+
+ Remove extraneous execute bit from .c file
+
+commit e75b9dad0ae4bc0869af81652d8259675a3c5cac
+Author: Julien Cristau <jcristau@debian.org>
+Date: Thu May 8 16:27:29 2008 +0200
+
+ Bump to 1.2
+
+commit 962ad4d3f8096f5ffa14b32b3ee094f250790c77
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date: Mon Apr 28 23:46:05 2008 +0100
+
+ disable UNIXCONN on MINGW
+
+commit 9e8c0e3356bc6359368b7655d3a717d6c000387e
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date: Sat Apr 26 16:23:19 2008 +0100
+
+ fix build for MAKEWORD
+
+commit 568c5ea02ee1de437833ee0b53a7b3fd7ece084f
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Sat Apr 26 08:53:13 2008 +0100
+
+ Update to winsock2
+
+commit 960902584a3ef125946beb5ebe331b54d697e9d9
+Author: James Cloos <cloos@jhcloos.com>
+Date: Fri Apr 25 15:53:20 2008 -0400
+
+ Fix length calculation for the path for abstract unix domain sockets
+
+ Since the struct has a fixed-lenght char[] its sizeof() contains
+ trailing NUL octets which results in corrupt abstract sockets.
+
+ Instead, take the strlen(3) of the path, plus the single NUL octet
+ (which identifies the path as an abstract path rather than a file-
+ system path) plus the offset from the start of the struct to the
+ start of the char array.
+
+ This fixes:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=15677
+
+commit 3a2a5375b8aab85697b4f2644ab99c3ccf79e658
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Wed Apr 23 10:39:30 2008 +0100
+
+ Only call WSAGetLastError() if there has been an
+ error condition.
+
+commit ac13a1a34b61247a21da130f0ba9922f35d3dc3b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Apr 15 12:32:35 2008 -0700
+
+ Sun bug #6688467: _X11TransConvertAddress: Unknown family type on 64-bit SPARC
+
+ Check for socklen_t definition and if found use it instead of size_t or
+ int for the length argument to getpeername/getsockname/etc.
+
+ <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6688467>
+
+commit 556a351de83fc6f401b02213dae95731553c216d
+Author: Loïc Minier <lool@dooz.org>
+Date: Mon Mar 24 15:38:27 2008 -0400
+
+ Bug #10489: Don't retry unix socket connect()s on ENOENT.
+
+ If the socket isn't there, it's not gonna magically appear. Either it's
+ a server socket and you should have just waited for the SIGUSR1 from the
+ server, or it's a stale reference to an ICE socket.
+
+ However, do retry once, so fallback from abstract to filesystem namespace
+ works.
+
+ Originally Debian bug #385976.
+
+commit 3de3e666e0653d4e8ae23fc3e6e31864ddad4059
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sun Mar 23 19:43:32 2008 +0100
+
+ BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN
+
+ GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN.
+ Check for the latter directly.
+
+commit 662994b9096181117cec4cae88f24bf6da806159
+Author: Adam Jackson <ajax@redhat.com>
+Date: Wed Mar 5 21:02:28 2008 -0500
+
+ xtrans 1.1
+
+commit 2afe206ec9569e0d62caa6d91c3fb057b0efa23d
+Author: Adam Jackson <ajax@redhat.com>
+Date: Wed Mar 5 20:48:59 2008 -0500
+
+ Add support for the abstract socket namespace under Linux.
+
+ Unlike normal unix sockets, the abstract namespace is not bound to the
+ filesystem. This has some notable advantages; /tmp need not exist, the
+ socket directory need not have magic permissions, etc. xtrans servers
+ will listen on both the normal and abstract socket endpoints; clients
+ will attempt to connect to the abstract socket before connecting to the
+ corresponding filesystem socket.
+
+ Based on a patch by Bill Crawford.
+
+commit c8ed67f16f71042ef134a4d2189c20dd200a0648
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sun Feb 10 19:04:40 2008 -0800
+
+ Fixed #ifdef checks that were using i386 to use __i386__
+
+ """
+
+ It's simply obsolete, sloppy, compiler namespace pollution. The
+ compiler is not allowed to predefine symbols that might conflict with
+ ordinary identifiers. For backwards compatibility gcc currently
+ predefines i386 when compiling for x86 32-bit (but not 64-bit), but that
+ will go away. It is also not defined if you specify -ansi when invoking
+ the compiler, because then it is seriously standards compliant. Other
+ compilers shouldn't define it either. Correct code shouldn't rely on it
+ being defined. However __i386__ is safe and proper.
+
+ """
+
+commit 9970b5b6f8237685267b7972282319cf266661ea
+Author: Ben Byer <bbyer@bbyer.local>
+Date: Sun Dec 2 07:36:51 2007 -0800
+
+ make launchd error messages less scary
+
+commit cd1da5cec49fb7fe6238a00d9ba550b3ed78fa08
+Author: Ben Byer <bbyer@bbyer.local>
+Date: Wed Nov 14 03:57:57 2007 -0800
+
+ Fix for incorrect processing of recycled launchd socket on OS X
+
+commit 3da4d6c1dc05f9e1291b023a97535eb67f0830e2
+Author: Ben Byer <bbyer@bbyer.local>
+Date: Wed Nov 14 03:55:42 2007 -0800
+
+ removed cvs tags
+
+commit 496cf2c46d2123c3bed3e6878f8f9a62e87ce559
+Author: Dodji Seketeli <dodji@seketeli.org>
+Date: Tue Sep 11 12:52:44 2007 +0200
+
+ libxtrans: fixed a typo in my last commit
+
+ * Xtranssock.c: (SocketReopen): oops fix a typo in my last commit.
+
+commit 88e141225113fcc4ebe5e8fe361e75673cdbf9ff
+Author: Dodji Seketeli <dodji@seketeli.org>
+Date: Tue Sep 11 08:48:03 2007 +0200
+
+ libxtrans: fix linux compilation breakage
+
+ * Xtranssock.c:
+ (SocketReopen): protect use of BSD4.4 socket with BSD44SOCKETS macro.
+ protect use of strlcnpy with HAVE_STRLCPY macro.
+ That one is defined (or not) by the xserver configure.
+
+commit 6217f34977bfa17b66b89df5d45420774abedcb3
+Author: Ben Byer <bbyer@bbyer.apple.com>
+Date: Wed Sep 5 18:29:44 2007 -0700
+
+ changes to support launchd on OS X
+
+commit 4d0cfe491046df26027db291530b247b7f24df5b
+Author: Ben Byer <bbyer@bbyer.apple.com>
+Date: Wed Sep 5 18:04:01 2007 -0700
+
+ suppress warning about socket directory ownership on OS X
+
+ We don't need to warn the user about the fact that the socket
+ directory is not owned by root under OS X; on that platform,
+ it's never owned by root, as the X server runs as the normal user.
+
+commit de93d67f6d48c7c08f2554cb85515bcf7dfbffb2
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Aug 21 17:54:23 2007 -0700
+
+ Version bump: 1.0.4
+
+commit 5e16b0ebccb233f7aeaf3928a853ee966b7cbb39
+Author: Kean Johnston <kean@armory.com>
+Date: Wed Jul 18 09:27:06 2007 -0700
+
+ Fix typo in Xtranslcl.c (sprintf with size argument should be snprintf)
+
+commit 1abc981349140260d6fb643d29cf2b851fc06ac9
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Dec 16 01:15:21 2006 +0200
+
+ bump to 1.0.3
+
+commit 8172528bb894856aa5b133f61444294dc5a347e6
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Dec 6 18:51:59 2006 +0200
+
+ Makefile.am: make ChangeLog hook safer
+ Make ChangeLog hook as safe as possible.
+
+commit 5ffb704b1df9ec44a448d53d4c20b9d4c5d825d4
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Fri Oct 13 17:01:59 2006 -0400
+
+ Bump to 1.0.2
+
+commit ae3b57953f5c1fa875d19fb42a2178d7e594ea44
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Thu Oct 12 20:36:52 2006 -0400
+
+ Fix the ChangeLog hook to distcheck.
+
+commit 4a2f176da3e2171f4feea2e6c8787e24fdf204f3
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri Sep 15 14:59:15 2006 -0700
+
+ Remove GIT_DIR setting from git log command
+
+commit ec3abba0e351278876909bb5250d490b807d904a
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri Sep 15 13:54:18 2006 -0700
+
+ Copy additional copyright/license statements from source to COPYING
+
+commit b4c6bd92b3a8bed746da641c59a9f040e1d83768
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Sep 13 14:09:22 2006 -0700
+
+ Bug 728: RUI in _X11TransSocketINETGetAddr in file "Xtranssock.c"
+
+ Bug #728: <https://bugs.freedesktop.org/show_bug.cgi?id=728>
+ Patch #3527: <https://bugs.freedesktop.org/attachment.cgi?id=3527>
+ bzero sockaddr structures before passing to kernel to convince memory
+ checkers that they are initialized before use
+
+commit 5d006baadf213e91f131ffedc53c88a973fb1cba
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Aug 24 17:40:24 2006 -0700
+
+ Use SUN_LEN if it is defined on non-BSD44SOCKETS systems
+
+commit 2495789d6c290e2037b2836f28b027786ea5b605
+Author: Petr Salinger <petr.salinger@t-systems.cz>
+Date: Sun Apr 23 01:31:00 2006 -0700
+
+ Bug 4982: use offsetof for manipulating struct sockaddr_un
+
+ X.Org Bugzilla #4982 <https://bugs.freedesktop.org/show_bug.cgi?id=4982>
+ Patch #5424 <https://bugs.freedesktop.org/attachment.cgi?id=5424>
+
+commit 2633eaf8824828433a0eb9c9f3c4263b50342473
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Aug 24 16:53:08 2006 -0700
+
+ Try to capture the insanity of xtrans in a short README document
+
+commit 02ffb657b023d9b2a2c6c1d2417da8dcb96aa4b2
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Aug 24 14:46:42 2006 -0700
+
+ More sprintf -> snprintf conversions
+
+commit 3d5e7dd18c8836065c4835740211c10747b18abd
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Aug 23 19:14:35 2006 -0700
+
+ Replace static ChangeLog with dist-hook to generate from git-log
+
+commit 92807fe90aad2303cec4b54bec40ce6edf671654
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Aug 23 16:59:33 2006 -0700
+
+ Add ResetListener for named pipe transport
+
+ (more merging of Xtrans code from Solaris xtrans)
+
+commit e11b861fcf3a295e5cb390cbac3a44d8ce4fad4f
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Aug 22 11:29:46 2006 -0700
+
+ Merge more fixes from Solaris xtrans
+
+ Convert sprintf -> snprintf
+ Don't use fake readv/writev on Solaris x86.
+
+commit 049932c0171855aa6d55222947f4d47495b6f173
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Aug 21 19:08:19 2006 -0700
+
+ Merge Solaris named pipe transport support into LOCALCONN
+
+ Also clean up #ifdefs in Xtranslcl for which transport types are supported
+ Add "pipe" alias for named pipe transport on Solaris to match Solaris Xlib.
+
+commit 11391a1ffe4c633507406d2a1ed5abe57c8698db
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Aug 21 19:05:49 2006 -0700
+
+ Add --enable-local-transport and set it on by default on SVR4 OS'es
+
+commit c0ebfcde0dd3f82c0e5712764e4403b2837e09b5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Aug 21 19:04:54 2006 -0700
+
+ Add *~ to .gitignore to skip emacs droppings
+
+commit fe7054f2f5ce74ce9b8c1704899894bc1c9f32b7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Jul 13 14:59:21 2006 -0700
+
+ renamed: .cvsignore -> .gitignore
+
+commit 0eea51ea11381ba07d5e6953c7bf6519a3ded829
+Author: Donnie Berkholz <spyderous@gentoo.org>
+Date: Fri Jun 30 04:05:45 2006 +0000
+
+ Bump to 1.0.1.
+
+commit 8d37f63810fc12f113bfcf37065ac9da09702b46
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Tue Jun 20 19:11:16 2006 +0000
+
+ Check setuild() return value. Bugzilla #7116.
+
+commit f9a47b508a89c647829266aacb19a0fc2dbb6158
+Author: Jeremy C. Reed <reed@reedmedia.net>
+Date: Thu May 25 20:20:54 2006 +0000
+
+ No code change. Just fix comment that said SOCKCONN to become TCPCONN.
+ (This dates back to 1994 or before.)
+
+commit 2b7124954f5bedc8625c2f144bbbab4bbba7701c
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:36 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit 3d3228a24513ea75c73f6d58ba50097f32b297a1
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Nov 9 21:19:14 2005 +0000
+
+ Update package version number for X11R7 RC2 release.
+
+commit 2cac02b2fe1ceaec2a2f1cd601d9ab4afcf3cb66
+Author: Kean Johnson <kean@armory.com>
+Date: Tue Nov 8 06:33:26 2005 +0000
+
+ See ChangeLog entry 2005-11-07 for details.
+
+commit 063a39b0e1e615387fd7baa570265ed71ca87c22
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:48:13 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit 21a498d25f567ada296d0321f65536dfc816482b
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Oct 3 17:45:28 2005 +0000
+
+ Bug #3813 <https://bugs.freedesktop.org/show_bug.cgi?id=3813> GNU/kFreeBSD
+ fix for xtrans (Robert Millan)
+
+commit e41835b4b2fe03d8a1997bd8e8eabab2a94bccd5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sun Oct 2 21:01:35 2005 +0000
+
+ //bugs.freedesktop.org/show_bug.cgi?id=4256> Patch #3046
+ <https://bugs.freedesktop.org/attachment.cgi?id=3046> Define
+ MAXHOSTNAMELEN if platform doesn't (Michael Banck)
+
+commit 4683f28f0c9d1a1ee0338a32011219ed1fb3c565
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Fri Aug 19 23:53:22 2005 +0000
+
+ Bugzilla #3957 <https://bugs.freedesktop.org/show_bug.cgi?id=3957> Patch
+ #2924 <https://bugs.freedesktop.org/attachment.cgi?id=2924> xtrans
+ changes for AIX (Dan McNichol, IBM)
+ Bugzilla #3957 <https://bugs.freedesktop.org/show_bug.cgi?id=3957> Patch
+ #2925 <https://bugs.freedesktop.org/attachment.cgi?id=2925> xtrans
+ changes for AIX (Dan McNichol, IBM)
+
+commit 79db37c65905823b66411533152ab54407f04004
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Wed Aug 17 19:10:49 2005 +0000
+
+ On FreeBSD, some of the symbols necessary for secure RPC support are in
+ librpcsvc, so check for their presence in rpcsvc so that the library
+ will be added.
+
+commit 5165ebdb8144cd5be706e49957f5c8b51b762821
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Aug 16 02:23:41 2005 +0000
+
+ Define BSD44SOCKETS if struct sockaddr_in has a sin_len member
+
+commit 4ce01dc794022e74b01aac7b902acbbfebc74ed1
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:54 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 4ddee2d488f8bdcee624be96fa52ca03a7e64b83
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 18:59:11 2005 +0000
+
+ Use AC_TYPE_SIGNAL to replace Imake's SIGNAL_DEFINES (used in Xtransutil.c)
+
+commit 0a80fbc1eb80343eaff27c48f9531f5ba709b6ef
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 18:55:41 2005 +0000
+
+ Add config.h includes for modularization Use RETSIGTYPE if defined by
+ autoconf in addition to Imake's SIGNALRETURNSINT. Use
+ HAVE_WORKING_VFORK if defined by autoconf in addition to Imake's
+ HAS_VFORK
+
+commit 9a44d60cb031f1779c228f13697fb17e17df10d5
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Sat Jul 23 19:52:56 2005 +0000
+
+ typo
+
+commit 65ca78f15fe7f1640f3610245957eac9bca0bf04
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sun Jul 17 02:01:55 2005 +0000
+
+ Move AC_MSG_RESULT so it shows up in the right place, not after other tests
+ are executed
+
+commit f1d56df5736087eafa3db255437c918f6b9075a1
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Thu Jul 14 22:44:31 2005 +0000
+
+ Split out TCP library/IPv6 support checks into XTRANS_TCP_FLAGS for sharing
+ with code like xdm that doesn't use Xtrans but accesses TCP sockets
+ directly. Clean up --enable flags and report settings in configure
+ output.
+
+commit 9552877bf0a7be02c781ef8fb2f271573a55e297
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Jul 9 21:22:30 2005 +0000
+
+ Add .cvsignore files
+
+commit 586cc58eff6d3c68313e5c8aedb8ec2464069f2f
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Jul 3 23:51:24 2005 +0000
+
+ Change <X11/os.h> to "os.h".
+
+commit 926367f82972bd94a64ef76c8e036f27ca61fb14
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Jul 3 07:01:01 2005 +0000
+
+ Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
+ 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>.
+
+commit 40b7e438e4b441204ff47e1e25755162921d7c3e
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Jul 2 18:00:50 2005 +0000
+
+ Make includedir=@includedir@ in xtrans.pc.in, not with /X11/Xtrans.
+
+commit b413f4c1dddc467014adf16bfe31627e65508c12
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed Jun 22 22:46:39 2005 +0000
+
+ Apply these patches from Theo van Klaveren:
+ lib-dmx.patch lib-FS.patch lib-X11.patch lib-XRes.patch
+ lib-XScrnSaver.patch lib-xtrans.patch
+ to make the libraries distcheck.
+
+commit 57aac0006e27624a41f04c5d0c458b9f0108a084
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Jun 22 22:36:51 2005 +0000
+
+ Add the rest of my patch from bugzilla #1605 to define INADDR_NONE on
+ platforms that don't define it in the system headers.
+
+commit f5a6a188407cec6e567070d192aac2db72cacd92
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Jun 22 01:21:24 2005 +0000
+
+ Apply patch by Alan Coopersmith from #1605 to fix address resolution of
+ hostnames starting with a digit for 64 bit architechtures.
+
+commit 5bad61831b1c06888d80d92a0bf34acbeecda026
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jun 18 07:48:43 2005 +0000
+
+ Move Secure RPC flags from X11/configure.ac to xtrans/xtrans.m4 since
+ multiple modules will need them
+
+commit 62438b14130e0f8de6939767a108ef12558653a3
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Thu Jun 9 15:56:48 2005 +0000
+
+ Use $(includedir)/X11/Xtrans for Xtransincludedir
+
+commit 7c8e397ddcbd0ae998cc4f23868726022d1aa47b
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Wed Jun 8 06:24:53 2005 +0000
+
+ Install the xtrans.m4 to the directory returned by aclocal --print-ac-dir,
+ so that the aclocal calls in other modules will pick it up if this
+ prefix's aclocal dir is not in a default path for system aclocal.
+
+commit 58c7263ca5b64a21dc101bb4b24201ba67a8d068
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed May 25 21:47:56 2005 +0000
+
+ - Add FSlib to symlink.sh
+ - Change Xtrans includedir back to be X11/Xtrans, so that users of it can
+ continue to include <X11/*>
+ - Add build system for FSlib
+ - Conditionally include config.h in xc/lib/FS
+ - Remove redundant include of FSproto.h in xc/lib/FS
+ - Add check to proto/X11/configure.ac whether -D_XOPEN_SOURCE is needed.
+
+commit b2e662de63948928e4cbc7e3ba90631f150c5137
+Author: Josh Triplett <josh@speakeasy.net>
+Date: Mon May 23 01:53:21 2005 +0000
+
+ Change xtransincludedir in pkg-config file to match change in Makefile.am.
+
+commit 83d29f6e0c1587c8ad008672e7ae5631942559eb
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat May 21 23:07:48 2005 +0000
+
+ xtrans:
+ Create autoconf macro XTRANS_CONNECTION_FLAGS to provide standard set of
+ --enable flags for which transports to support and common place to
+ update for required libraries for platforms that need certain libs for
+ certain transports
+ ICE:
+ Add ICE_t #define required by Xtrans headers. Replace static defines of
+ LOCALCONN & UNIXCONN with new XTRANS_CONNECTION_FLAGS macro.
+ X11:
+ Moved transport type checks to new macro XTRANS_CONNECTION_FLAGS in
+ xtrans.m4 in xtrans module so they can be shared by all modules using
+ xtrans.
+
+commit bd79d86fb50233e0cd41a57b553f12b6d490ac7e
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:22:33 2005 +0000
+
+ revert last change, didn't do right thing at all, sorry for the noise
+
+commit 10776fa562c060d74fdd4434a16408fe4bd34ab9
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Thu May 19 00:10:08 2005 +0000
+
+ Require automake 1.7 in AM_INIT_AUTOMAKE
+
+commit daa7168e9e0cdff5eb06b0c9a7155f8880681fff
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Fri May 13 22:53:43 2005 +0000
+
+ - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in
+ <X11/...>
+ - For Xcomposite and Xdamage, don't link the build system out of the xc
+ tree
+ - Link the public X11 headers into their own directory
+ - Add links to XKeysymDB and XErrorDB
+ - Add links to all the Xlib man pages
+ - Add links to the lcUniConv subdirectory
+ - Conditionally include config.h in Xlib source
+
+commit d11d95fa4faec21655625b7de27d8a71c08ffe2d
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Fri May 13 15:16:43 2005 +0000
+
+ Dummy changes to ChangeLog/configure.ac to see if that fixes group
+ permissions
+
+commit b8a8c31f63a543d1c1c6bb4ae26a4019b4400edc
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Fri May 13 15:04:52 2005 +0000
+
+ Re-adding ChangeLog and configure.ac files
+
+commit 798c08054ce5a8238f35fee3e69218ece74441fa
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Fri May 13 15:02:19 2005 +0000
+
+ Temporarily remove ChangeLog configure.ac
+
+commit b3da86ae588df14dde916674a4f6593edf1964f7
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Fri May 13 14:43:37 2005 +0000
+
+ Dummy commit to see if that fixes the group execute permissions
+
+commit ea04267da780c2c3f08a710d15468565897420c4
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Thu May 12 16:12:34 2005 +0000
+
+ Make xtrans install in $(includedir)/X11/Xtrans. Remove all references to
+ Xtransdef.
+ Add Xdmcp build files
+ Add Wrap.h to lib/dmcp part of symlink script.
+
+commit f25791629f3f443d2552bdb05bea1a960b530342
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu May 12 02:49:16 2005 +0000
+
+ Add Xtransdef.h.in as an AM_CONFIG_HEADER.
+
+commit d628bf24f2bf0d017394b6961784d7ac5b33f46b
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed May 11 22:44:52 2005 +0000
+
+ lib/Xau:
+ - Update AUTHORS, COPYING from Keith's tree
+ - Don't use gcc specific "-include config.h"
+ - Add autogen.sh
+ lib/xtrans:
+ - Add AUTHORS, COPYING, ChangeLog, Makefile.am, NEWS, README, autogen.sh,
+ configure.ac, xtrans.pc.in
+ xc/lib/Xau:
+ - Add conditionalized #include <config.h>
+ util/modular/symlink.sh
+ - Add functions symlink_lib_xau() and symlink_lib_xtrans()
+ util/modular/addconfig.h
+ - New script that adds #include <config.h> to files
+
+commit c814f30e9a5dc48a24c20517334cf5f9c37e066a
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date: Wed Mar 2 11:20:29 2005 +0000
+
+ xc/config/cf/DragonFly.cf
+ xc/config/cf/Imake.cf
+ xc/config/cf/Imakefile
+ xc/config/imake/imake.c
+ xc/config/imake/imakemdep.h
+ xc/extras/drm/shared/drm.h
+ xc/include/Xos_r.h
+ xc/lib/xtrans/Xtranssock.c
+ xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
+ xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
+ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c
+ //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004
+ (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for
+ DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org>
+ and Mike Verona <firedragonfly@gmail.com>.
+
+commit 92e80a5a67273fc60623b17a5f34c239f1ed6947
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Mon Nov 15 15:06:56 2004 +0000
+
+ Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
+ mingw (Win32) port
+
+commit d92a9d31416a8366cd065886d7ff352fefce646d
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Aug 27 22:47:45 2004 +0000
+
+ Set the define XtransFailSoft to restore the old behavior to fail softly
+ when socket directory cannot chowned/chmod to correct user/group. This
+ should be added on a per OS basis which hasn't been done.
+
+commit 48ffd91cff9a07c68194f6d0b380dd2acd46a8ca
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Jul 30 21:00:20 2004 +0000
+
+ fail hard if socket directories cannot be chowned to root or chmod'ed to
+ the requested mode if 'sticky' bit is requested for this directory
+ instead of just print a warning that will remain unnoticed most of the
+ times.
+
+commit c3e50fa69ea7a2d08a298866e8a63c0f07c8248d
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Jul 30 18:40:36 2004 +0000
+
+ Fixed typo in a comment.
+ Deleted bogus comment.
+ Added debugging support.
+
+commit 79d38d618406ecc5228730a57ad406b280a5a189
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jul 17 01:13:31 2004 +0000
+
+ Fix typo in debug message in MakeAllCLTSServerListeners
+ Add $(GETPEER_DEFINES) to DEPEND_DEFINES for makedepend
+ Add "localuser" and "localgroup" access types to server-interpreted
+ authentication scheme.
+
+commit 8d0820e2058545e27f95d9fdc581262822799193
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 18:44:27 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit c594d3393cd355f52545b05bcc27ee8a2c533caa
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:32:40 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 2d51220fae172d2b8d28b971a853605b41038533
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:11:46 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 6e2cb92d192171961165c8e5a24b00f35f56aaeb
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:35:36 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit 93f13d69958cb9c9adfe1244e478521269f9258b
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:22:54 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 7a10db6531003055886e0e994c2ef8e46a010eb2
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Mon Feb 23 20:34:44 2004 +0000
+
+ Import most of XFree86 4.4RC3. This import excludes files which have the
+ new license. If we want to, later we can import 4.4RC3 again and pick
+ up the files that have the new license, but for now the vendor branch
+ is "pure."
+
+commit 871b8c33f2ab8c98b95aa3324bb70055f5207c61
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Jan 29 08:08:15 2004 +0000
+
+ Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit 352e5de72e125d7d474907f354462cc1442e0989
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Dec 19 20:54:45 2003 +0000
+
+ XFree86 4.3.99.902 (RC 2)
+
+commit d223c1bb16c503e58f07dfef14b8e79fe7c358ff
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Thu Dec 4 22:03:05 2003 +0000
+
+ XFree86 4.3.99.901 (RC 1)
+
+commit 6c36ea2d54ea6b6f0cbece06d867d0b884783d0c
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:28:21 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 3b0d3a905e39624abe9ddd1ce20542097601e4c2
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:28:21 2003 +0000
+
+ Initial revision
+
+commit 3bd236a07c0ebaabb7337dd5d56bc57a028a9c0e
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:50 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit 26781c4f009a4b448dca3ab4912cbf01182e3d92
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 15:54:40 2003 +0000
+
+ R6.6 is the Xorg base-line
diff --git a/X11/xtrans/INSTALL b/X11/xtrans/INSTALL
new file mode 100644
index 000000000..d3c5b40a9
--- /dev/null
+++ b/X11/xtrans/INSTALL
@@ -0,0 +1,237 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/X11/xtrans/Makefile.am b/X11/xtrans/Makefile.am
new file mode 100644
index 000000000..39b67d36d
--- /dev/null
+++ b/X11/xtrans/Makefile.am
@@ -0,0 +1,27 @@
+Xtransincludedir = $(includedir)/X11/Xtrans
+Xtransinclude_HEADERS = \
+ Xtrans.h \
+ Xtrans.c \
+ Xtransint.h \
+ Xtranslcl.c \
+ Xtranssock.c \
+ Xtranstli.c \
+ Xtransutil.c \
+ transport.c
+
+aclocaldir = $(datadir)/aclocal
+aclocal_DATA = xtrans.m4
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xtrans.pc
+
+EXTRA_DIST = xtrans.pc.in ${aclocal_DATA}
+
+CLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
diff --git a/X11/xtrans/Makefile.in b/X11/xtrans/Makefile.in
new file mode 100644
index 000000000..79550f2bd
--- /dev/null
+++ b/X11/xtrans/Makefile.in
@@ -0,0 +1,566 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(Xtransinclude_HEADERS) $(am__configure_deps) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/xtrans.pc.in $(top_srcdir)/configure AUTHORS COPYING \
+ ChangeLog INSTALL NEWS install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = xtrans.pc
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(aclocaldir)" \
+ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(Xtransincludedir)"
+aclocalDATA_INSTALL = $(INSTALL_DATA)
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(aclocal_DATA) $(pkgconfig_DATA)
+XtransincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(Xtransinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+fchown_define = @fchown_define@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sticky_bit_define = @sticky_bit_define@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+Xtransincludedir = $(includedir)/X11/Xtrans
+Xtransinclude_HEADERS = \
+ Xtrans.h \
+ Xtrans.c \
+ Xtransint.h \
+ Xtranslcl.c \
+ Xtranssock.c \
+ Xtranstli.c \
+ Xtransutil.c \
+ transport.c
+
+aclocaldir = $(datadir)/aclocal
+aclocal_DATA = xtrans.m4
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xtrans.pc
+EXTRA_DIST = xtrans.pc.in ${aclocal_DATA}
+CLEANFILES = ChangeLog
+all: all-am
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+xtrans.pc: $(top_builddir)/config.status $(srcdir)/xtrans.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-aclocalDATA: $(aclocal_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(aclocaldir)" || $(MKDIR_P) "$(DESTDIR)$(aclocaldir)"
+ @list='$(aclocal_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(aclocalDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(aclocaldir)/$$f'"; \
+ $(aclocalDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(aclocaldir)/$$f"; \
+ done
+
+uninstall-aclocalDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(aclocal_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
+ rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
+ done
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-XtransincludeHEADERS: $(Xtransinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(Xtransincludedir)" || $(MKDIR_P) "$(DESTDIR)$(Xtransincludedir)"
+ @list='$(Xtransinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(XtransincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(Xtransincludedir)/$$f'"; \
+ $(XtransincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(Xtransincludedir)/$$f"; \
+ done
+
+uninstall-XtransincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(Xtransinclude_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(Xtransincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(Xtransincludedir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d $(distdir) || mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(Xtransincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-XtransincludeHEADERS install-aclocalDATA \
+ install-pkgconfigDATA
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-XtransincludeHEADERS uninstall-aclocalDATA \
+ uninstall-pkgconfigDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+ distclean distclean-generic distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-XtransincludeHEADERS \
+ install-aclocalDATA install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-pkgconfigDATA \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags uninstall uninstall-XtransincludeHEADERS \
+ uninstall-aclocalDATA uninstall-am uninstall-pkgconfigDATA
+
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/X11/xtrans/NEWS b/X11/xtrans/NEWS
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/X11/xtrans/NEWS
diff --git a/X11/xtrans/README b/X11/xtrans/README
new file mode 100644
index 000000000..551f12954
--- /dev/null
+++ b/X11/xtrans/README
@@ -0,0 +1,14 @@
+xtrans is a library of code that is shared among various X packages to handle
+network protocol transport in a modular fashion, allowing a single place to
+add new transport types. It is used by the X server, libX11, libICE, the
+X font server, and related components.
+
+It is however, *NOT* a shared library, but code which each consumer includes and
+builds it's own copy of with various #ifdef flags to make each copy slightly
+different. To support this in the modular build system, this package simply
+installs the C source files into $(prefix)/include/X11/Xtrans and installs a
+pkg-config file and an autoconf m4 macro file with the flags needed to use it.
+
+Documentation of the xtrans API can be found in the xorg-docs package, in
+PostScript format in xorg-docs/hardcopy/xtrans/Xtrans.PS.gz and in the original
+troff format in xorg-docs/specs/xtrans/Xtrans.mm . \ No newline at end of file
diff --git a/X11/xtrans/Xtrans.c b/X11/xtrans/Xtrans.c
new file mode 100644
index 000000000..278651a26
--- /dev/null
+++ b/X11/xtrans/Xtrans.c
@@ -0,0 +1,1382 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <ctype.h>
+
+/*
+ * The transport table contains a definition for every transport (protocol)
+ * family. All operations that can be made on the transport go through this
+ * table.
+ *
+ * Each transport is assigned a unique transport id.
+ *
+ * New transports can be added by adding an entry in this table.
+ * For compatiblity, the transport ids should never be renumbered.
+ * Always add to the end of the list.
+ */
+
+#define TRANS_TLI_INET_INDEX 1
+#define TRANS_TLI_TCP_INDEX 2
+#define TRANS_TLI_TLI_INDEX 3
+#define TRANS_SOCKET_UNIX_INDEX 4
+#define TRANS_SOCKET_LOCAL_INDEX 5
+#define TRANS_SOCKET_INET_INDEX 6
+#define TRANS_SOCKET_TCP_INDEX 7
+#define TRANS_DNET_INDEX 8
+#define TRANS_LOCAL_LOCAL_INDEX 9
+#define TRANS_LOCAL_PTS_INDEX 10
+#define TRANS_LOCAL_NAMED_INDEX 11
+#define TRANS_LOCAL_ISC_INDEX 12
+#define TRANS_LOCAL_SCO_INDEX 13
+#define TRANS_SOCKET_INET6_INDEX 14
+#define TRANS_LOCAL_PIPE_INDEX 15
+
+
+static
+Xtransport_table Xtransports[] = {
+#if defined(STREAMSCONN)
+ { &TRANS(TLITCPFuncs), TRANS_TLI_TCP_INDEX },
+ { &TRANS(TLIINETFuncs), TRANS_TLI_INET_INDEX },
+ { &TRANS(TLITLIFuncs), TRANS_TLI_TLI_INDEX },
+#endif /* STREAMSCONN */
+#if defined(TCPCONN)
+ { &TRANS(SocketTCPFuncs), TRANS_SOCKET_TCP_INDEX },
+#if defined(IPv6) && defined(AF_INET6)
+ { &TRANS(SocketINET6Funcs), TRANS_SOCKET_INET6_INDEX },
+#endif /* IPv6 */
+ { &TRANS(SocketINETFuncs), TRANS_SOCKET_INET_INDEX },
+#endif /* TCPCONN */
+#if defined(UNIXCONN)
+#if !defined(LOCALCONN)
+ { &TRANS(SocketLocalFuncs), TRANS_SOCKET_LOCAL_INDEX },
+#endif /* !LOCALCONN */
+ { &TRANS(SocketUNIXFuncs), TRANS_SOCKET_UNIX_INDEX },
+#endif /* UNIXCONN */
+#if defined(LOCALCONN)
+ { &TRANS(LocalFuncs), TRANS_LOCAL_LOCAL_INDEX },
+#ifndef sun
+ { &TRANS(PTSFuncs), TRANS_LOCAL_PTS_INDEX },
+#endif /* sun */
+#ifdef SVR4
+ { &TRANS(NAMEDFuncs), TRANS_LOCAL_NAMED_INDEX },
+#endif
+#ifdef sun
+ { &TRANS(PIPEFuncs), TRANS_LOCAL_PIPE_INDEX },
+#else /* !sun */
+#if !defined(__SCO__) && !defined(__UNIXWARE__)
+ { &TRANS(ISCFuncs), TRANS_LOCAL_ISC_INDEX },
+#endif
+ { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX },
+#endif /* sun */
+#endif /* LOCALCONN */
+};
+
+#define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table))
+
+
+#ifdef WIN32
+#define ioctl ioctlsocket
+#endif
+
+
+
+/*
+ * These are a few utility function used by the public interface functions.
+ */
+
+void
+TRANS(FreeConnInfo) (XtransConnInfo ciptr)
+
+{
+ PRMSG (3,"FreeConnInfo(%p)\n", ciptr, 0, 0);
+
+ if (ciptr->addr)
+ xfree (ciptr->addr);
+
+ if (ciptr->peeraddr)
+ xfree (ciptr->peeraddr);
+
+ if (ciptr->port)
+ xfree (ciptr->port);
+
+ xfree ((char *) ciptr);
+}
+
+
+#define PROTOBUFSIZE 20
+
+static Xtransport *
+TRANS(SelectTransport) (char *protocol)
+
+{
+ char protobuf[PROTOBUFSIZE];
+ int i;
+
+ PRMSG (3,"SelectTransport(%s)\n", protocol, 0, 0);
+
+ /*
+ * Force Protocol to be lowercase as a way of doing
+ * a case insensitive match.
+ */
+
+ strncpy (protobuf, protocol, PROTOBUFSIZE - 1);
+ protobuf[PROTOBUFSIZE-1] = '\0';
+
+ for (i = 0; i < PROTOBUFSIZE && protobuf[i] != '\0'; i++)
+ if (isupper (protobuf[i]))
+ protobuf[i] = tolower (protobuf[i]);
+
+ /* Look at all of the configured protocols */
+
+ for (i = 0; i < NUMTRANS; i++)
+ {
+ if (!strcmp (protobuf, Xtransports[i].transport->TransName))
+ return Xtransports[i].transport;
+ }
+
+ return NULL;
+}
+
+#ifndef TEST_t
+static
+#endif /* TEST_t */
+int
+TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
+
+{
+ /*
+ * For the font library, the address is a string formatted
+ * as "protocol/host:port[/catalogue]". Note that the catologue
+ * is optional. At this time, the catologue info is ignored, but
+ * we have to parse it anyways.
+ *
+ * Other than fontlib, the address is a string formatted
+ * as "protocol/host:port".
+ *
+ * If the protocol part is missing, then assume TCP.
+ * If the protocol part and host part are missing, then assume local.
+ * If a "::" is found then assume DNET.
+ */
+
+ char *mybuf, *tmpptr;
+ char *_protocol, *_host, *_port;
+ char hostnamebuf[256];
+ int _host_len;
+
+ PRMSG (3,"ParseAddress(%s)\n", address, 0, 0);
+
+ /* Copy the string so it can be changed */
+
+ tmpptr = mybuf = (char *) xalloc (strlen (address) + 1);
+ strcpy (mybuf, address);
+
+ /* Parse the string to get each component */
+
+ /* Get the protocol part */
+
+ _protocol = mybuf;
+
+
+ if ( ((mybuf = strchr (mybuf,'/')) == NULL) &&
+ ((mybuf = strrchr (tmpptr,':')) == NULL) )
+ {
+ /* address is in a bad format */
+ *protocol = NULL;
+ *host = NULL;
+ *port = NULL;
+ xfree (tmpptr);
+ return 0;
+ }
+
+ if (*mybuf == ':')
+ {
+ /*
+ * If there is a hostname, then assume tcp, otherwise
+ * it must be local.
+ */
+ if (mybuf == tmpptr)
+ {
+ /* There is neither a protocol or host specified */
+ _protocol = "local";
+ }
+ else
+ {
+ /* There is a hostname specified */
+ _protocol = "tcp";
+ mybuf = tmpptr; /* reset to the begining of the host ptr */
+ }
+ }
+ else
+ {
+ /* *mybuf == '/' */
+
+ *mybuf ++= '\0'; /* put a null at the end of the protocol */
+
+ if (strlen(_protocol) == 0)
+ {
+ /*
+ * If there is a hostname, then assume tcp, otherwise
+ * it must be local.
+ */
+ if (*mybuf != ':')
+ _protocol = "tcp";
+ else
+ _protocol = "local";
+ }
+ }
+
+ /* Get the host part */
+
+ _host = mybuf;
+
+ if ((mybuf = strrchr (mybuf,':')) == NULL)
+ {
+ *protocol = NULL;
+ *host = NULL;
+ *port = NULL;
+ xfree (tmpptr);
+ return 0;
+ }
+
+ /* Check for DECnet */
+
+ if ((mybuf != _host) && (*(mybuf - 1) == ':')
+#if defined(IPv6) && defined(AF_INET6)
+ /* An IPv6 address can end in :: so three : in a row is assumed to be
+ an IPv6 host and not a DECnet node with a : in it's name, unless
+ DECnet is specifically requested */
+ && ( ((mybuf - 1) == _host) || (*(mybuf - 2) != ':') ||
+ ((_protocol != NULL) && (strcmp(_protocol, "dnet") == 0)) )
+#endif
+ )
+ {
+ _protocol = "dnet";
+ *(mybuf - 1) = '\0';
+ }
+
+ *mybuf ++= '\0';
+
+ _host_len = strlen(_host);
+ if (_host_len == 0)
+ {
+ TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
+ _host = hostnamebuf;
+ }
+#if defined(IPv6) && defined(AF_INET6)
+ /* hostname in IPv6 [numeric_addr]:0 form? */
+ else if ( (_host_len > 3) &&
+ ((strcmp(_protocol, "tcp") == 0) || (strcmp(_protocol, "inet6") == 0))
+ && (*_host == '[') && (*(_host + _host_len - 1) == ']') ) {
+ struct sockaddr_in6 sin6;
+
+ *(_host + _host_len - 1) = '\0';
+
+ /* Verify address is valid IPv6 numeric form */
+ if (inet_pton(AF_INET6, _host + 1, &sin6) == 1) {
+ /* It is. Use it as such. */
+ _host++;
+ _protocol = "inet6";
+ } else {
+ /* It's not, restore it just in case some other code can use it. */
+ *(_host + _host_len - 1) = ']';
+ }
+ }
+#endif
+
+
+ /* Get the port */
+
+ _port = mybuf;
+
+#if defined(FONT_t) || defined(FS_t)
+ /*
+ * Is there an optional catalogue list?
+ */
+
+ if ((mybuf = strchr (mybuf,'/')) != NULL)
+ *mybuf ++= '\0';
+
+ /*
+ * The rest, if any, is the (currently unused) catalogue list.
+ *
+ * _catalogue = mybuf;
+ */
+#endif
+
+#ifdef HAVE_LAUNCHD
+ /* launchd sockets will look like 'local//tmp/launch-XgkNns/:0' */
+ if(address != NULL && strlen(address)>8 && (!strncmp(address,"local//",7))) {
+ _protocol="local";
+ _host="";
+ _port=address+6;
+ }
+#endif
+
+ /*
+ * Now that we have all of the components, allocate new
+ * string space for them.
+ */
+
+ if ((*protocol = (char *) xalloc(strlen (_protocol) + 1)) == NULL)
+ {
+ /* Malloc failed */
+ *port = NULL;
+ *host = NULL;
+ *protocol = NULL;
+ xfree (tmpptr);
+ return 0;
+ }
+ else
+ strcpy (*protocol, _protocol);
+
+ if ((*host = (char *) xalloc (strlen (_host) + 1)) == NULL)
+ {
+ /* Malloc failed */
+ *port = NULL;
+ *host = NULL;
+ xfree (*protocol);
+ *protocol = NULL;
+ xfree (tmpptr);
+ return 0;
+ }
+ else
+ strcpy (*host, _host);
+
+ if ((*port = (char *) xalloc (strlen (_port) + 1)) == NULL)
+ {
+ /* Malloc failed */
+ *port = NULL;
+ xfree (*host);
+ *host = NULL;
+ xfree (*protocol);
+ *protocol = NULL;
+ xfree (tmpptr);
+ return 0;
+ }
+ else
+ strcpy (*port, _port);
+
+ xfree (tmpptr);
+
+ return 1;
+}
+
+
+/*
+ * TRANS(Open) does all of the real work opening a connection. The only
+ * funny part about this is the type parameter which is used to decide which
+ * type of open to perform.
+ */
+
+static XtransConnInfo
+TRANS(Open) (int type, char *address)
+
+{
+ char *protocol = NULL, *host = NULL, *port = NULL;
+ XtransConnInfo ciptr = NULL;
+ Xtransport *thistrans;
+
+ PRMSG (2,"Open(%d,%s)\n", type, address, 0);
+
+#if defined(WIN32) && defined(TCPCONN)
+ if (TRANS(WSAStartup)())
+ {
+ PRMSG (1,"Open: WSAStartup failed\n", 0, 0, 0);
+ return NULL;
+ }
+#endif
+
+ /* Parse the Address */
+
+ if (TRANS(ParseAddress) (address, &protocol, &host, &port) == 0)
+ {
+ PRMSG (1,"Open: Unable to Parse address %s\n", address, 0, 0);
+ return NULL;
+ }
+
+ /* Determine the transport type */
+
+ if ((thistrans = TRANS(SelectTransport) (protocol)) == NULL)
+ {
+ PRMSG (1,"Open: Unable to find transport for %s\n",
+ protocol, 0, 0);
+
+ xfree (protocol);
+ xfree (host);
+ xfree (port);
+ return NULL;
+ }
+
+ /* Open the transport */
+
+ switch (type)
+ {
+ case XTRANS_OPEN_COTS_CLIENT:
+#ifdef TRANS_CLIENT
+ ciptr = thistrans->OpenCOTSClient(thistrans, protocol, host, port);
+#endif /* TRANS_CLIENT */
+ break;
+ case XTRANS_OPEN_COTS_SERVER:
+#ifdef TRANS_SERVER
+ ciptr = thistrans->OpenCOTSServer(thistrans, protocol, host, port);
+#endif /* TRANS_SERVER */
+ break;
+ case XTRANS_OPEN_CLTS_CLIENT:
+#ifdef TRANS_CLIENT
+ ciptr = thistrans->OpenCLTSClient(thistrans, protocol, host, port);
+#endif /* TRANS_CLIENT */
+ break;
+ case XTRANS_OPEN_CLTS_SERVER:
+#ifdef TRANS_SERVER
+ ciptr = thistrans->OpenCLTSServer(thistrans, protocol, host, port);
+#endif /* TRANS_SERVER */
+ break;
+ default:
+ PRMSG (1,"Open: Unknown Open type %d\n", type, 0, 0);
+ }
+
+ if (ciptr == NULL)
+ {
+ if (!(thistrans->flags & TRANS_DISABLED))
+ {
+ PRMSG (1,"Open: transport open failed for %s/%s:%s\n",
+ protocol, host, port);
+ }
+ xfree (protocol);
+ xfree (host);
+ xfree (port);
+ return NULL;
+ }
+
+ ciptr->transptr = thistrans;
+ ciptr->port = port; /* We need this for TRANS(Reopen) */
+
+ xfree (protocol);
+ xfree (host);
+
+ return ciptr;
+}
+
+
+#ifdef TRANS_REOPEN
+
+/*
+ * We might want to create an XtransConnInfo object based on a previously
+ * opened connection. For example, the font server may clone itself and
+ * pass file descriptors to the parent.
+ */
+
+static XtransConnInfo
+TRANS(Reopen) (int type, int trans_id, int fd, char *port)
+
+{
+ XtransConnInfo ciptr = NULL;
+ Xtransport *thistrans = NULL;
+ char *save_port;
+ int i;
+
+ PRMSG (2,"Reopen(%d,%d,%s)\n", trans_id, fd, port);
+
+ /* Determine the transport type */
+
+ for (i = 0; i < NUMTRANS; i++)
+ if (Xtransports[i].transport_id == trans_id)
+ {
+ thistrans = Xtransports[i].transport;
+ break;
+ }
+
+ if (thistrans == NULL)
+ {
+ PRMSG (1,"Reopen: Unable to find transport id %d\n",
+ trans_id, 0, 0);
+
+ return NULL;
+ }
+
+ if ((save_port = (char *) xalloc (strlen (port) + 1)) == NULL)
+ {
+ PRMSG (1,"Reopen: Unable to malloc port string\n", 0, 0, 0);
+
+ return NULL;
+ }
+
+ strcpy (save_port, port);
+
+ /* Get a new XtransConnInfo object */
+
+ switch (type)
+ {
+ case XTRANS_OPEN_COTS_SERVER:
+ ciptr = thistrans->ReopenCOTSServer(thistrans, fd, port);
+ break;
+ case XTRANS_OPEN_CLTS_SERVER:
+ ciptr = thistrans->ReopenCLTSServer(thistrans, fd, port);
+ break;
+ default:
+ PRMSG (1,"Reopen: Bad Open type %d\n", type, 0, 0);
+ }
+
+ if (ciptr == NULL)
+ {
+ PRMSG (1,"Reopen: transport open failed\n", 0, 0, 0);
+ return NULL;
+ }
+
+ ciptr->transptr = thistrans;
+ ciptr->port = save_port;
+
+ return ciptr;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+
+/*
+ * These are the public interfaces to this Transport interface.
+ * These are the only functions that should have knowledge of the transport
+ * table.
+ */
+
+#ifdef TRANS_CLIENT
+
+XtransConnInfo
+TRANS(OpenCOTSClient) (char *address)
+
+{
+ PRMSG (2,"OpenCOTSClient(%s)\n", address, 0, 0);
+ return TRANS(Open) (XTRANS_OPEN_COTS_CLIENT, address);
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+XtransConnInfo
+TRANS(OpenCOTSServer) (char *address)
+
+{
+ PRMSG (2,"OpenCOTSServer(%s)\n", address, 0, 0);
+ return TRANS(Open) (XTRANS_OPEN_COTS_SERVER, address);
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+XtransConnInfo
+TRANS(OpenCLTSClient) (char *address)
+
+{
+ PRMSG (2,"OpenCLTSClient(%s)\n", address, 0, 0);
+ return TRANS(Open) (XTRANS_OPEN_CLTS_CLIENT, address);
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+XtransConnInfo
+TRANS(OpenCLTSServer) (char *address)
+
+{
+ PRMSG (2,"OpenCLTSServer(%s)\n", address, 0, 0);
+ return TRANS(Open) (XTRANS_OPEN_CLTS_SERVER, address);
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+XtransConnInfo
+TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
+
+{
+ PRMSG (2,"ReopenCOTSServer(%d, %d, %s)\n", trans_id, fd, port);
+ return TRANS(Reopen) (XTRANS_OPEN_COTS_SERVER, trans_id, fd, port);
+}
+
+XtransConnInfo
+TRANS(ReopenCLTSServer) (int trans_id, int fd, char *port)
+
+{
+ PRMSG (2,"ReopenCLTSServer(%d, %d, %s)\n", trans_id, fd, port);
+ return TRANS(Reopen) (XTRANS_OPEN_CLTS_SERVER, trans_id, fd, port);
+}
+
+
+int
+TRANS(GetReopenInfo) (XtransConnInfo ciptr,
+ int *trans_id, int *fd, char **port)
+
+{
+ int i;
+
+ for (i = 0; i < NUMTRANS; i++)
+ if (Xtransports[i].transport == ciptr->transptr)
+ {
+ *trans_id = Xtransports[i].transport_id;
+ *fd = ciptr->fd;
+
+ if ((*port = (char *) xalloc (strlen (ciptr->port) + 1)) == NULL)
+ return 0;
+ else
+ {
+ strcpy (*port, ciptr->port);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+int
+TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
+
+{
+ int fd = ciptr->fd;
+ int ret = 0;
+
+ PRMSG (2,"SetOption(%d,%d,%d)\n", fd, option, arg);
+
+ /*
+ * For now, all transport type use the same stuff for setting options.
+ * As long as this is true, we can put the common code here. Once a more
+ * complicated transport such as shared memory or an OSI implementation
+ * that uses the session and application libraries is implemented, this
+ * code may have to move to a transport dependent function.
+ *
+ * ret = ciptr->transptr->SetOption (ciptr, option, arg);
+ */
+
+ switch (option)
+ {
+ case TRANS_NONBLOCKING:
+ switch (arg)
+ {
+ case 0:
+ /* Set to blocking mode */
+ break;
+ case 1: /* Set to non-blocking mode */
+
+#if defined(O_NONBLOCK) && !defined(SCO325)
+ ret = fcntl (fd, F_GETFL, 0);
+ if (ret != -1)
+ ret = fcntl (fd, F_SETFL, ret | O_NONBLOCK);
+#else
+#ifdef FIOSNBIO
+ {
+ int arg;
+ arg = 1;
+ ret = ioctl (fd, FIOSNBIO, &arg);
+ }
+#else
+#if defined(WIN32)
+ {
+#ifdef WIN32
+ u_long arg;
+#else
+ int arg;
+#endif
+ arg = 1;
+/* IBM TCP/IP understands this option too well: it causes TRANS(Read) to fail
+ * eventually with EWOULDBLOCK */
+ ret = ioctl (fd, FIONBIO, &arg);
+ }
+#else
+ ret = fcntl (fd, F_GETFL, 0);
+#ifdef FNDELAY
+ ret = fcntl (fd, F_SETFL, ret | FNDELAY);
+#else
+ ret = fcntl (fd, F_SETFL, ret | O_NDELAY);
+#endif
+#endif /* AIXV3 || uniosu */
+#endif /* FIOSNBIO */
+#endif /* O_NONBLOCK */
+ break;
+ default:
+ /* Unknown option */
+ break;
+ }
+ break;
+ case TRANS_CLOSEONEXEC:
+#ifdef F_SETFD
+#ifdef FD_CLOEXEC
+ ret = fcntl (fd, F_SETFD, FD_CLOEXEC);
+#else
+ ret = fcntl (fd, F_SETFD, 1);
+#endif /* FD_CLOEXEC */
+#endif /* F_SETFD */
+ break;
+ }
+
+ return ret;
+}
+
+#ifdef TRANS_SERVER
+
+int
+TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
+
+{
+ return ciptr->transptr->CreateListener (ciptr, port, flags);
+}
+
+int
+TRANS(NoListen) (char * protocol)
+
+{
+ Xtransport *trans;
+ int i = 0, ret = 0;
+
+ if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+ {
+ PRMSG (1,"TransNoListen: unable to find transport: %s\n",
+ protocol, 0, 0);
+
+ return -1;
+ }
+ if (trans->flags & TRANS_ALIAS) {
+ if (trans->nolisten)
+ while (trans->nolisten[i]) {
+ ret |= TRANS(NoListen)(trans->nolisten[i]);
+ i++;
+ }
+ }
+
+ trans->flags |= TRANS_NOLISTEN;
+ return ret;
+}
+
+int
+TRANS(ResetListener) (XtransConnInfo ciptr)
+
+{
+ if (ciptr->transptr->ResetListener)
+ return ciptr->transptr->ResetListener (ciptr);
+ else
+ return TRANS_RESET_NOOP;
+}
+
+
+XtransConnInfo
+TRANS(Accept) (XtransConnInfo ciptr, int *status)
+
+{
+ XtransConnInfo newciptr;
+
+ PRMSG (2,"Accept(%d)\n", ciptr->fd, 0, 0);
+
+ newciptr = ciptr->transptr->Accept (ciptr, status);
+
+ if (newciptr)
+ newciptr->transptr = ciptr->transptr;
+
+ return newciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+int
+TRANS(Connect) (XtransConnInfo ciptr, char *address)
+
+{
+ char *protocol;
+ char *host;
+ char *port;
+ int ret;
+
+ PRMSG (2,"Connect(%d,%s)\n", ciptr->fd, address, 0);
+
+ if (TRANS(ParseAddress) (address, &protocol, &host, &port) == 0)
+ {
+ PRMSG (1,"Connect: Unable to Parse address %s\n",
+ address, 0, 0);
+ return -1;
+ }
+
+#ifdef HAVE_LAUNCHD
+ if (!host) host=strdup("");
+#endif
+
+ if (!port || !*port)
+ {
+ PRMSG (1,"Connect: Missing port specification in %s\n",
+ address, 0, 0);
+ if (protocol) xfree (protocol);
+ if (host) xfree (host);
+ return -1;
+ }
+
+ ret = ciptr->transptr->Connect (ciptr, host, port);
+
+ if (protocol) xfree (protocol);
+ if (host) xfree (host);
+ if (port) xfree (port);
+
+ return ret;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+int
+TRANS(BytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend)
+
+{
+ return ciptr->transptr->BytesReadable (ciptr, pend);
+}
+
+int
+TRANS(Read) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+ return ciptr->transptr->Read (ciptr, buf, size);
+}
+
+int
+TRANS(Write) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+ return ciptr->transptr->Write (ciptr, buf, size);
+}
+
+int
+TRANS(Readv) (XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ return ciptr->transptr->Readv (ciptr, buf, size);
+}
+
+int
+TRANS(Writev) (XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ return ciptr->transptr->Writev (ciptr, buf, size);
+}
+
+int
+TRANS(Disconnect) (XtransConnInfo ciptr)
+
+{
+ return ciptr->transptr->Disconnect (ciptr);
+}
+
+int
+TRANS(Close) (XtransConnInfo ciptr)
+
+{
+ int ret;
+
+ PRMSG (2,"Close(%d)\n", ciptr->fd, 0, 0);
+
+ ret = ciptr->transptr->Close (ciptr);
+
+ TRANS(FreeConnInfo) (ciptr);
+
+ return ret;
+}
+
+int
+TRANS(CloseForCloning) (XtransConnInfo ciptr)
+
+{
+ int ret;
+
+ PRMSG (2,"CloseForCloning(%d)\n", ciptr->fd, 0, 0);
+
+ ret = ciptr->transptr->CloseForCloning (ciptr);
+
+ TRANS(FreeConnInfo) (ciptr);
+
+ return ret;
+}
+
+int
+TRANS(IsLocal) (XtransConnInfo ciptr)
+
+{
+ return (ciptr->family == AF_UNIX);
+}
+
+
+int
+TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
+ Xtransaddr **addrp)
+
+{
+ PRMSG (2,"GetMyAddr(%d)\n", ciptr->fd, 0, 0);
+
+ *familyp = ciptr->family;
+ *addrlenp = ciptr->addrlen;
+
+ if ((*addrp = (Xtransaddr *) xalloc (ciptr->addrlen)) == NULL)
+ {
+ PRMSG (1,"GetMyAddr: malloc failed\n", 0, 0, 0);
+ return -1;
+ }
+ memcpy(*addrp, ciptr->addr, ciptr->addrlen);
+
+ return 0;
+}
+
+int
+TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
+ Xtransaddr **addrp)
+
+{
+ PRMSG (2,"GetPeerAddr(%d)\n", ciptr->fd, 0, 0);
+
+ *familyp = ciptr->family;
+ *addrlenp = ciptr->peeraddrlen;
+
+ if ((*addrp = (Xtransaddr *) xalloc (ciptr->peeraddrlen)) == NULL)
+ {
+ PRMSG (1,"GetPeerAddr: malloc failed\n", 0, 0, 0);
+ return -1;
+ }
+ memcpy(*addrp, ciptr->peeraddr, ciptr->peeraddrlen);
+
+ return 0;
+}
+
+
+int
+TRANS(GetConnectionNumber) (XtransConnInfo ciptr)
+
+{
+ return ciptr->fd;
+}
+
+
+/*
+ * These functions are really utility functions, but they require knowledge
+ * of the internal data structures, so they have to be part of the Transport
+ * Independant API.
+ */
+
+#ifdef TRANS_SERVER
+
+static int
+complete_network_count (void)
+
+{
+ int count = 0;
+ int found_local = 0;
+ int i;
+
+ /*
+ * For a complete network, we only need one LOCALCONN transport to work
+ */
+
+ for (i = 0; i < NUMTRANS; i++)
+ {
+ if (Xtransports[i].transport->flags & TRANS_ALIAS
+ || Xtransports[i].transport->flags & TRANS_NOLISTEN)
+ continue;
+
+ if (Xtransports[i].transport->flags & TRANS_LOCAL)
+ found_local = 1;
+ else
+ count++;
+ }
+
+ return (count + found_local);
+}
+
+
+#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
+extern int xquartz_launchd_fd;
+#endif
+
+int
+TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
+ XtransConnInfo **ciptrs_ret)
+
+{
+ char buffer[256]; /* ??? What size ?? */
+ XtransConnInfo ciptr, temp_ciptrs[NUMTRANS];
+ int status, i, j;
+
+#if defined(IPv6) && defined(AF_INET6)
+ int ipv6_succ = 0;
+#endif
+ PRMSG (2,"MakeAllCOTSServerListeners(%s,%p)\n",
+ port ? port : "NULL", ciptrs_ret, 0);
+
+ *count_ret = 0;
+
+#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
+ fprintf(stderr, "Launchd socket fd: %d\n", xquartz_launchd_fd);
+ if(xquartz_launchd_fd != -1) {
+ if((ciptr = TRANS(ReopenCOTSServer(TRANS_SOCKET_LOCAL_INDEX,
+ xquartz_launchd_fd, getenv("DISPLAY"))))==NULL)
+ fprintf(stderr,"Got NULL while trying to Reopen launchd port\n");
+ else
+ temp_ciptrs[(*count_ret)++] = ciptr;
+ }
+#endif
+
+ for (i = 0; i < NUMTRANS; i++)
+ {
+ Xtransport *trans = Xtransports[i].transport;
+ unsigned int flags = 0;
+
+ if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN)
+ continue;
+
+ snprintf(buffer, sizeof(buffer), "%s/:%s",
+ trans->TransName, port ? port : "");
+
+ PRMSG (5,"MakeAllCOTSServerListeners: opening %s\n",
+ buffer, 0, 0);
+
+ if ((ciptr = TRANS(OpenCOTSServer(buffer))) == NULL)
+ {
+ if (trans->flags & TRANS_DISABLED)
+ continue;
+
+ PRMSG (1,
+ "MakeAllCOTSServerListeners: failed to open listener for %s\n",
+ trans->TransName, 0, 0);
+ continue;
+ }
+#if defined(IPv6) && defined(AF_INET6)
+ if ((Xtransports[i].transport_id == TRANS_SOCKET_INET_INDEX
+ && ipv6_succ))
+ flags |= ADDR_IN_USE_ALLOWED;
+#endif
+
+ if ((status = TRANS(CreateListener (ciptr, port, flags))) < 0)
+ {
+ if (status == TRANS_ADDR_IN_USE)
+ {
+ /*
+ * We failed to bind to the specified address because the
+ * address is in use. It must be that a server is already
+ * running at this address, and this function should fail.
+ */
+
+ PRMSG (1,
+ "MakeAllCOTSServerListeners: server already running\n",
+ 0, 0, 0);
+
+ for (j = 0; j < *count_ret; j++)
+ TRANS(Close) (temp_ciptrs[j]);
+
+ *count_ret = 0;
+ *ciptrs_ret = NULL;
+ *partial = 0;
+ return -1;
+ }
+ else
+ {
+ PRMSG (1,
+ "MakeAllCOTSServerListeners: failed to create listener for %s\n",
+ trans->TransName, 0, 0);
+
+ continue;
+ }
+ }
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (Xtransports[i].transport_id == TRANS_SOCKET_INET6_INDEX)
+ ipv6_succ = 1;
+#endif
+
+ PRMSG (5,
+ "MakeAllCOTSServerListeners: opened listener for %s, %d\n",
+ trans->TransName, ciptr->fd, 0);
+
+ temp_ciptrs[*count_ret] = ciptr;
+ (*count_ret)++;
+ }
+
+ *partial = (*count_ret < complete_network_count());
+
+ PRMSG (5,
+ "MakeAllCOTSServerListeners: partial=%d, actual=%d, complete=%d \n",
+ *partial, *count_ret, complete_network_count());
+
+ if (*count_ret > 0)
+ {
+ if ((*ciptrs_ret = (XtransConnInfo *) xalloc (
+ *count_ret * sizeof (XtransConnInfo))) == NULL)
+ {
+ return -1;
+ }
+
+ for (i = 0; i < *count_ret; i++)
+ {
+ (*ciptrs_ret)[i] = temp_ciptrs[i];
+ }
+ }
+ else
+ *ciptrs_ret = NULL;
+
+ return 0;
+}
+
+int
+TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
+ XtransConnInfo **ciptrs_ret)
+
+{
+ char buffer[256]; /* ??? What size ?? */
+ XtransConnInfo ciptr, temp_ciptrs[NUMTRANS];
+ int status, i, j;
+
+ PRMSG (2,"MakeAllCLTSServerListeners(%s,%p)\n",
+ port ? port : "NULL", ciptrs_ret, 0);
+
+ *count_ret = 0;
+
+ for (i = 0; i < NUMTRANS; i++)
+ {
+ Xtransport *trans = Xtransports[i].transport;
+
+ if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN)
+ continue;
+
+ snprintf(buffer, sizeof(buffer), "%s/:%s",
+ trans->TransName, port ? port : "");
+
+ PRMSG (5,"MakeAllCLTSServerListeners: opening %s\n",
+ buffer, 0, 0);
+
+ if ((ciptr = TRANS(OpenCLTSServer (buffer))) == NULL)
+ {
+ PRMSG (1,
+ "MakeAllCLTSServerListeners: failed to open listener for %s\n",
+ trans->TransName, 0, 0);
+ continue;
+ }
+
+ if ((status = TRANS(CreateListener (ciptr, port, 0))) < 0)
+ {
+ if (status == TRANS_ADDR_IN_USE)
+ {
+ /*
+ * We failed to bind to the specified address because the
+ * address is in use. It must be that a server is already
+ * running at this address, and this function should fail.
+ */
+
+ PRMSG (1,
+ "MakeAllCLTSServerListeners: server already running\n",
+ 0, 0, 0);
+
+ for (j = 0; j < *count_ret; j++)
+ TRANS(Close) (temp_ciptrs[j]);
+
+ *count_ret = 0;
+ *ciptrs_ret = NULL;
+ *partial = 0;
+ return -1;
+ }
+ else
+ {
+ PRMSG (1,
+ "MakeAllCLTSServerListeners: failed to create listener for %s\n",
+ trans->TransName, 0, 0);
+
+ continue;
+ }
+ }
+
+ PRMSG (5,
+ "MakeAllCLTSServerListeners: opened listener for %s, %d\n",
+ trans->TransName, ciptr->fd, 0);
+ temp_ciptrs[*count_ret] = ciptr;
+ (*count_ret)++;
+ }
+
+ *partial = (*count_ret < complete_network_count());
+
+ PRMSG (5,
+ "MakeAllCLTSServerListeners: partial=%d, actual=%d, complete=%d \n",
+ *partial, *count_ret, complete_network_count());
+
+ if (*count_ret > 0)
+ {
+ if ((*ciptrs_ret = (XtransConnInfo *) xalloc (
+ *count_ret * sizeof (XtransConnInfo))) == NULL)
+ {
+ return -1;
+ }
+
+ for (i = 0; i < *count_ret; i++)
+ {
+ (*ciptrs_ret)[i] = temp_ciptrs[i];
+ }
+ }
+ else
+ *ciptrs_ret = NULL;
+
+ return 0;
+}
+
+#endif /* TRANS_SERVER */
+
+
+
+/*
+ * These routines are not part of the X Transport Interface, but they
+ * may be used by it.
+ */
+
+
+#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
+
+/*
+ * emulate readv
+ */
+
+static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
+
+{
+ int i, len, total;
+ char *base;
+
+ ESET(0);
+ for (i = 0, total = 0; i < iovcnt; i++, iov++) {
+ len = iov->iov_len;
+ base = iov->iov_base;
+ while (len > 0) {
+ register int nbytes;
+ nbytes = TRANS(Read) (ciptr, base, len);
+ if (nbytes < 0 && total == 0) return -1;
+ if (nbytes <= 0) return total;
+ ESET(0);
+ len -= nbytes;
+ total += nbytes;
+ base += nbytes;
+ }
+ }
+ return total;
+}
+
+#endif /* SYSV && __i386__ || WIN32 || __sxg__ */
+
+#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
+
+/*
+ * emulate writev
+ */
+
+static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
+
+{
+ int i, len, total;
+ char *base;
+
+ ESET(0);
+ for (i = 0, total = 0; i < iovcnt; i++, iov++) {
+ len = iov->iov_len;
+ base = iov->iov_base;
+ while (len > 0) {
+ register int nbytes;
+ nbytes = TRANS(Write) (ciptr, base, len);
+ if (nbytes < 0 && total == 0) return -1;
+ if (nbytes <= 0) return total;
+ ESET(0);
+ len -= nbytes;
+ total += nbytes;
+ base += nbytes;
+ }
+ }
+ return total;
+}
+
+#endif /* SYSV && __i386__ || WIN32 || __sxg__ */
+
+
+#if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SCO__)
+#ifndef NEED_UTSNAME
+#define NEED_UTSNAME
+#endif
+#include <sys/utsname.h>
+#endif
+
+/*
+ * TRANS(GetHostname) - similar to gethostname but allows special processing.
+ */
+
+int TRANS(GetHostname) (char *buf, int maxlen)
+
+{
+ int len;
+
+#ifdef NEED_UTSNAME
+ struct utsname name;
+
+ uname (&name);
+ len = strlen (name.nodename);
+ if (len >= maxlen) len = maxlen - 1;
+ strncpy (buf, name.nodename, len);
+ buf[len] = '\0';
+#else
+ buf[0] = '\0';
+ (void) gethostname (buf, maxlen);
+ buf [maxlen - 1] = '\0';
+ len = strlen(buf);
+#endif /* NEED_UTSNAME */
+ return len;
+}
diff --git a/X11/xtrans/Xtrans.h b/X11/xtrans/Xtrans.h
new file mode 100644
index 000000000..cb83196f1
--- /dev/null
+++ b/X11/xtrans/Xtrans.h
@@ -0,0 +1,478 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _XTRANS_H_
+#define _XTRANS_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/Xos.h>
+
+#ifndef WIN32
+#include <sys/socket.h>
+#endif
+
+
+/*
+ * Set the functions names according to where this code is being compiled.
+ */
+
+#ifdef X11_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _X11Trans##func
+#else
+#define TRANS(func) _X11Trans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_X11Trans";
+#endif
+#endif /* X11_t */
+
+#ifdef XSERV_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _XSERVTrans##func
+#else
+#define TRANS(func) _XSERVTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_XSERVTrans";
+#endif
+#define X11_t
+#endif /* XSERV_t */
+
+#ifdef XIM_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _XimXTrans##func
+#else
+#define TRANS(func) _XimXTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_XimTrans";
+#endif
+#endif /* XIM_t */
+
+#ifdef FS_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _FSTrans##func
+#else
+#define TRANS(func) _FSTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_FSTrans";
+#endif
+#endif /* FS_t */
+
+#ifdef FONT_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _FontTrans##func
+#else
+#define TRANS(func) _FontTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_FontTrans";
+#endif
+#endif /* FONT_t */
+
+#ifdef ICE_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _IceTrans##func
+#else
+#define TRANS(func) _IceTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_IceTrans";
+#endif
+#endif /* ICE_t */
+
+#ifdef TEST_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _TESTTrans##func
+#else
+#define TRANS(func) _TESTTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_TESTTrans";
+#endif
+#endif /* TEST_t */
+
+#ifdef LBXPROXY_t
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _LBXPROXYTrans##func
+#else
+#define TRANS(func) _LBXPROXYTrans/**/func
+#endif
+#define X11_t /* The server defines this - so should the LBX proxy */
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_LBXPROXYTrans";
+#endif
+#endif /* LBXPROXY_t */
+
+#if !defined(TRANS)
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define TRANS(func) _XTrans##func
+#else
+#define TRANS(func) _XTrans/**/func
+#endif
+#ifdef XTRANSDEBUG
+static char* __xtransname = "_XTrans";
+#endif
+#endif /* !TRANS */
+
+
+/*
+ * Create a single address structure that can be used wherever
+ * an address structure is needed. struct sockaddr is not big enough
+ * to hold a sockadd_un, so we create this definition to have a single
+ * structure that is big enough for all the structures we might need.
+ *
+ * This structure needs to be independent of the socket/TLI interface used.
+ */
+
+#if defined(IPv6) && defined(AF_INET6)
+typedef struct sockaddr_storage Xtransaddr;
+#else
+#define XTRANS_MAX_ADDR_LEN 128 /* large enough to hold sun_path */
+
+typedef struct {
+ unsigned char addr[XTRANS_MAX_ADDR_LEN];
+} Xtransaddr;
+#endif
+
+#ifdef LONG64
+typedef int BytesReadable_t;
+#else
+typedef long BytesReadable_t;
+#endif
+
+
+#if defined(WIN32) || defined(USG)
+
+/*
+ * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found
+ * in Berkeley systems in <sys/uio.h>. See the readv(2) and writev(2)
+ * manual pages for details.
+ */
+
+struct iovec {
+ caddr_t iov_base;
+ int iov_len;
+};
+
+#else
+#include <sys/uio.h>
+#endif
+
+typedef struct _XtransConnInfo *XtransConnInfo;
+
+
+/*
+ * Transport Option definitions
+ */
+
+#define TRANS_NONBLOCKING 1
+#define TRANS_CLOSEONEXEC 2
+
+
+/*
+ * Return values of Connect (0 is success)
+ */
+
+#define TRANS_CONNECT_FAILED -1
+#define TRANS_TRY_CONNECT_AGAIN -2
+#define TRANS_IN_PROGRESS -3
+
+
+/*
+ * Return values of CreateListener (0 is success)
+ */
+
+#define TRANS_CREATE_LISTENER_FAILED -1
+#define TRANS_ADDR_IN_USE -2
+
+
+/*
+ * Return values of Accept (0 is success)
+ */
+
+#define TRANS_ACCEPT_BAD_MALLOC -1
+#define TRANS_ACCEPT_FAILED -2
+#define TRANS_ACCEPT_MISC_ERROR -3
+
+
+/*
+ * ResetListener return values
+ */
+
+#define TRANS_RESET_NOOP 1
+#define TRANS_RESET_NEW_FD 2
+#define TRANS_RESET_FAILURE 3
+
+
+/*
+ * Function prototypes for the exposed interface
+ */
+
+void TRANS(FreeConnInfo) (
+ XtransConnInfo /* ciptr */
+);
+
+#ifdef TRANS_CLIENT
+
+XtransConnInfo TRANS(OpenCOTSClient)(
+ char * /* address */
+);
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+
+XtransConnInfo TRANS(OpenCOTSServer)(
+ char * /* address */
+);
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_CLIENT
+
+XtransConnInfo TRANS(OpenCLTSClient)(
+ char * /* address */
+);
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+
+XtransConnInfo TRANS(OpenCLTSServer)(
+ char * /* address */
+);
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_REOPEN
+
+XtransConnInfo TRANS(ReopenCOTSServer)(
+ int, /* trans_id */
+ int, /* fd */
+ char * /* port */
+);
+
+XtransConnInfo TRANS(ReopenCLTSServer)(
+ int, /* trans_id */
+ int, /* fd */
+ char * /* port */
+);
+
+int TRANS(GetReopenInfo)(
+ XtransConnInfo, /* ciptr */
+ int *, /* trans_id */
+ int *, /* fd */
+ char ** /* port */
+);
+
+#endif /* TRANS_REOPEN */
+
+
+int TRANS(SetOption)(
+ XtransConnInfo, /* ciptr */
+ int, /* option */
+ int /* arg */
+);
+
+#ifdef TRANS_SERVER
+
+int TRANS(CreateListener)(
+ XtransConnInfo, /* ciptr */
+ char *, /* port */
+ unsigned int /* flags */
+);
+
+int TRANS(NoListen) (
+ char* /* protocol*/
+);
+
+int TRANS(ResetListener)(
+ XtransConnInfo /* ciptr */
+);
+
+XtransConnInfo TRANS(Accept)(
+ XtransConnInfo, /* ciptr */
+ int * /* status */
+);
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_CLIENT
+
+int TRANS(Connect)(
+ XtransConnInfo, /* ciptr */
+ char * /* address */
+);
+
+#endif /* TRANS_CLIENT */
+
+int TRANS(BytesReadable)(
+ XtransConnInfo, /* ciptr */
+ BytesReadable_t * /* pend */
+);
+
+int TRANS(Read)(
+ XtransConnInfo, /* ciptr */
+ char *, /* buf */
+ int /* size */
+);
+
+int TRANS(Write)(
+ XtransConnInfo, /* ciptr */
+ char *, /* buf */
+ int /* size */
+);
+
+int TRANS(Readv)(
+ XtransConnInfo, /* ciptr */
+ struct iovec *, /* buf */
+ int /* size */
+);
+
+int TRANS(Writev)(
+ XtransConnInfo, /* ciptr */
+ struct iovec *, /* buf */
+ int /* size */
+);
+
+int TRANS(Disconnect)(
+ XtransConnInfo /* ciptr */
+);
+
+int TRANS(Close)(
+ XtransConnInfo /* ciptr */
+);
+
+int TRANS(CloseForCloning)(
+ XtransConnInfo /* ciptr */
+);
+
+int TRANS(IsLocal)(
+ XtransConnInfo /* ciptr */
+);
+
+int TRANS(GetMyAddr)(
+ XtransConnInfo, /* ciptr */
+ int *, /* familyp */
+ int *, /* addrlenp */
+ Xtransaddr ** /* addrp */
+);
+
+int TRANS(GetPeerAddr)(
+ XtransConnInfo, /* ciptr */
+ int *, /* familyp */
+ int *, /* addrlenp */
+ Xtransaddr ** /* addrp */
+);
+
+int TRANS(GetConnectionNumber)(
+ XtransConnInfo /* ciptr */
+);
+
+#ifdef TRANS_SERVER
+
+int TRANS(MakeAllCOTSServerListeners)(
+ char *, /* port */
+ int *, /* partial */
+ int *, /* count_ret */
+ XtransConnInfo ** /* ciptrs_ret */
+);
+
+int TRANS(MakeAllCLTSServerListeners)(
+ char *, /* port */
+ int *, /* partial */
+ int *, /* count_ret */
+ XtransConnInfo ** /* ciptrs_ret */
+);
+
+#endif /* TRANS_SERVER */
+
+
+/*
+ * Function Prototypes for Utility Functions.
+ */
+
+#ifdef X11_t
+
+int TRANS(ConvertAddress)(
+ int *, /* familyp */
+ int *, /* addrlenp */
+ Xtransaddr ** /* addrp */
+);
+
+#endif /* X11_t */
+
+#ifdef ICE_t
+
+char *
+TRANS(GetMyNetworkId)(
+ XtransConnInfo /* ciptr */
+);
+
+char *
+TRANS(GetPeerNetworkId)(
+ XtransConnInfo /* ciptr */
+);
+
+#endif /* ICE_t */
+
+int
+TRANS(GetHostname) (
+ char * /* buf */,
+ int /* maxlen */
+);
+
+#if defined(WIN32) && defined(TCPCONN)
+int TRANS(WSAStartup)();
+#endif
+
+#endif /* _XTRANS_H_ */
diff --git a/X11/xtrans/Xtransint.h b/X11/xtrans/Xtransint.h
new file mode 100644
index 000000000..523751ed9
--- /dev/null
+++ b/X11/xtrans/Xtransint.h
@@ -0,0 +1,414 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _XTRANSINT_H_
+#define _XTRANSINT_H_
+
+/*
+ * XTRANSDEBUG will enable the PRMSG() macros used in the X Transport
+ * Interface code. Each use of the PRMSG macro has a level associated with
+ * it. XTRANSDEBUG is defined to be a level. If the invocation level is =<
+ * the value of XTRANSDEBUG, then the message will be printed out to stderr.
+ * Recommended levels are:
+ *
+ * XTRANSDEBUG=1 Error messages
+ * XTRANSDEBUG=2 API Function Tracing
+ * XTRANSDEBUG=3 All Function Tracing
+ * XTRANSDEBUG=4 printing of intermediate values
+ * XTRANSDEBUG=5 really detailed stuff
+#define XTRANSDEBUG 2
+ *
+ * Defining XTRANSDEBUGTIMESTAMP will cause printing timestamps with each
+ * message.
+ */
+
+#ifndef XTRANSDEBUG
+# define XTRANSDEBUG 1
+#endif
+
+#ifdef WIN32
+# define _WILLWINSOCK_
+#endif
+
+#include "Xtrans.h"
+
+#ifdef XTRANSDEBUG
+# include <stdio.h>
+#endif /* XTRANSDEBUG */
+
+#include <errno.h>
+
+#ifndef WIN32
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+
+/*
+ * Moved the setting of NEED_UTSNAME to this header file from Xtrans.c,
+ * to avoid a race condition. JKJ (6/5/97)
+ */
+
+# if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SCO__)
+# ifndef NEED_UTSNAME
+# define NEED_UTSNAME
+# endif
+# include <sys/utsname.h>
+# endif
+
+# define ESET(val) errno = val
+# define EGET() errno
+
+#else /* WIN32 */
+
+# include <limits.h> /* for USHRT_MAX */
+
+# define ESET(val) WSASetLastError(val)
+# define EGET() WSAGetLastError()
+
+#endif /* WIN32 */
+
+#include <stddef.h>
+
+#ifdef X11_t
+#define X_TCP_PORT 6000
+#endif
+
+struct _XtransConnInfo {
+ struct _Xtransport *transptr;
+ int index;
+ char *priv;
+ int flags;
+ int fd;
+ char *port;
+ int family;
+ char *addr;
+ int addrlen;
+ char *peeraddr;
+ int peeraddrlen;
+};
+
+#define XTRANS_OPEN_COTS_CLIENT 1
+#define XTRANS_OPEN_COTS_SERVER 2
+#define XTRANS_OPEN_CLTS_CLIENT 3
+#define XTRANS_OPEN_CLTS_SERVER 4
+
+
+typedef struct _Xtransport {
+ char *TransName;
+ int flags;
+
+#ifdef TRANS_CLIENT
+
+ XtransConnInfo (*OpenCOTSClient)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+ char ** nolisten;
+ XtransConnInfo (*OpenCOTSServer)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_CLIENT
+
+ XtransConnInfo (*OpenCLTSClient)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+
+ XtransConnInfo (*OpenCLTSServer)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+ XtransConnInfo (*ReopenCOTSServer)(
+ struct _Xtransport *, /* transport */
+ int, /* fd */
+ char * /* port */
+ );
+
+ XtransConnInfo (*ReopenCLTSServer)(
+ struct _Xtransport *, /* transport */
+ int, /* fd */
+ char * /* port */
+ );
+
+#endif /* TRANS_REOPEN */
+
+
+ int (*SetOption)(
+ XtransConnInfo, /* connection */
+ int, /* option */
+ int /* arg */
+ );
+
+#ifdef TRANS_SERVER
+/* Flags */
+# define ADDR_IN_USE_ALLOWED 1
+
+ int (*CreateListener)(
+ XtransConnInfo, /* connection */
+ char *, /* port */
+ unsigned int /* flags */
+ );
+
+ int (*ResetListener)(
+ XtransConnInfo /* connection */
+ );
+
+ XtransConnInfo (*Accept)(
+ XtransConnInfo, /* connection */
+ int * /* status */
+ );
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_CLIENT
+
+ int (*Connect)(
+ XtransConnInfo, /* connection */
+ char *, /* host */
+ char * /* port */
+ );
+
+#endif /* TRANS_CLIENT */
+
+ int (*BytesReadable)(
+ XtransConnInfo, /* connection */
+ BytesReadable_t * /* pend */
+ );
+
+ int (*Read)(
+ XtransConnInfo, /* connection */
+ char *, /* buf */
+ int /* size */
+ );
+
+ int (*Write)(
+ XtransConnInfo, /* connection */
+ char *, /* buf */
+ int /* size */
+ );
+
+ int (*Readv)(
+ XtransConnInfo, /* connection */
+ struct iovec *, /* buf */
+ int /* size */
+ );
+
+ int (*Writev)(
+ XtransConnInfo, /* connection */
+ struct iovec *, /* buf */
+ int /* size */
+ );
+
+ int (*Disconnect)(
+ XtransConnInfo /* connection */
+ );
+
+ int (*Close)(
+ XtransConnInfo /* connection */
+ );
+
+ int (*CloseForCloning)(
+ XtransConnInfo /* connection */
+ );
+
+} Xtransport;
+
+
+typedef struct _Xtransport_table {
+ Xtransport *transport;
+ int transport_id;
+} Xtransport_table;
+
+
+/*
+ * Flags for the flags member of Xtransport.
+ */
+
+#define TRANS_ALIAS (1<<0) /* record is an alias, don't create server */
+#define TRANS_LOCAL (1<<1) /* local transport */
+#define TRANS_DISABLED (1<<2) /* Don't open this one */
+#define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */
+#define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */
+#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */
+#define TRANS_NOXAUTH (1<<6) /* Don't verify authentication (because it's secure some other way at the OS layer) */
+
+/* Flags to preserve when setting others */
+#define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT)
+
+/*
+ * readv() and writev() don't exist or don't work correctly on some
+ * systems, so they may be emulated.
+ */
+
+#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
+
+#define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
+
+static int TRANS(ReadV)(
+ XtransConnInfo, /* ciptr */
+ struct iovec *, /* iov */
+ int /* iovcnt */
+);
+
+#else
+
+#define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt)
+
+#endif /* CRAY || (SYSV && __i386__) || WIN32 || __sxg__ || */
+
+
+#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
+
+#define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt)
+
+static int TRANS(WriteV)(
+ XtransConnInfo, /* ciptr */
+ struct iovec *, /* iov */
+ int /* iovcnt */
+);
+
+#else
+
+#define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt)
+
+#endif /* CRAY || WIN32 || __sxg__ */
+
+
+static int is_numeric (
+ char * /* str */
+);
+
+#ifdef TRANS_SERVER
+static int trans_mkdir (
+ char *, /* path */
+ int /* mode */
+);
+#endif
+
+/*
+ * Some XTRANSDEBUG stuff
+ */
+
+#if defined(XTRANSDEBUG)
+/* add hack to the format string to avoid warnings about extra arguments
+ * to fprintf.
+ */
+#ifdef XTRANSDEBUGTIMESTAMP
+#if defined(XSERV_t) && defined(TRANS_SERVER)
+/* Use ErrorF() for the X server */
+#define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \
+ int hack= 0, saveerrno=errno; \
+ struct timeval tp;\
+ gettimeofday(&tp,0); \
+ ErrorF(__xtransname); \
+ ErrorF(x+hack,a,b,c); \
+ ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \
+ errno=saveerrno; \
+ } else ((void)0)
+#else
+#define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \
+ int hack= 0, saveerrno=errno; \
+ struct timeval tp;\
+ gettimeofday(&tp,0); \
+ fprintf(stderr, __xtransname); fflush(stderr); \
+ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \
+ fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \
+ fflush(stderr); \
+ errno=saveerrno; \
+ } else ((void)0)
+#endif /* XSERV_t && TRANS_SERVER */
+#else /* XTRANSDEBUGTIMESTAMP */
+#if defined(XSERV_t) && defined(TRANS_SERVER)
+/* Use ErrorF() for the X server */
+#define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \
+ int hack= 0, saveerrno=errno; \
+ ErrorF(__xtransname); \
+ ErrorF(x+hack,a,b,c); \
+ errno=saveerrno; \
+ } else ((void)0)
+#else
+#define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \
+ int hack= 0, saveerrno=errno; \
+ fprintf(stderr, __xtransname); fflush(stderr); \
+ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \
+ errno=saveerrno; \
+ } else ((void)0)
+#endif /* XSERV_t && TRANS_SERVER */
+#endif /* XTRANSDEBUGTIMESTAMP */
+#else
+#define PRMSG(lvl,x,a,b,c) ((void)0)
+#endif /* XTRANSDEBUG */
+
+#endif /* _XTRANSINT_H_ */
diff --git a/X11/xtrans/Xtranslcl.c b/X11/xtrans/Xtranslcl.c
new file mode 100644
index 000000000..f6a2468ec
--- /dev/null
+++ b/X11/xtrans/Xtranslcl.c
@@ -0,0 +1,2561 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ *
+ * The connection code/ideas in lib/X and server/os for SVR4/Intel
+ * environments was contributed by the following companies/groups:
+ *
+ * MetroLink Inc
+ * NCR
+ * Pittsburgh Powercomputing Corporation (PPc)/Quarterdeck Office Systems
+ * SGCS
+ * Unix System Laboratories (USL) / Novell
+ * XFree86
+ *
+ * The goal is to have common connection code among all SVR4/Intel vendors.
+ *
+ * ALL THE ABOVE COMPANIES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL THESE COMPANIES * BE LIABLE FOR ANY SPECIAL, INDIRECT
+ * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+ * OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <errno.h>
+#include <ctype.h>
+#include <sys/signal.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#if defined(SVR4)
+#include <sys/filio.h>
+#endif
+#ifdef sun
+# include <stropts.h>
+#else
+# include <sys/stropts.h>
+#endif
+#include <sys/wait.h>
+#include <sys/types.h>
+
+/*
+ * The local transports should be treated the same as a UNIX domain socket
+ * wrt authentication, etc. Because of this, we will use struct sockaddr_un
+ * for the address format. This will simplify the code in other places like
+ * The X Server.
+ */
+
+#include <sys/socket.h>
+#ifndef X_NO_SYS_UN
+#include <sys/un.h>
+#endif
+
+
+/* Types of local connections supported:
+ * - PTS
+ * - named pipes
+ * - ISC
+ * - SCO
+ */
+#if !defined(sun)
+# define LOCAL_TRANS_PTS
+#endif
+#if defined(SVR4) || defined(__SVR4)
+# define LOCAL_TRANS_NAMED
+#endif
+#if defined(__SCO__) || defined(__UNIXWARE__)
+# define LOCAL_TRANS_SCO
+#endif
+
+static int TRANS(LocalClose)(XtransConnInfo ciptr);
+
+/*
+ * These functions actually implement the local connection mechanisms.
+ */
+
+/* Type Not Supported */
+
+static int
+TRANS(OpenFail)(XtransConnInfo ciptr, char *port)
+
+{
+ return -1;
+}
+
+#ifdef TRANS_REOPEN
+
+static int
+TRANS(ReopenFail)(XtransConnInfo ciptr, int fd, char *port)
+
+{
+ return 0;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+
+static int
+TRANS(FillAddrInfo)(XtransConnInfo ciptr, char *sun_path, char *peer_sun_path)
+
+{
+ struct sockaddr_un *sunaddr;
+ struct sockaddr_un *p_sunaddr;
+
+ ciptr->family = AF_UNIX;
+ ciptr->addrlen = sizeof (struct sockaddr_un);
+
+ if ((sunaddr = (struct sockaddr_un *) xalloc (ciptr->addrlen)) == NULL)
+ {
+ PRMSG(1,"FillAddrInfo: failed to allocate memory for addr\n", 0, 0, 0);
+ return 0;
+ }
+
+ sunaddr->sun_family = AF_UNIX;
+
+ if (strlen(sun_path) > sizeof(sunaddr->sun_path) - 1) {
+ PRMSG(1, "FillAddrInfo: path too long\n", 0, 0, 0);
+ return 0;
+ }
+ strcpy (sunaddr->sun_path, sun_path);
+#if defined(BSD44SOCKETS)
+ sunaddr->sun_len = strlen (sunaddr->sun_path);
+#endif
+
+ ciptr->addr = (char *) sunaddr;
+
+ ciptr->peeraddrlen = sizeof (struct sockaddr_un);
+
+ if ((p_sunaddr = (struct sockaddr_un *) xalloc (
+ ciptr->peeraddrlen)) == NULL)
+ {
+ PRMSG(1,
+ "FillAddrInfo: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ xfree ((char *) sunaddr);
+ ciptr->addr = NULL;
+
+ return 0;
+ }
+
+ p_sunaddr->sun_family = AF_UNIX;
+
+ if (strlen(peer_sun_path) > sizeof(p_sunaddr->sun_path) - 1) {
+ PRMSG(1, "FillAddrInfo: peer path too long\n", 0, 0, 0);
+ return 0;
+ }
+ strcpy (p_sunaddr->sun_path, peer_sun_path);
+#if defined(BSD44SOCKETS)
+ p_sunaddr->sun_len = strlen (p_sunaddr->sun_path);
+#endif
+
+ ciptr->peeraddr = (char *) p_sunaddr;
+
+ return 1;
+}
+
+
+
+#ifdef LOCAL_TRANS_PTS
+/* PTS */
+
+#if defined(SYSV) && !defined(__SCO__)
+#define SIGNAL_T int
+#else
+#define SIGNAL_T void
+#endif /* SYSV */
+
+typedef SIGNAL_T (*PFV)();
+
+extern PFV signal();
+
+extern char *ptsname(
+ int
+);
+
+static void _dummy(int sig)
+
+{
+}
+#endif /* LOCAL_TRANS_PTS */
+
+#ifndef sun
+#define X_STREAMS_DIR "/dev/X"
+#define DEV_SPX "/dev/spx"
+#else
+#ifndef X11_t
+#define X_STREAMS_DIR "/dev/X"
+#else
+#define X_STREAMS_DIR "/tmp/.X11-pipe"
+#endif
+#endif
+
+#define DEV_PTMX "/dev/ptmx"
+
+#if defined(X11_t)
+
+#define PTSNODENAME "/dev/X/server."
+#ifdef sun
+#define NAMEDNODENAME "/tmp/.X11-pipe/X"
+#else
+#define NAMEDNODENAME "/dev/X/Nserver."
+
+/*
+ * ISC is only defined for X11 since they are there for
+ * backwards binary compatability only.
+ */
+
+#define SCORNODENAME "/dev/X%1sR"
+#define SCOSNODENAME "/dev/X%1sS"
+#endif /* !sun */
+#endif
+#if defined(XIM_t)
+#ifdef sun
+#define NAMEDNODENAME "/tmp/.XIM-pipe/XIM"
+#else
+#define PTSNODENAME "/dev/X/XIM."
+#define NAMEDNODENAME "/dev/X/NXIM."
+#define SCORNODENAME "/dev/XIM.%sR"
+#define SCOSNODENAME "/dev/XIM.%sS"
+#endif
+#endif
+#if defined(FS_t) || defined (FONT_t)
+#ifdef sun
+#define NAMEDNODENAME "/tmp/.font-pipe/fs"
+#else
+/*
+ * USL has already defined something here. We need to check with them
+ * and see if their choice is usable here.
+ */
+#define PTSNODENAME "/dev/X/fontserver."
+#define NAMEDNODENAME "/dev/X/Nfontserver."
+#define SCORNODENAME "/dev/fontserver.%sR"
+#define SCOSNODENAME "/dev/fontserver.%sS"
+#endif
+#endif
+#if defined(ICE_t)
+#ifdef sun
+#define NAMEDNODENAME "/tmp/.ICE-pipe/"
+#else
+#define PTSNODENAME "/dev/X/ICE."
+#define NAMEDNODENAME "/dev/X/NICE."
+#define SCORNODENAME "/dev/ICE.%sR"
+#define SCOSNODENAME "/dev/ICE.%sS"
+#endif
+#endif
+#if defined(TEST_t)
+#ifdef sun
+#define NAMEDNODENAME "/tmp/.Test-unix/test"
+#endif
+#define PTSNODENAME "/dev/X/transtest."
+#define NAMEDNODENAME "/dev/X/Ntranstest."
+#define SCORNODENAME "/dev/transtest.%sR"
+#define SCOSNODENAME "/dev/transtest.%sS"
+#endif
+
+
+
+#ifdef LOCAL_TRANS_PTS
+#ifdef TRANS_CLIENT
+
+static int
+TRANS(PTSOpenClient)(XtransConnInfo ciptr, char *port)
+
+{
+#ifdef PTSNODENAME
+ int fd,server,exitval,alarm_time,ret;
+ char server_path[64];
+ char *slave, namelen;
+ char buf[20]; /* MAX_PATH_LEN?? */
+ PFV savef;
+ pid_t saved_pid;
+#endif
+
+ PRMSG(2,"PTSOpenClient(%s)\n", port, 0,0 );
+
+#if !defined(PTSNODENAME)
+ PRMSG(1,"PTSOpenClient: Protocol is not supported by a pts connection\n", 0,0,0);
+ return -1;
+#else
+ if (port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) sprintf(server_path, "%s", port);
+ } else {
+ (void) sprintf(server_path, "%s%s", PTSNODENAME, port);
+ }
+ } else {
+ (void) sprintf(server_path, "%s%d", PTSNODENAME, getpid());
+ }
+
+
+ /*
+ * Open the node the on which the server is listening.
+ */
+
+ if ((server = open (server_path, O_RDWR)) < 0) {
+ PRMSG(1,"PTSOpenClient: failed to open %s\n", server_path, 0,0);
+ return -1;
+ }
+
+
+ /*
+ * Open the streams based pipe that will be this connection.
+ */
+
+ if ((fd = open(DEV_PTMX, O_RDWR)) < 0) {
+ PRMSG(1,"PTSOpenClient: failed to open %s\n", DEV_PTMX, 0,0);
+ return(-1);
+ }
+
+ (void) grantpt(fd);
+ (void) unlockpt(fd);
+
+ slave = ptsname(fd); /* get name */
+
+ if( slave == NULL ) {
+ PRMSG(1,"PTSOpenClient: failed to get ptsname()\n", 0,0,0);
+ close(fd);
+ close(server);
+ return -1;
+ }
+
+ /*
+ * This is neccesary for the case where a program is setuid to non-root.
+ * grantpt() calls /usr/lib/pt_chmod which is set-uid root. This program will
+ * set the owner of the pt device incorrectly if the uid is not restored
+ * before it is called. The problem is that once it gets restored, it
+ * cannot be changed back to its original condition, hence the fork().
+ */
+
+ if(!(saved_pid=fork())) {
+ uid_t saved_euid;
+
+ saved_euid = geteuid();
+ /** sets the euid to the actual/real uid **/
+ if (setuid( getuid() ) == -1) {
+ exit(1);
+ }
+ if( chown( slave, saved_euid, -1 ) < 0 ) {
+ exit( 1 );
+ }
+
+ exit( 0 );
+ }
+
+ waitpid(saved_pid, &exitval, 0);
+ if (WIFEXITED(exitval) && WEXITSTATUS(exitval) != 0) {
+ close(fd);
+ close(server);
+ PRMSG(1, "PTSOpenClient: cannot set the owner of %s\n",
+ slave, 0, 0);
+ return(-1);
+ }
+ if (chmod(slave, 0666) < 0) {
+ close(fd);
+ close(server);
+ PRMSG(1,"PTSOpenClient: Cannot chmod %s\n", slave, 0,0);
+ return(-1);
+ }
+
+ /*
+ * write slave name to server
+ */
+
+ namelen = strlen(slave);
+ buf[0] = namelen;
+ (void) sprintf(&buf[1], slave);
+ (void) write(server, buf, namelen+1);
+ (void) close(server);
+
+ /*
+ * wait for server to respond
+ */
+
+ savef = signal(SIGALRM, _dummy);
+ alarm_time = alarm (30); /* CONNECT_TIMEOUT */
+
+ ret = read(fd, buf, 1);
+
+ (void) alarm(alarm_time);
+ (void) signal(SIGALRM, savef);
+
+ if (ret != 1) {
+ PRMSG(1,
+ "PTSOpenClient: failed to get acknoledgement from server\n", 0, 0, 0);
+ (void) close(fd);
+ fd = -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if (TRANS(FillAddrInfo) (ciptr, slave, server_path) == 0)
+ {
+ PRMSG(1,"PTSOpenClient: failed to fill in addr info\n", 0, 0, 0);
+ close(fd);
+ return -1;
+ }
+
+ return(fd);
+
+#endif /* !PTSNODENAME */
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static int
+TRANS(PTSOpenServer)(XtransConnInfo ciptr, char *port)
+
+{
+#ifdef PTSNODENAME
+ int fd, server;
+ char server_path[64], *slave;
+ int mode;
+#endif
+
+ PRMSG(2,"PTSOpenServer(%s)\n", port, 0,0 );
+
+#if !defined(PTSNODENAME)
+ PRMSG(1,"PTSOpenServer: Protocol is not supported by a pts connection\n", 0,0,0);
+ return -1;
+#else
+ if (port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) sprintf(server_path, "%s", port);
+ } else {
+ (void) sprintf(server_path, "%s%s", PTSNODENAME, port);
+ }
+ } else {
+ (void) sprintf(server_path, "%s%d", PTSNODENAME, getpid());
+ }
+
+#ifdef HAS_STICKY_DIR_BIT
+ mode = 01777;
+#else
+ mode = 0777;
+#endif
+ if (trans_mkdir(X_STREAMS_DIR, mode) == -1) {
+ PRMSG (1, "PTSOpenServer: mkdir(%s) failed, errno = %d\n",
+ X_STREAMS_DIR, errno, 0);
+ return(-1);
+ }
+
+#if 0
+ if( (fd=open(server_path, O_RDWR)) >= 0 ) {
+ /*
+ * This doesn't prevent the server from starting up, and doesn't
+ * prevent clients from trying to connect to the in-use PTS (which
+ * is often in use by something other than another server).
+ */
+ PRMSG(1, "PTSOpenServer: A server is already running on port %s\n", port, 0,0 );
+ PRMSG(1, "PTSOpenServer: Remove %s if this is incorrect.\n", server_path, 0,0 );
+ close(fd);
+ return(-1);
+ }
+#else
+ /* Just remove the old path (which is what happens with UNIXCONN) */
+#endif
+
+ unlink(server_path);
+
+ if( (fd=open(DEV_PTMX, O_RDWR)) < 0) {
+ PRMSG(1, "PTSOpenServer: Unable to open %s\n", DEV_PTMX, 0,0 );
+ return(-1);
+ }
+
+ grantpt(fd);
+ unlockpt(fd);
+
+ if( (slave=ptsname(fd)) == NULL) {
+ PRMSG(1, "PTSOpenServer: Unable to get slave device name\n", 0,0,0 );
+ close(fd);
+ return(-1);
+ }
+
+ if( link(slave,server_path) < 0 ) {
+ PRMSG(1, "PTSOpenServer: Unable to link %s to %s\n", slave, server_path,0 );
+ close(fd);
+ return(-1);
+ }
+
+ if( chmod(server_path, 0666) < 0 ) {
+ PRMSG(1, "PTSOpenServer: Unable to chmod %s to 0666\n", server_path,0,0 );
+ close(fd);
+ return(-1);
+ }
+
+ if( (server=open(server_path, O_RDWR)) < 0 ) {
+ PRMSG(1, "PTSOpenServer: Unable to open server device %s\n", server_path,0,0 );
+ close(fd);
+ return(-1);
+ }
+
+ close(server);
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"PTSOpenServer: failed to fill in addr info\n", 0, 0, 0);
+ close(fd);
+ return -1;
+ }
+
+ return fd;
+
+#endif /* !PTSNODENAME */
+}
+
+static int
+TRANS(PTSAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
+
+{
+ int newfd;
+ int in;
+ unsigned char length;
+ char buf[256];
+ struct sockaddr_un *sunaddr;
+
+ PRMSG(2,"PTSAccept(%x->%d)\n",ciptr,ciptr->fd,0);
+
+ if( (in=read(ciptr->fd,&length,1)) <= 0 ){
+ if( !in ) {
+ PRMSG(2,
+ "PTSAccept: Incoming connection closed\n",0,0,0);
+ }
+ else {
+ PRMSG(1,
+ "PTSAccept: Error reading incoming connection. errno=%d \n",
+ errno,0,0);
+ }
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return -1;
+ }
+
+ if( (in=read(ciptr->fd,buf,length)) <= 0 ){
+ if( !in ) {
+ PRMSG(2,
+ "PTSAccept: Incoming connection closed\n",0,0,0);
+ }
+ else {
+ PRMSG(1,
+"PTSAccept: Error reading device name for new connection. errno=%d \n",
+ errno,0,0);
+ }
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return -1;
+ }
+
+ buf[length] = '\0';
+
+ if( (newfd=open(buf,O_RDWR)) < 0 ) {
+ PRMSG(1, "PTSAccept: Failed to open %s\n",buf,0,0);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return -1;
+ }
+
+ write(newfd,"1",1);
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ newciptr->addrlen=ciptr->addrlen;
+ if( (newciptr->addr=(char *)xalloc(newciptr->addrlen)) == NULL ) {
+ PRMSG(1,"PTSAccept: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ close(newfd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ memcpy(newciptr->addr,ciptr->addr,newciptr->addrlen);
+
+ newciptr->peeraddrlen=sizeof(struct sockaddr_un);
+ if( (sunaddr=(struct sockaddr_un *)xalloc(newciptr->peeraddrlen)) == NULL ) {
+ PRMSG(1,"PTSAccept: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ xfree(newciptr->addr);
+ close(newfd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ sunaddr->sun_family=AF_UNIX;
+ strcpy(sunaddr->sun_path,buf);
+#if defined(BSD44SOCKETS)
+ sunaddr->sun_len=strlen(sunaddr->sun_path);
+#endif
+
+ newciptr->peeraddr=(char *)sunaddr;
+
+ *status = 0;
+
+ return newfd;
+}
+
+#endif /* TRANS_SERVER */
+#endif /* LOCAL_TRANS_PTS */
+
+
+#ifdef LOCAL_TRANS_NAMED
+
+/* NAMED */
+
+#ifdef TRANS_CLIENT
+
+static int
+TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, char *port)
+
+{
+#ifdef NAMEDNODENAME
+ int fd;
+ char server_path[64];
+ struct stat filestat;
+# ifndef sun
+ extern int isastream(int);
+# endif
+#endif
+
+ PRMSG(2,"NAMEDOpenClient(%s)\n", port, 0,0 );
+
+#if !defined(NAMEDNODENAME)
+ PRMSG(1,"NAMEDOpenClient: Protocol is not supported by a NAMED connection\n", 0,0,0);
+ return -1;
+#else
+ if ( port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) snprintf(server_path, sizeof(server_path), "%s", port);
+ } else {
+ (void) snprintf(server_path, sizeof(server_path), "%s%s", NAMEDNODENAME, port);
+ }
+ } else {
+ (void) snprintf(server_path, sizeof(server_path), "%s%ld", NAMEDNODENAME, (long)getpid());
+ }
+
+ if ((fd = open(server_path, O_RDWR)) < 0) {
+ PRMSG(1,"NAMEDOpenClient: Cannot open %s for NAMED connection\n", server_path, 0,0 );
+ return -1;
+ }
+
+ if (fstat(fd, &filestat) < 0 ) {
+ PRMSG(1,"NAMEDOpenClient: Cannot stat %s for NAMED connection\n", server_path, 0,0 );
+ (void) close(fd);
+ return -1;
+ }
+
+ if ((filestat.st_mode & S_IFMT) != S_IFIFO) {
+ PRMSG(1,"NAMEDOpenClient: Device %s is not a FIFO\n", server_path, 0,0 );
+ /* Is this really a failure? */
+ (void) close(fd);
+ return -1;
+ }
+
+
+ if (isastream(fd) <= 0) {
+ PRMSG(1,"NAMEDOpenClient: %s is not a streams device\n", server_path, 0,0 );
+ (void) close(fd);
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"NAMEDOpenClient: failed to fill in addr info\n",
+ 0,0,0);
+ close(fd);
+ return -1;
+ }
+
+ return(fd);
+
+#endif /* !NAMEDNODENAME */
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+
+#ifdef NAMEDNODENAME
+static int
+TRANS(NAMEDOpenPipe)(const char *server_path)
+{
+ PRMSG(2,"NAMEDOpenPipe(%s)\n", server_path, 0,0 );
+
+ int fd, pipefd[2];
+ struct stat sbuf;
+ int mode;
+
+#if defined(sun) && defined(X11_t)
+ mode = 0775; /* Solaris requires uid or gid 0 to create X11 pipes */
+#else
+#ifdef HAS_STICKY_DIR_BIT
+ mode = 01777;
+#else
+ mode = 0777;
+#endif
+#endif
+ if (trans_mkdir(X_STREAMS_DIR, mode) == -1) {
+ PRMSG (1, "NAMEDOpenPipe: mkdir(%s) failed, errno = %d\n",
+ X_STREAMS_DIR, errno, 0);
+ return(-1);
+ }
+
+ if(stat(server_path, &sbuf) != 0) {
+ if (errno == ENOENT) {
+ if ((fd = creat(server_path, (mode_t)0666)) == -1) {
+ PRMSG(1, "NAMEDOpenPipe: Can't open %s\n", server_path, 0,0 );
+ return(-1);
+ }
+ close(fd);
+ if (chmod(server_path, (mode_t)0666) < 0) {
+ PRMSG(1, "NAMEDOpenPipe: Can't open %s\n", server_path, 0,0 );
+ return(-1);
+ }
+ } else {
+ PRMSG(1, "NAMEDOpenPipe: stat on %s failed\n", server_path, 0,0 );
+ return(-1);
+ }
+ }
+
+ if( pipe(pipefd) != 0) {
+ PRMSG(1, "NAMEDOpenPipe: pipe() failed, errno=%d\n",errno, 0,0 );
+ return(-1);
+ }
+
+ if( ioctl(pipefd[0], I_PUSH, "connld") != 0) {
+ PRMSG(1, "NAMEDOpenPipe: ioctl(I_PUSH,\"connld\") failed, errno=%d\n",errno, 0,0 );
+ close(pipefd[0]);
+ close(pipefd[1]);
+ return(-1);
+ }
+
+ if( fattach(pipefd[0], server_path) != 0) {
+ PRMSG(1, "NAMEDOpenPipe: fattach(%s) failed, errno=%d\n", server_path,errno, 0 );
+ close(pipefd[0]);
+ close(pipefd[1]);
+ return(-1);
+ }
+
+ return(pipefd[1]);
+}
+#endif
+
+static int
+TRANS(NAMEDOpenServer)(XtransConnInfo ciptr, char *port)
+{
+#ifdef NAMEDNODENAME
+ int fd;
+ char server_path[64];
+#endif
+
+ PRMSG(2,"NAMEDOpenServer(%s)\n", port, 0,0 );
+
+#if !defined(NAMEDNODENAME)
+ PRMSG(1,"NAMEDOpenServer: Protocol is not supported by a NAMED connection\n", 0,0,0);
+ return -1;
+#else
+ if ( port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) snprintf(server_path, sizeof(server_path), "%s", port);
+ } else {
+ (void) snprintf(server_path, sizeof(server_path), "%s%s",
+ NAMEDNODENAME, port);
+ }
+ } else {
+ (void) snprintf(server_path, sizeof(server_path), "%s%ld",
+ NAMEDNODENAME, (long)getpid());
+ }
+
+ fd = TRANS(NAMEDOpenPipe)(server_path);
+ if (fd < 0) {
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"NAMEDOpenServer: failed to fill in addr info\n", 0,0,0);
+ TRANS(LocalClose)(ciptr);
+ return -1;
+ }
+
+ return fd;
+
+#endif /* !NAMEDNODENAME */
+}
+
+static int
+TRANS(NAMEDResetListener) (XtransConnInfo ciptr)
+
+{
+ int status = TRANS_RESET_NOOP;
+ struct sockaddr_un *sockname=(struct sockaddr_un *) ciptr->addr;
+ struct stat statb;
+
+ PRMSG(2,"NAMEDResetListener(%p, %d)\n", ciptr, ciptr->fd, 0 );
+
+ if (ciptr->fd != -1) {
+ /*
+ * see if the pipe has disappeared
+ */
+
+ if (stat (sockname->sun_path, &statb) == -1 ||
+ (statb.st_mode & S_IFMT) != S_IFIFO) {
+ PRMSG(3, "Pipe %s trashed, recreating\n", sockname->sun_path, 0, 0);
+ TRANS(LocalClose)(ciptr);
+ ciptr->fd = TRANS(NAMEDOpenPipe)(sockname->sun_path);
+ if (ciptr->fd >= 0)
+ return TRANS_RESET_NEW_FD;
+ else
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+ }
+ return TRANS_RESET_NOOP;
+}
+
+static int
+TRANS(NAMEDAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
+
+{
+ struct strrecvfd str;
+
+ PRMSG(2,"NAMEDAccept(%x->%d)\n", ciptr, ciptr->fd, 0 );
+
+ if( ioctl(ciptr->fd, I_RECVFD, &str ) < 0 ) {
+ PRMSG(1, "NAMEDAccept: ioctl(I_RECVFD) failed, errno=%d\n", errno, 0,0 );
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return(-1);
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+ newciptr->family=ciptr->family;
+ newciptr->addrlen=ciptr->addrlen;
+ if( (newciptr->addr=(char *)xalloc(newciptr->addrlen)) == NULL ) {
+ PRMSG(1,
+ "NAMEDAccept: failed to allocate memory for pipe addr\n",
+ 0,0,0);
+ close(str.fd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ memcpy(newciptr->addr,ciptr->addr,newciptr->addrlen);
+
+ newciptr->peeraddrlen=newciptr->addrlen;
+ if( (newciptr->peeraddr=(char *)xalloc(newciptr->peeraddrlen)) == NULL ) {
+ PRMSG(1,
+ "NAMEDAccept: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ xfree(newciptr->addr);
+ close(str.fd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ memcpy(newciptr->peeraddr,newciptr->addr,newciptr->peeraddrlen);
+
+ *status = 0;
+
+ return str.fd;
+}
+
+#endif /* TRANS_SERVER */
+
+#endif /* LOCAL_TRANS_NAMED */
+
+
+
+#if defined(LOCAL_TRANS_SCO)
+
+/*
+ * connect_spipe is used by the SCO and ISC connection types.
+ */
+static int
+connect_spipe(int fd1, int fd2)
+{
+ long temp;
+ struct strfdinsert sbuf;
+
+ sbuf.databuf.maxlen = -1;
+ sbuf.databuf.len = -1;
+ sbuf.databuf.buf = NULL;
+ sbuf.ctlbuf.maxlen = sizeof(long);
+ sbuf.ctlbuf.len = sizeof(long);
+ sbuf.ctlbuf.buf = (caddr_t)&temp;
+ sbuf.offset = 0;
+ sbuf.fildes = fd2;
+ sbuf.flags = 0;
+
+ if( ioctl(fd1, I_FDINSERT, &sbuf) < 0 )
+ return(-1);
+
+ return(0);
+}
+
+/*
+ * named_spipe is used by the SCO and ISC connection types.
+ */
+
+static int
+named_spipe(int fd, char *path)
+
+{
+ int oldUmask, ret;
+ struct stat sbuf;
+
+ oldUmask = umask(0);
+
+ (void) fstat(fd, &sbuf);
+ ret = mknod(path, 0020666, sbuf.st_rdev);
+
+ umask(oldUmask);
+
+ if (ret < 0) {
+ ret = -1;
+ } else {
+ ret = fd;
+ }
+
+ return(ret);
+}
+
+#endif /* defined(LOCAL_TRANS_SCO) */
+
+
+
+
+#ifdef LOCAL_TRANS_SCO
+/* SCO */
+
+/*
+ * 2002-11-09 (jkj@sco.com)
+ *
+ * This code has been modified to match what is in the actual SCO X server.
+ * This greatly helps inter-operability between X11R6 and X11R5 (the native
+ * SCO server). Mainly, it relies on streams nodes existing in /dev, not
+ * creating them or unlinking them, which breaks the native X server.
+ *
+ * However, this is only for the X protocol. For all other protocols, we
+ * do in fact create the nodes, as only X11R6 will use them, and this makes
+ * it possible to have both types of clients running, otherwise we get all
+ * kinds of nasty errors on startup for anything that doesnt use the X
+ * protocol (like SM, when KDE starts up).
+ */
+
+#ifdef TRANS_CLIENT
+
+static int
+TRANS(SCOOpenClient)(XtransConnInfo ciptr, char *port)
+{
+#ifdef SCORNODENAME
+ int fd, server, fl, ret;
+ char server_path[64];
+ struct strbuf ctlbuf;
+ unsigned long alarm_time;
+ void (*savef)();
+ long temp;
+ extern int getmsg(), putmsg();
+#endif
+
+ PRMSG(2,"SCOOpenClient(%s)\n", port, 0,0 );
+ if (!port || !port[0])
+ port = "0";
+
+#if !defined(SCORNODENAME)
+ PRMSG(2,"SCOOpenClient: Protocol is not supported by a SCO connection\n", 0,0,0);
+ return -1;
+#else
+ (void) sprintf(server_path, SCORNODENAME, port);
+
+ if ((server = open(server_path, O_RDWR)) < 0) {
+ PRMSG(1,"SCOOpenClient: failed to open %s\n", server_path, 0,0 );
+ return -1;
+ }
+
+ if ((fd = open(DEV_SPX, O_RDWR)) < 0) {
+ PRMSG(1,"SCOOpenClient: failed to open %s\n", DEV_SPX, 0,0 );
+ close(server);
+ return -1;
+ }
+
+ (void) write(server, &server, 1);
+ ctlbuf.len = 0;
+ ctlbuf.maxlen = sizeof(long);
+ ctlbuf.buf = (caddr_t)&temp;
+ fl = 0;
+
+ savef = signal(SIGALRM, _dummy);
+ alarm_time = alarm(10);
+
+ ret = getmsg(server, &ctlbuf, 0, &fl);
+
+ (void) alarm(alarm_time);
+ (void) signal(SIGALRM, savef);
+
+ if (ret < 0) {
+ PRMSG(1,"SCOOpenClient: error from getmsg\n", 0,0,0 );
+ close(fd);
+ close(server);
+ return -1;
+ }
+
+ /* The msg we got via getmsg is the result of an
+ * I_FDINSERT, so if we do a putmsg with whatever
+ * we recieved, we're doing another I_FDINSERT ...
+ */
+ (void) putmsg(fd, &ctlbuf, 0, 0);
+ (void) fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0)|O_NDELAY);
+
+ (void) close(server);
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+#if defined(X11_t) && defined(__SCO__)
+ ciptr->flags |= TRANS_NOUNLINK;
+#endif
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"SCOOpenClient: failed to fill addr info\n", 0, 0, 0);
+ close(fd);
+ return -1;
+ }
+
+ return(fd);
+
+#endif /* !SCORNODENAME */
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static int
+TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port)
+{
+#ifdef SCORNODENAME
+ char serverR_path[64];
+ char serverS_path[64];
+ struct flock mylock;
+ int fdr = -1;
+ int fds = -1;
+#endif
+
+ PRMSG(2,"SCOOpenServer(%s)\n", port, 0,0 );
+ if (!port || !port[0])
+ port = "0";
+
+#if !defined(SCORNODENAME)
+ PRMSG(1,"SCOOpenServer: Protocol is not supported by a SCO connection\n", 0,0,0);
+ return -1;
+#else
+ (void) sprintf(serverR_path, SCORNODENAME, port);
+ (void) sprintf(serverS_path, SCOSNODENAME, port);
+
+#if !defined(X11_t) || !defined(__SCO__)
+ unlink(serverR_path);
+ unlink(serverS_path);
+
+ if ((fds = open(DEV_SPX, O_RDWR)) < 0 ||
+ (fdr = open(DEV_SPX, O_RDWR)) < 0 ) {
+ PRMSG(1,"SCOOpenServer: failed to open %s\n", DEV_SPX, 0,0 );
+ return -1;
+ }
+
+ if (named_spipe (fds, serverS_path) == -1) {
+ PRMSG(1,"SCOOpenServer: failed to create %s\n", serverS_path, 0, 0);
+ close (fdr);
+ close (fds);
+ return -1;
+ }
+
+ if (named_spipe (fdr, serverR_path) == -1) {
+ PRMSG(1,"SCOOpenServer: failed to create %s\n", serverR_path, 0, 0);
+ close (fdr);
+ close (fds);
+ return -1;
+ }
+#else /* X11_t */
+
+ fds = open (serverS_path, O_RDWR | O_NDELAY);
+ if (fds < 0) {
+ PRMSG(1,"SCOOpenServer: failed to open %s\n", serverS_path, 0, 0);
+ return -1;
+ }
+
+ /*
+ * Lock the connection device for the duration of the server.
+ * This resolves multiple server starts especially on SMP machines.
+ */
+ mylock.l_type = F_WRLCK;
+ mylock.l_whence = 0;
+ mylock.l_start = 0;
+ mylock.l_len = 0;
+ if (fcntl (fds, F_SETLK, &mylock) < 0) {
+ PRMSG(1,"SCOOpenServer: failed to lock %s\n", serverS_path, 0, 0);
+ close (fds);
+ return -1;
+ }
+
+ fdr = open (serverR_path, O_RDWR | O_NDELAY);
+ if (fds < 0) {
+ PRMSG(1,"SCOOpenServer: failed to open %s\n", serverR_path, 0, 0);
+ close (fds);
+ return -1;
+ }
+#endif /* X11_t */
+
+ if (connect_spipe(fds, fdr)) {
+ PRMSG(1,"SCOOpenServer: ioctl(I_FDINSERT) failed on %s\n",
+ serverS_path, 0, 0);
+ close (fdr);
+ close (fds);
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+#if defined(X11_t) && defined(__SCO__)
+ ciptr->flags |= TRANS_NOUNLINK;
+#endif
+ if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0) {
+ PRMSG(1,"SCOOpenServer: failed to fill in addr info\n", 0,0,0);
+ close(fds);
+ close(fdr);
+ return -1;
+ }
+
+ return(fds);
+
+#endif /* !SCORNODENAME */
+}
+
+static int
+TRANS(SCOAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
+{
+ char c;
+ int fd;
+
+ PRMSG(2,"SCOAccept(%d)\n", ciptr->fd, 0,0 );
+
+ if (read(ciptr->fd, &c, 1) < 0) {
+ PRMSG(1,"SCOAccept: can't read from client\n",0,0,0);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return(-1);
+ }
+
+ if( (fd = open(DEV_SPX, O_RDWR)) < 0 ) {
+ PRMSG(1,"SCOAccept: can't open \"%s\"\n",DEV_SPX, 0,0 );
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return(-1);
+ }
+
+ if (connect_spipe (ciptr->fd, fd) < 0) {
+ PRMSG(1,"SCOAccept: ioctl(I_FDINSERT) failed\n", 0, 0, 0);
+ close (fd);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ newciptr->addrlen=ciptr->addrlen;
+ if( (newciptr->addr=(char *)xalloc(newciptr->addrlen)) == NULL ) {
+ PRMSG(1,
+ "SCOAccept: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ close(fd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ memcpy(newciptr->addr,ciptr->addr,newciptr->addrlen);
+#if defined(__SCO__)
+ newciptr->flags |= TRANS_NOUNLINK;
+#endif
+
+ newciptr->peeraddrlen=newciptr->addrlen;
+ if( (newciptr->peeraddr=(char *)xalloc(newciptr->peeraddrlen)) == NULL ) {
+ PRMSG(1,
+ "SCOAccept: failed to allocate memory for peer addr\n",
+ 0,0,0);
+ xfree(newciptr->addr);
+ close(fd);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return -1;
+ }
+
+ memcpy(newciptr->peeraddr,newciptr->addr,newciptr->peeraddrlen);
+
+ *status = 0;
+
+ return(fd);
+}
+
+#endif /* TRANS_SERVER */
+#endif /* LOCAL_TRANS_SCO */
+
+
+
+#ifdef TRANS_REOPEN
+#ifdef LOCAL_TRANS_PTS
+
+static int
+TRANS(PTSReopenServer)(XtransConnInfo ciptr, int fd, char *port)
+
+{
+#ifdef PTSNODENAME
+ char server_path[64];
+#endif
+
+ PRMSG(2,"PTSReopenServer(%d,%s)\n", fd, port, 0 );
+
+#if !defined(PTSNODENAME)
+ PRMSG(1,"PTSReopenServer: Protocol is not supported by a pts connection\n", 0,0,0);
+ return 0;
+#else
+ if (port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) sprintf(server_path, "%s", port);
+ } else {
+ (void) sprintf(server_path, "%s%s", PTSNODENAME, port);
+ }
+ } else {
+ (void) sprintf(server_path, "%s%ld", PTSNODENAME, (long)getpid());
+ }
+
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"PTSReopenServer: failed to fill in addr info\n",
+ 0,0,0);
+ return 0;
+ }
+
+ return 1;
+
+#endif /* !PTSNODENAME */
+}
+
+#endif /* LOCAL_TRANS_PTS */
+
+#ifdef LOCAL_TRANS_NAMED
+
+static int
+TRANS(NAMEDReopenServer)(XtransConnInfo ciptr, int fd, char *port)
+
+{
+#ifdef NAMEDNODENAME
+ char server_path[64];
+#endif
+
+ PRMSG(2,"NAMEDReopenServer(%s)\n", port, 0,0 );
+
+#if !defined(NAMEDNODENAME)
+ PRMSG(1,"NAMEDReopenServer: Protocol is not supported by a NAMED connection\n", 0,0,0);
+ return 0;
+#else
+ if ( port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) sprintf(server_path, "%s", port);
+ } else {
+ (void) sprintf(server_path, "%s%s", NAMEDNODENAME, port);
+ }
+ } else {
+ (void) sprintf(server_path, "%s%ld", NAMEDNODENAME, (long)getpid());
+ }
+
+ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0)
+ {
+ PRMSG(1,"NAMEDReopenServer: failed to fill in addr info\n",
+ 0,0,0);
+ return 0;
+ }
+
+ return 1;
+
+#endif /* !NAMEDNODENAME */
+}
+
+#endif /* LOCAL_TRANS_NAMED */
+
+
+#ifdef LOCAL_TRANS_SCO
+static int
+TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, char *port)
+
+{
+#ifdef SCORNODENAME
+ char serverR_path[64], serverS_path[64];
+#endif
+
+ PRMSG(2,"SCOReopenServer(%s)\n", port, 0,0 );
+ if (!port || !port[0])
+ port = "0";
+
+#if !defined(SCORNODENAME)
+ PRMSG(2,"SCOReopenServer: Protocol is not supported by a SCO connection\n", 0,0,0);
+ return 0;
+#else
+ (void) sprintf(serverR_path, SCORNODENAME, port);
+ (void) sprintf(serverS_path, SCOSNODENAME, port);
+
+#if defined(X11_t) && defined(__SCO__)
+ ciptr->flags |= TRANS_NOUNLINK;
+#endif
+ if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0)
+ {
+ PRMSG(1, "SCOReopenServer: failed to fill in addr info\n", 0,0,0);
+ return 0;
+ }
+
+ return 1;
+
+#endif /* SCORNODENAME */
+}
+
+#endif /* LOCAL_TRANS_SCO */
+
+#endif /* TRANS_REOPEN */
+
+
+
+/*
+ * This table contains all of the entry points for the different local
+ * connection mechanisms.
+ */
+
+typedef struct _LOCALtrans2dev {
+ char *transname;
+
+#ifdef TRANS_CLIENT
+
+ int (*devcotsopenclient)(
+ XtransConnInfo, char * /*port*/
+);
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+
+ int (*devcotsopenserver)(
+ XtransConnInfo, char * /*port*/
+);
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_CLIENT
+
+ int (*devcltsopenclient)(
+ XtransConnInfo, char * /*port*/
+);
+
+#endif /* TRANS_CLIENT */
+
+#ifdef TRANS_SERVER
+
+ int (*devcltsopenserver)(
+ XtransConnInfo, char * /*port*/
+);
+
+#endif /* TRANS_SERVER */
+
+#ifdef TRANS_REOPEN
+
+ int (*devcotsreopenserver)(
+ XtransConnInfo,
+ int, /* fd */
+ char * /* port */
+);
+
+ int (*devcltsreopenserver)(
+ XtransConnInfo,
+ int, /* fd */
+ char * /* port */
+);
+
+#endif /* TRANS_REOPEN */
+
+#ifdef TRANS_SERVER
+
+ int (*devreset)(
+ XtransConnInfo /* ciptr */
+);
+
+ int (*devaccept)(
+ XtransConnInfo, XtransConnInfo, int *
+);
+
+#endif /* TRANS_SERVER */
+
+} LOCALtrans2dev;
+
+static LOCALtrans2dev LOCALtrans2devtab[] = {
+#ifdef LOCAL_TRANS_PTS
+{"",
+#ifdef TRANS_CLIENT
+ TRANS(PTSOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(PTSOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(PTSReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ NULL, /* ResetListener */
+ TRANS(PTSAccept)
+#endif /* TRANS_SERVER */
+},
+
+{"local",
+#ifdef TRANS_CLIENT
+ TRANS(PTSOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(PTSOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(PTSReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ NULL, /* ResetListener */
+ TRANS(PTSAccept)
+#endif /* TRANS_SERVER */
+},
+
+{"pts",
+#ifdef TRANS_CLIENT
+ TRANS(PTSOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(PTSOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(PTSReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ NULL, /* ResetListener */
+ TRANS(PTSAccept)
+#endif /* TRANS_SERVER */
+},
+#else /* !LOCAL_TRANS_PTS */
+{"",
+#ifdef TRANS_CLIENT
+ TRANS(NAMEDOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(NAMEDOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(NAMEDReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ TRANS(NAMEDResetListener),
+ TRANS(NAMEDAccept)
+#endif /* TRANS_SERVER */
+},
+
+{"local",
+#ifdef TRANS_CLIENT
+ TRANS(NAMEDOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(NAMEDOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(NAMEDReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ TRANS(NAMEDResetListener),
+ TRANS(NAMEDAccept)
+#endif /* TRANS_SERVER */
+},
+#endif /* !LOCAL_TRANS_PTS */
+
+#ifdef LOCAL_TRANS_NAMED
+{"named",
+#ifdef TRANS_CLIENT
+ TRANS(NAMEDOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(NAMEDOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(NAMEDReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ TRANS(NAMEDResetListener),
+ TRANS(NAMEDAccept)
+#endif /* TRANS_SERVER */
+},
+
+#ifdef sun /* Alias "pipe" to named, since that's what Solaris called it */
+{"pipe",
+#ifdef TRANS_CLIENT
+ TRANS(NAMEDOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(NAMEDOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(NAMEDReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ TRANS(NAMEDResetListener),
+ TRANS(NAMEDAccept)
+#endif /* TRANS_SERVER */
+},
+#endif /* sun */
+#endif /* LOCAL_TRANS_NAMED */
+
+
+#ifdef LOCAL_TRANS_SCO
+{"sco",
+#ifdef TRANS_CLIENT
+ TRANS(SCOOpenClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SCOOpenServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(OpenFail),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(OpenFail),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SCOReopenServer),
+ TRANS(ReopenFail),
+#endif
+#ifdef TRANS_SERVER
+ NULL, /* ResetListener */
+ TRANS(SCOAccept)
+#endif /* TRANS_SERVER */
+},
+#endif /* LOCAL_TRANS_SCO */
+};
+
+#define NUMTRANSPORTS (sizeof(LOCALtrans2devtab)/sizeof(LOCALtrans2dev))
+
+static char *XLOCAL=NULL;
+static char *workingXLOCAL=NULL;
+static char *freeXLOCAL=NULL;
+
+#if defined(__SCO__)
+#define DEF_XLOCAL "SCO:UNIX:PTS"
+#elif defined(__UNIXWARE__)
+#define DEF_XLOCAL "UNIX:PTS:NAMED:SCO"
+#elif defined(sun)
+#define DEF_XLOCAL "UNIX:NAMED"
+#else
+#define DEF_XLOCAL "UNIX:PTS:NAMED:ISC:SCO"
+#endif
+
+static void
+TRANS(LocalInitTransports)(char *protocol)
+
+{
+ PRMSG(3,"LocalInitTransports(%s)\n", protocol, 0,0 );
+
+ if( strcmp(protocol,"local") && strcmp(protocol,"LOCAL") )
+ {
+ workingXLOCAL=freeXLOCAL=(char *)xalloc (strlen (protocol) + 1);
+ if (workingXLOCAL)
+ strcpy (workingXLOCAL, protocol);
+ }
+ else {
+ XLOCAL=(char *)getenv("XLOCAL");
+ if(XLOCAL==NULL)
+ XLOCAL=DEF_XLOCAL;
+ workingXLOCAL=freeXLOCAL=(char *)xalloc (strlen (XLOCAL) + 1);
+ if (workingXLOCAL)
+ strcpy (workingXLOCAL, XLOCAL);
+ }
+}
+
+static void
+TRANS(LocalEndTransports)(void)
+
+{
+ PRMSG(3,"LocalEndTransports()\n", 0,0,0 );
+ xfree(freeXLOCAL);
+}
+
+#define TYPEBUFSIZE 32
+
+#ifdef TRANS_CLIENT
+
+static LOCALtrans2dev *
+TRANS(LocalGetNextTransport)(void)
+
+{
+ int i,j;
+ char *typetocheck;
+ char typebuf[TYPEBUFSIZE];
+ PRMSG(3,"LocalGetNextTransport()\n", 0,0,0 );
+
+ while(1)
+ {
+ if( workingXLOCAL == NULL || *workingXLOCAL == '\0' )
+ return NULL;
+
+ typetocheck=workingXLOCAL;
+ workingXLOCAL=strchr(workingXLOCAL,':');
+ if(workingXLOCAL && *workingXLOCAL)
+ *workingXLOCAL++='\0';
+
+ for(i=0;i<NUMTRANSPORTS;i++)
+ {
+ /*
+ * This is equivalent to a case insensitive strcmp(),
+ * but should be more portable.
+ */
+ strncpy(typebuf,typetocheck,TYPEBUFSIZE);
+ for(j=0;j<TYPEBUFSIZE;j++)
+ if (isupper(typebuf[j]))
+ typebuf[j]=tolower(typebuf[j]);
+
+ /* Now, see if they match */
+ if(!strcmp(LOCALtrans2devtab[i].transname,typebuf))
+ return &LOCALtrans2devtab[i];
+ }
+ }
+#if 0
+ /*NOTREACHED*/
+ return NULL;
+#endif
+}
+
+#ifdef NEED_UTSNAME
+#include <sys/utsname.h>
+#endif
+
+/*
+ * Make sure 'host' is really local.
+ */
+
+static int
+HostReallyLocal (char *host)
+
+{
+ /*
+ * The 'host' passed to this function may have been generated
+ * by either uname() or gethostname(). We try both if possible.
+ */
+
+#ifdef NEED_UTSNAME
+ struct utsname name;
+#endif
+ char buf[256];
+
+#ifdef NEED_UTSNAME
+ if (uname (&name) >= 0 && strcmp (host, name.nodename) == 0)
+ return (1);
+#endif
+
+ buf[0] = '\0';
+ (void) gethostname (buf, 256);
+ buf[255] = '\0';
+
+ if (strcmp (host, buf) == 0)
+ return (1);
+
+ return (0);
+}
+
+
+static XtransConnInfo
+TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port)
+
+{
+ LOCALtrans2dev *transptr;
+ XtransConnInfo ciptr;
+ int index;
+
+ PRMSG(3,"LocalOpenClient()\n", 0,0,0 );
+
+ /*
+ * Make sure 'host' is really local. If not, we return failure.
+ * The reason we make this check is because a process may advertise
+ * a "local" address for which it can accept connections, but if a
+ * process on a remote machine tries to connect to this address,
+ * we know for sure it will fail.
+ */
+
+ if (strcmp (host, "unix") != 0 && !HostReallyLocal (host))
+ {
+ PRMSG (1,
+ "LocalOpenClient: Cannot connect to non-local host %s\n",
+ host, 0, 0);
+ return NULL;
+ }
+
+
+#if defined(X11_t)
+ /*
+ * X has a well known port, that is transport dependant. It is easier
+ * to handle it here, than try and come up with a transport independent
+ * representation that can be passed in and resolved the usual way.
+ *
+ * The port that is passed here is really a string containing the idisplay
+ * from ConnectDisplay(). Since that is what we want for the local transports,
+ * we don't have to do anything special.
+ */
+#endif /* X11_t */
+
+ if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ {
+ PRMSG(1,"LocalOpenClient: calloc(1,%d) failed\n",
+ sizeof(struct _XtransConnInfo),0,0 );
+ return NULL;
+ }
+
+ ciptr->fd = -1;
+
+ TRANS(LocalInitTransports)(protocol);
+
+ index = 0;
+ for(transptr=TRANS(LocalGetNextTransport)();
+ transptr!=NULL;transptr=TRANS(LocalGetNextTransport)(), index++)
+ {
+ switch( type )
+ {
+ case XTRANS_OPEN_COTS_CLIENT:
+ ciptr->fd=transptr->devcotsopenclient(ciptr,port);
+ break;
+ case XTRANS_OPEN_CLTS_CLIENT:
+ ciptr->fd=transptr->devcltsopenclient(ciptr,port);
+ break;
+ case XTRANS_OPEN_COTS_SERVER:
+ case XTRANS_OPEN_CLTS_SERVER:
+ PRMSG(1,
+ "LocalOpenClient: Should not be opening a server with this function\n",
+ 0,0,0);
+ break;
+ default:
+ PRMSG(1,
+ "LocalOpenClient: Unknown Open type %d\n",
+ type, 0,0 );
+ }
+ if( ciptr->fd >= 0 )
+ break;
+ }
+
+ TRANS(LocalEndTransports)();
+
+ if( ciptr->fd < 0 )
+ {
+ xfree(ciptr);
+ return NULL;
+ }
+
+ ciptr->priv=(char *)transptr;
+ ciptr->index = index;
+
+ return ciptr;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(LocalOpenServer)(int type, char *protocol, char *host, char *port)
+
+{
+ int i;
+ XtransConnInfo ciptr;
+
+ PRMSG(2,"LocalOpenServer(%d,%s,%s)\n", type, protocol, port);
+
+#if defined(X11_t)
+ /*
+ * For X11, the port will be in the format xserverN where N is the
+ * display number. All of the local connections just need to know
+ * the display number because they don't do any name resolution on
+ * the port. This just truncates port to the display portion.
+ */
+#endif /* X11_t */
+
+ if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ {
+ PRMSG(1,"LocalOpenServer: calloc(1,%d) failed\n",
+ sizeof(struct _XtransConnInfo),0,0 );
+ return NULL;
+ }
+
+ for(i=1;i<NUMTRANSPORTS;i++)
+ {
+ if( strcmp(protocol,LOCALtrans2devtab[i].transname) != 0 )
+ continue;
+ switch( type )
+ {
+ case XTRANS_OPEN_COTS_CLIENT:
+ case XTRANS_OPEN_CLTS_CLIENT:
+ PRMSG(1,
+ "LocalOpenServer: Should not be opening a client with this function\n",
+ 0,0,0);
+ break;
+ case XTRANS_OPEN_COTS_SERVER:
+ ciptr->fd=LOCALtrans2devtab[i].devcotsopenserver(ciptr,port);
+ break;
+ case XTRANS_OPEN_CLTS_SERVER:
+ ciptr->fd=LOCALtrans2devtab[i].devcltsopenserver(ciptr,port);
+ break;
+ default:
+ PRMSG(1,"LocalOpenServer: Unknown Open type %d\n",
+ type ,0,0);
+ }
+ if( ciptr->fd >= 0 ) {
+ ciptr->priv=(char *)&LOCALtrans2devtab[i];
+ ciptr->index=i;
+ ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS);
+ return ciptr;
+ }
+ }
+
+ xfree(ciptr);
+ return NULL;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(LocalReopenServer)(int type, int index, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int stat = 0;
+
+ PRMSG(2,"LocalReopenServer(%d,%d,%d)\n", type, index, fd);
+
+ if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ {
+ PRMSG(1,"LocalReopenServer: calloc(1,%d) failed\n",
+ sizeof(struct _XtransConnInfo),0,0 );
+ return NULL;
+ }
+
+ ciptr->fd = fd;
+
+ switch( type )
+ {
+ case XTRANS_OPEN_COTS_SERVER:
+ stat = LOCALtrans2devtab[index].devcotsreopenserver(ciptr,fd,port);
+ break;
+ case XTRANS_OPEN_CLTS_SERVER:
+ stat = LOCALtrans2devtab[index].devcltsreopenserver(ciptr,fd,port);
+ break;
+ default:
+ PRMSG(1,"LocalReopenServer: Unknown Open type %d\n",
+ type ,0,0);
+ }
+
+ if( stat > 0 ) {
+ ciptr->priv=(char *)&LOCALtrans2devtab[index];
+ ciptr->index=index;
+ ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS);
+ return ciptr;
+ }
+
+ xfree(ciptr);
+ return NULL;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+
+/*
+ * This is the Local implementation of the X Transport service layer
+ */
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(LocalOpenCOTSClient)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ PRMSG(2,"LocalOpenCOTSClient(%s,%s,%s)\n",protocol,host,port);
+
+ return TRANS(LocalOpenClient)(XTRANS_OPEN_COTS_CLIENT, protocol, host, port);
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ char *typetocheck = NULL;
+ int found = 0;
+ char typebuf[TYPEBUFSIZE];
+
+ PRMSG(2,"LocalOpenCOTSServer(%s,%s,%s)\n",protocol,host,port);
+
+ /* Check if this local type is in the XLOCAL list */
+ TRANS(LocalInitTransports)("local");
+ typetocheck = workingXLOCAL;
+ while (typetocheck && !found) {
+ int j;
+
+ workingXLOCAL = strchr(workingXLOCAL, ':');
+ if (workingXLOCAL && *workingXLOCAL)
+ *workingXLOCAL++ = '\0';
+ strncpy(typebuf, typetocheck, TYPEBUFSIZE);
+ for (j = 0; j < TYPEBUFSIZE; j++)
+ if (isupper(typebuf[j]))
+ typebuf[j] = tolower(typebuf[j]);
+ if (!strcmp(thistrans->TransName, typebuf))
+ found = 1;
+ typetocheck = workingXLOCAL;
+ }
+ TRANS(LocalEndTransports)();
+
+ if (!found) {
+ PRMSG(3,"LocalOpenCOTSServer: disabling %s\n",thistrans->TransName,0,0);
+ thistrans->flags |= TRANS_DISABLED;
+ return NULL;
+ }
+
+ return TRANS(LocalOpenServer)(XTRANS_OPEN_COTS_SERVER, protocol, host, port);
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(LocalOpenCLTSClient)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ PRMSG(2,"LocalOpenCLTSClient(%s,%s,%s)\n",protocol,host,port);
+
+ return TRANS(LocalOpenClient)(XTRANS_OPEN_CLTS_CLIENT, protocol, host, port);
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(LocalOpenCLTSServer)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ PRMSG(2,"LocalOpenCLTSServer(%s,%s,%s)\n",protocol,host,port);
+
+ return TRANS(LocalOpenServer)(XTRANS_OPEN_CLTS_SERVER, protocol, host, port);
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(LocalReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
+
+{
+ int index;
+
+ PRMSG(2,"LocalReopenCOTSServer(%d,%s)\n", fd, port, 0);
+
+ for(index=1;index<NUMTRANSPORTS;index++)
+ {
+ if( strcmp(thistrans->TransName,
+ LOCALtrans2devtab[index].transname) == 0 )
+ break;
+ }
+
+ if (index >= NUMTRANSPORTS)
+ {
+ return (NULL);
+ }
+
+ return TRANS(LocalReopenServer)(XTRANS_OPEN_COTS_SERVER,
+ index, fd, port);
+}
+
+static XtransConnInfo
+TRANS(LocalReopenCLTSServer)(Xtransport *thistrans, int fd, char *port)
+
+{
+ int index;
+
+ PRMSG(2,"LocalReopenCLTSServer(%d,%s)\n", fd, port, 0);
+
+ for(index=1;index<NUMTRANSPORTS;index++)
+ {
+ if( strcmp(thistrans->TransName,
+ LOCALtrans2devtab[index].transname) == 0 )
+ break;
+ }
+
+ if (index >= NUMTRANSPORTS)
+ {
+ return (NULL);
+ }
+
+ return TRANS(LocalReopenServer)(XTRANS_OPEN_CLTS_SERVER,
+ index, fd, port);
+}
+
+#endif /* TRANS_REOPEN */
+
+
+
+static int
+TRANS(LocalSetOption)(XtransConnInfo ciptr, int option, int arg)
+
+{
+ PRMSG(2,"LocalSetOption(%d,%d,%d)\n",ciptr->fd,option,arg);
+
+ return -1;
+}
+
+
+#ifdef TRANS_SERVER
+
+static int
+TRANS(LocalCreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags)
+
+{
+ PRMSG(2,"LocalCreateListener(%x->%d,%s)\n",ciptr,ciptr->fd,port);
+
+ return 0;
+}
+
+static int
+TRANS(LocalResetListener)(XtransConnInfo ciptr)
+
+{
+ LOCALtrans2dev *transptr;
+
+ PRMSG(2,"LocalResetListener(%x)\n",ciptr,0,0);
+
+ transptr=(LOCALtrans2dev *)ciptr->priv;
+ if (transptr->devreset != NULL) {
+ return transptr->devreset(ciptr);
+ }
+ return TRANS_RESET_NOOP;
+}
+
+
+static XtransConnInfo
+TRANS(LocalAccept)(XtransConnInfo ciptr, int *status)
+
+{
+ XtransConnInfo newciptr;
+ LOCALtrans2dev *transptr;
+
+ PRMSG(2,"LocalAccept(%x->%d)\n", ciptr, ciptr->fd,0);
+
+ transptr=(LOCALtrans2dev *)ciptr->priv;
+
+ if( (newciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo)))==NULL )
+ {
+ PRMSG(1,"LocalAccept: calloc(1,%d) failed\n",
+ sizeof(struct _XtransConnInfo),0,0 );
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ newciptr->fd=transptr->devaccept(ciptr,newciptr,status);
+
+ if( newciptr->fd < 0 )
+ {
+ xfree(newciptr);
+ return NULL;
+ }
+
+ newciptr->priv=(char *)transptr;
+ newciptr->index = ciptr->index;
+
+ *status = 0;
+
+ return newciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+static int
+TRANS(LocalConnect)(XtransConnInfo ciptr, char *host, char *port)
+
+{
+ PRMSG(2,"LocalConnect(%x->%d,%s)\n", ciptr, ciptr->fd, port);
+
+ return 0;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+static int
+TRANS(LocalBytesReadable)(XtransConnInfo ciptr, BytesReadable_t *pend )
+
+{
+ PRMSG(2,"LocalBytesReadable(%x->%d,%x)\n", ciptr, ciptr->fd, pend);
+
+#if defined(SCO325)
+ return ioctl(ciptr->fd, I_NREAD, (char *)pend);
+#else
+ return ioctl(ciptr->fd, FIONREAD, (char *)pend);
+#endif
+}
+
+static int
+TRANS(LocalRead)(XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG(2,"LocalRead(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return read(ciptr->fd,buf,size);
+}
+
+static int
+TRANS(LocalWrite)(XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG(2,"LocalWrite(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return write(ciptr->fd,buf,size);
+}
+
+static int
+TRANS(LocalReadv)(XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG(2,"LocalReadv(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return READV(ciptr,buf,size);
+}
+
+static int
+TRANS(LocalWritev)(XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG(2,"LocalWritev(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return WRITEV(ciptr,buf,size);
+}
+
+static int
+TRANS(LocalDisconnect)(XtransConnInfo ciptr)
+
+{
+ PRMSG(2,"LocalDisconnect(%x->%d)\n", ciptr, ciptr->fd, 0);
+
+ return 0;
+}
+
+static int
+TRANS(LocalClose)(XtransConnInfo ciptr)
+
+{
+ struct sockaddr_un *sockname=(struct sockaddr_un *) ciptr->addr;
+ int ret;
+
+ PRMSG(2,"LocalClose(%x->%d)\n", ciptr, ciptr->fd ,0);
+
+ ret=close(ciptr->fd);
+
+ if(ciptr->flags
+ && sockname
+ && sockname->sun_family == AF_UNIX
+ && sockname->sun_path[0] )
+ {
+ if (!(ciptr->flags & TRANS_NOUNLINK))
+ unlink(sockname->sun_path);
+ }
+
+ return ret;
+}
+
+static int
+TRANS(LocalCloseForCloning)(XtransConnInfo ciptr)
+
+{
+ int ret;
+
+ PRMSG(2,"LocalCloseForCloning(%x->%d)\n", ciptr, ciptr->fd ,0);
+
+ /* Don't unlink path */
+
+ ret=close(ciptr->fd);
+
+ return ret;
+}
+
+
+/*
+ * MakeAllCOTSServerListeners() will go through the entire Xtransports[]
+ * array defined in Xtrans.c and try to OpenCOTSServer() for each entry.
+ * We will add duplicate entries to that table so that the OpenCOTSServer()
+ * function will get called once for each type of local transport.
+ *
+ * The TransName is in lowercase, so it will never match during a normal
+ * call to SelectTransport() in Xtrans.c.
+ */
+
+#ifdef TRANS_SERVER
+static char * local_aliases[] = {
+# ifdef LOCAL_TRANS_PTS
+ "pts",
+# endif
+ "named",
+# ifdef sun
+ "pipe", /* compatibility with Solaris Xlib */
+# endif
+# ifdef LOCAL_TRANS_SCO
+ "sco",
+# endif
+ NULL };
+#endif
+
+Xtransport TRANS(LocalFuncs) = {
+ /* Local Interface */
+ "local",
+ TRANS_ALIAS | TRANS_LOCAL,
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ local_aliases,
+ TRANS(LocalOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(LocalOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(LocalReopenCOTSServer),
+ TRANS(LocalReopenCLTSServer),
+#endif
+ TRANS(LocalSetOption),
+#ifdef TRANS_SERVER
+ TRANS(LocalCreateListener),
+ TRANS(LocalResetListener),
+ TRANS(LocalAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(LocalBytesReadable),
+ TRANS(LocalRead),
+ TRANS(LocalWrite),
+ TRANS(LocalReadv),
+ TRANS(LocalWritev),
+ TRANS(LocalDisconnect),
+ TRANS(LocalClose),
+ TRANS(LocalCloseForCloning),
+};
+
+#ifdef LOCAL_TRANS_PTS
+
+Xtransport TRANS(PTSFuncs) = {
+ /* Local Interface */
+ "pts",
+ TRANS_LOCAL,
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(LocalOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(LocalOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(LocalReopenCOTSServer),
+ TRANS(LocalReopenCLTSServer),
+#endif
+ TRANS(LocalSetOption),
+#ifdef TRANS_SERVER
+ TRANS(LocalCreateListener),
+ TRANS(LocalResetListener),
+ TRANS(LocalAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(LocalBytesReadable),
+ TRANS(LocalRead),
+ TRANS(LocalWrite),
+ TRANS(LocalReadv),
+ TRANS(LocalWritev),
+ TRANS(LocalDisconnect),
+ TRANS(LocalClose),
+ TRANS(LocalCloseForCloning),
+};
+
+#endif /* LOCAL_TRANS_PTS */
+
+#ifdef LOCAL_TRANS_NAMED
+
+Xtransport TRANS(NAMEDFuncs) = {
+ /* Local Interface */
+ "named",
+ TRANS_LOCAL,
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(LocalOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(LocalOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(LocalReopenCOTSServer),
+ TRANS(LocalReopenCLTSServer),
+#endif
+ TRANS(LocalSetOption),
+#ifdef TRANS_SERVER
+ TRANS(LocalCreateListener),
+ TRANS(LocalResetListener),
+ TRANS(LocalAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(LocalBytesReadable),
+ TRANS(LocalRead),
+ TRANS(LocalWrite),
+ TRANS(LocalReadv),
+ TRANS(LocalWritev),
+ TRANS(LocalDisconnect),
+ TRANS(LocalClose),
+ TRANS(LocalCloseForCloning),
+};
+
+#ifdef sun
+Xtransport TRANS(PIPEFuncs) = {
+ /* Local Interface */
+ "pipe",
+ TRANS_ALIAS | TRANS_LOCAL,
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(LocalOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(LocalOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(LocalReopenCOTSServer),
+ TRANS(LocalReopenCLTSServer),
+#endif
+ TRANS(LocalSetOption),
+#ifdef TRANS_SERVER
+ TRANS(LocalCreateListener),
+ TRANS(LocalResetListener),
+ TRANS(LocalAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(LocalBytesReadable),
+ TRANS(LocalRead),
+ TRANS(LocalWrite),
+ TRANS(LocalReadv),
+ TRANS(LocalWritev),
+ TRANS(LocalDisconnect),
+ TRANS(LocalClose),
+ TRANS(LocalCloseForCloning),
+};
+#endif /* sun */
+#endif /* LOCAL_TRANS_NAMED */
+
+
+#ifdef LOCAL_TRANS_SCO
+Xtransport TRANS(SCOFuncs) = {
+ /* Local Interface */
+ "sco",
+ TRANS_LOCAL,
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(LocalOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(LocalOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(LocalReopenCOTSServer),
+ TRANS(LocalReopenCLTSServer),
+#endif
+ TRANS(LocalSetOption),
+#ifdef TRANS_SERVER
+ TRANS(LocalCreateListener),
+ TRANS(LocalResetListener),
+ TRANS(LocalAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(LocalConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(LocalBytesReadable),
+ TRANS(LocalRead),
+ TRANS(LocalWrite),
+ TRANS(LocalReadv),
+ TRANS(LocalWritev),
+ TRANS(LocalDisconnect),
+ TRANS(LocalClose),
+ TRANS(LocalCloseForCloning),
+};
+#endif /* LOCAL_TRANS_SCO */
diff --git a/X11/xtrans/Xtranssock.c b/X11/xtrans/Xtranssock.c
new file mode 100644
index 000000000..ad3e11605
--- /dev/null
+++ b/X11/xtrans/Xtranssock.c
@@ -0,0 +1,2511 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the copyright holders shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the copyright holders.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <ctype.h>
+#ifdef XTHREADS
+#include <X11/Xthreads.h>
+#endif
+
+#ifndef WIN32
+
+#if defined(TCPCONN) || defined(UNIXCONN)
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#if defined(TCPCONN) || defined(UNIXCONN)
+#define X_INCLUDE_NETDB_H
+#define XOS_USE_NO_LOCKING
+#include <X11/Xos_r.h>
+#endif
+
+#ifdef UNIXCONN
+#ifndef X_NO_SYS_UN
+#include <sys/un.h>
+#endif
+#include <sys/stat.h>
+#endif
+
+
+#ifndef NO_TCP_H
+#if defined(linux) || defined(__GLIBC__)
+#include <sys/param.h>
+#endif /* osf */
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/param.h>
+#include <machine/endian.h>
+#endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ || __DragonFly__ */
+#include <netinet/tcp.h>
+#endif /* !NO_TCP_H */
+
+#include <sys/ioctl.h>
+#if defined(SVR4)
+#include <sys/filio.h>
+#endif
+
+#if (defined(__i386__) && defined(SYSV)) && !defined(SCO325) && !defined(sun)
+#include <net/errno.h>
+#endif
+
+#if defined(__i386__) && defined(SYSV)
+#include <sys/stropts.h>
+#endif
+
+#include <unistd.h>
+
+#else /* !WIN32 */
+
+#include <X11/Xwinsock.h>
+#include <X11/Xwindows.h>
+#include <X11/Xw32defs.h>
+#undef close
+#define close closesocket
+#define ECONNREFUSED WSAECONNREFUSED
+#define EADDRINUSE WSAEADDRINUSE
+#define EPROTOTYPE WSAEPROTOTYPE
+#undef EWOULDBLOCK
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINPROGRESS WSAEINPROGRESS
+#undef EINTR
+#define EINTR WSAEINTR
+#define X_INCLUDE_NETDB_H
+#define XOS_USE_MTSAFE_NETDBAPI
+#include <X11/Xos_r.h>
+#endif /* WIN32 */
+
+#if defined(SO_DONTLINGER) && defined(SO_LINGER)
+#undef SO_DONTLINGER
+#endif
+
+/* others don't need this */
+#define SocketInitOnce() /**/
+
+#ifdef linux
+#define HAVE_ABSTRACT_SOCKETS
+#endif
+
+#define MIN_BACKLOG 128
+#ifdef SOMAXCONN
+#if SOMAXCONN > MIN_BACKLOG
+#define BACKLOG SOMAXCONN
+#endif
+#endif
+#ifndef BACKLOG
+#define BACKLOG MIN_BACKLOG
+#endif
+
+/*
+ * This is the Socket implementation of the X Transport service layer
+ *
+ * This file contains the implementation for both the UNIX and INET domains,
+ * and can be built for either one, or both.
+ *
+ */
+
+typedef struct _Sockettrans2dev {
+ char *transname;
+ int family;
+ int devcotsname;
+ int devcltsname;
+ int protocol;
+} Sockettrans2dev;
+
+static Sockettrans2dev Sockettrans2devtab[] = {
+#ifdef TCPCONN
+ {"inet",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
+#if !defined(IPv6) || !defined(AF_INET6)
+ {"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
+#else /* IPv6 */
+ {"tcp",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
+ {"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0}, /* fallback */
+ {"inet6",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
+#endif
+#endif /* TCPCONN */
+#ifdef UNIXCONN
+ {"unix",AF_UNIX,SOCK_STREAM,SOCK_DGRAM,0},
+#if !defined(LOCALCONN)
+ {"local",AF_UNIX,SOCK_STREAM,SOCK_DGRAM,0},
+#endif /* !LOCALCONN */
+#endif /* UNIXCONN */
+};
+
+#define NUMSOCKETFAMILIES (sizeof(Sockettrans2devtab)/sizeof(Sockettrans2dev))
+
+#ifdef TCPCONN
+static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
+#endif
+
+#ifdef UNIXCONN
+
+
+#if defined(X11_t)
+#define UNIX_PATH "/tmp/.X11-unix/X"
+#define UNIX_DIR "/tmp/.X11-unix"
+#endif /* X11_t */
+#if defined(XIM_t)
+#define UNIX_PATH "/tmp/.XIM-unix/XIM"
+#define UNIX_DIR "/tmp/.XIM-unix"
+#endif /* XIM_t */
+#if defined(FS_t) || defined(FONT_t)
+#define UNIX_PATH "/tmp/.font-unix/fs"
+#define UNIX_DIR "/tmp/.font-unix"
+#endif /* FS_t || FONT_t */
+#if defined(ICE_t)
+#define UNIX_PATH "/tmp/.ICE-unix/"
+#define UNIX_DIR "/tmp/.ICE-unix"
+#endif /* ICE_t */
+#if defined(TEST_t)
+#define UNIX_PATH "/tmp/.Test-unix/test"
+#define UNIX_DIR "/tmp/.Test-unix"
+#endif
+#if defined(LBXPROXY_t)
+#define UNIX_PATH "/tmp/.X11-unix/X"
+#define UNIX_DIR "/tmp/.X11-unix"
+#endif
+
+
+#endif /* UNIXCONN */
+
+#define PORTBUFSIZE 32
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 255
+#endif
+
+#if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6))
+# define SOCKLEN_T socklen_t
+#elif defined(SVR4) || defined(__SCO__)
+# define SOCKLEN_T size_t
+#else
+# define SOCKLEN_T int
+#endif
+
+/*
+ * This provides compatibility for apps linked against system libraries
+ * that don't have IPv6 support.
+ */
+#if defined(IPv6) && defined(AF_INET6)
+static const struct in6_addr local_in6addr_any = IN6ADDR_ANY_INIT;
+#pragma weak in6addr_any = local_in6addr_any
+#ifndef __USLC__
+#pragma weak getaddrinfo
+#endif
+static int haveIPv6 = 1;
+#endif
+
+/*
+ * These are some utility function used by the real interface function below.
+ */
+
+static int
+TRANS(SocketSelectFamily) (int first, char *family)
+
+{
+ int i;
+
+ PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
+
+ for (i = first + 1; i < NUMSOCKETFAMILIES;i++)
+ {
+ if (!strcmp (family, Sockettrans2devtab[i].transname))
+ return i;
+ }
+
+ return (first == -1 ? -2 : -1);
+}
+
+
+/*
+ * This function gets the local address of the socket and stores it in the
+ * XtransConnInfo structure for the connection.
+ */
+
+static int
+TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
+
+{
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_storage socknamev6;
+#endif
+ struct sockaddr_in socknamev4;
+ void *socknamePtr;
+ SOCKLEN_T namelen;
+
+ PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0);
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (haveIPv6)
+ {
+ namelen = sizeof(socknamev6);
+ socknamePtr = &socknamev6;
+ }
+ else
+#endif
+ {
+ namelen = sizeof(socknamev4);
+ socknamePtr = &socknamev4;
+ }
+
+ bzero(socknamePtr, namelen);
+
+ if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr,
+ (void *)&namelen) < 0)
+ {
+#ifdef WIN32
+ errno = WSAGetLastError();
+#endif
+ PRMSG (1,"SocketINETGetAddr: getsockname() failed: %d\n",
+ EGET(),0, 0);
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if ((ciptr->addr = (char *) xalloc (namelen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketINETGetAddr: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ return -1;
+ }
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (haveIPv6)
+ {
+ ciptr->family = ((struct sockaddr *)socknamePtr)->sa_family;
+ }
+ else
+#endif
+ {
+ ciptr->family = socknamev4.sin_family;
+ }
+ ciptr->addrlen = namelen;
+ memcpy (ciptr->addr, socknamePtr, ciptr->addrlen);
+
+ return 0;
+}
+
+
+/*
+ * This function gets the remote address of the socket and stores it in the
+ * XtransConnInfo structure for the connection.
+ */
+
+static int
+TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr)
+
+{
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_storage socknamev6;
+#endif
+ struct sockaddr_in socknamev4;
+ void *socknamePtr;
+ SOCKLEN_T namelen;
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (haveIPv6 && ciptr->family == AF_INET6)
+ {
+ namelen = sizeof(socknamev6);
+ socknamePtr = &socknamev6;
+ }
+ else
+#endif
+ {
+ namelen = sizeof(socknamev4);
+ socknamePtr = &socknamev4;
+ }
+
+ bzero(socknamePtr, namelen);
+
+ PRMSG (3,"SocketINETGetPeerAddr(%p)\n", ciptr, 0, 0);
+
+ if (getpeername (ciptr->fd, (struct sockaddr *) socknamePtr,
+ (void *)&namelen) < 0)
+ {
+#ifdef WIN32
+ errno = WSAGetLastError();
+#endif
+ PRMSG (1,"SocketINETGetPeerAddr: getpeername() failed: %d\n",
+ EGET(), 0, 0);
+ return -1;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketINETGetPeerAddr: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ return -1;
+ }
+
+ ciptr->peeraddrlen = namelen;
+ memcpy (ciptr->peeraddr, socknamePtr, ciptr->peeraddrlen);
+
+ return 0;
+}
+
+
+static XtransConnInfo
+TRANS(SocketOpen) (int i, int type)
+
+{
+ XtransConnInfo ciptr;
+
+ PRMSG (3,"SocketOpen(%d,%d)\n", i, type, 0);
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (getaddrinfo == NULL)
+ haveIPv6 = 0;
+
+ if (!haveIPv6 && Sockettrans2devtab[i].family == AF_INET6)
+ return NULL;
+#endif
+
+ if ((ciptr = (XtransConnInfo) xcalloc (
+ 1, sizeof(struct _XtransConnInfo))) == NULL)
+ {
+ PRMSG (1, "SocketOpen: malloc failed\n", 0, 0, 0);
+ return NULL;
+ }
+
+ if ((ciptr->fd = socket(Sockettrans2devtab[i].family, type,
+ Sockettrans2devtab[i].protocol)) < 0
+#ifndef WIN32
+#if (defined(X11_t) && !defined(USE_POLL)) || defined(FS_t) || defined(FONT_t)
+ || ciptr->fd >= sysconf(_SC_OPEN_MAX)
+#endif
+#endif
+ ) {
+#ifdef WIN32
+ errno = WSAGetLastError();
+#endif
+ PRMSG (2, "SocketOpen: socket() failed for %s\n",
+ Sockettrans2devtab[i].transname, 0, 0);
+
+ xfree ((char *) ciptr);
+ return NULL;
+ }
+
+#ifdef TCP_NODELAY
+ if (Sockettrans2devtab[i].family == AF_INET
+#if defined(IPv6) && defined(AF_INET6)
+ || Sockettrans2devtab[i].family == AF_INET6
+#endif
+ )
+ {
+ /*
+ * turn off TCP coalescence for INET sockets
+ */
+
+ int tmp = 1;
+ setsockopt (ciptr->fd, IPPROTO_TCP, TCP_NODELAY,
+ (char *) &tmp, sizeof (int));
+ }
+#endif
+
+ return ciptr;
+}
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(SocketReopen) (int i, int type, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int portlen;
+ struct sockaddr *addr;
+
+ PRMSG (3,"SocketReopen(%d,%d,%s)\n", type, fd, port);
+
+ if (port == NULL) {
+ PRMSG (1, "SocketReopen: port was null!\n", 0, 0, 0);
+ return NULL;
+ }
+
+ portlen = strlen(port) + 1; // include space for trailing null
+#ifdef SOCK_MAXADDRLEN
+ if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) {
+ PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
+ return NULL;
+ }
+ if (portlen < 14) portlen = 14;
+#else
+ if (portlen < 0 || portlen > 14) {
+ PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
+ return NULL;
+ }
+#endif /*SOCK_MAXADDRLEN*/
+
+ if ((ciptr = (XtransConnInfo) xcalloc (
+ 1, sizeof(struct _XtransConnInfo))) == NULL)
+ {
+ PRMSG (1, "SocketReopen: malloc(ciptr) failed\n", 0, 0, 0);
+ return NULL;
+ }
+
+ ciptr->fd = fd;
+
+ if ((addr = (struct sockaddr *) xcalloc (1, portlen + 2)) == NULL) {
+ PRMSG (1, "SocketReopen: malloc(addr) failed\n", 0, 0, 0);
+ return NULL;
+ }
+ ciptr->addr = (char *) addr;
+ ciptr->addrlen = portlen + 2;
+
+ if ((ciptr->peeraddr = (char *) xcalloc (1, portlen + 2)) == NULL) {
+ PRMSG (1, "SocketReopen: malloc(portaddr) failed\n", 0, 0, 0);
+ return NULL;
+ }
+ ciptr->peeraddrlen = portlen + 2;
+
+ /* Initialize ciptr structure as if it were a normally-opened unix socket */
+ ciptr->flags = TRANS_LOCAL | TRANS_NOUNLINK;
+#ifdef BSD44SOCKETS
+ addr->sa_len = portlen + 1;
+#endif
+ addr->sa_family = AF_UNIX;
+#ifdef HAS_STRLCPY
+ strlcpy(addr->sa_data, port, portlen);
+#else
+ strncpy(addr->sa_data, port, portlen);
+#endif
+ ciptr->family = AF_UNIX;
+ memcpy(ciptr->peeraddr, ciptr->addr, sizeof(struct sockaddr));
+ ciptr->port = rindex(addr->sa_data, ':');
+ if (ciptr->port[0] == ':') ciptr->port++; /* port should now point to portnum or NULL */
+ return ciptr;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+/*
+ * These functions are the interface supplied in the Xtransport structure
+ */
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol,
+ char *host, char *port, int previndex)
+{
+ XtransConnInfo ciptr;
+ int i = previndex;
+
+ PRMSG (2, "SocketOpenCOTSClient(%s,%s,%s)\n",
+ protocol, host, port);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, transname)) >= 0) {
+ if ((ciptr = TRANS(SocketOpen) (
+ i, Sockettrans2devtab[i].devcotsname)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketOpenCOTSClient: Unable to open socket for %s\n",
+ transname, 0, 0);
+ else
+ PRMSG (1,"SocketOpenCOTSClient: Unable to determine socket type for %s\n",
+ transname, 0, 0);
+ return NULL;
+ }
+
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+static XtransConnInfo
+TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+{
+ return TRANS(SocketOpenCOTSClientBase)(
+ thistrans->TransName, protocol, host, port, -1);
+}
+
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i = -1;
+
+ PRMSG (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
+ if ((ciptr = TRANS(SocketOpen) (
+ i, Sockettrans2devtab[i].devcotsname)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
+ thistrans->TransName, 0, 0);
+ else
+ PRMSG (1,"SocketOpenCOTSServer: Unable to determine socket type for %s\n",
+ thistrans->TransName, 0, 0);
+ return NULL;
+ }
+
+ /*
+ * Using this prevents the bind() check for an existing server listening
+ * on the same port, but it is required for other reasons.
+ */
+#ifdef SO_REUSEADDR
+
+ /*
+ * SO_REUSEADDR only applied to AF_INET && AF_INET6
+ */
+
+ if (Sockettrans2devtab[i].family == AF_INET
+#if defined(IPv6) && defined(AF_INET6)
+ || Sockettrans2devtab[i].family == AF_INET6
+#endif
+ )
+ {
+ int one = 1;
+ setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
+ (char *) &one, sizeof (int));
+ }
+#endif
+#ifdef IPV6_V6ONLY
+ if (Sockettrans2devtab[i].family == AF_INET6)
+ {
+ int one = 1;
+ setsockopt(ciptr->fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(int));
+ }
+#endif
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i = -1;
+
+ PRMSG (2,"SocketOpenCLTSClient(%s,%s,%s)\n", protocol, host, port);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
+ if ((ciptr = TRANS(SocketOpen) (
+ i, Sockettrans2devtab[i].devcotsname)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketOpenCLTSClient: Unable to open socket for %s\n",
+ thistrans->TransName, 0, 0);
+ else
+ PRMSG (1,"SocketOpenCLTSClient: Unable to determine socket type for %s\n",
+ thistrans->TransName, 0, 0);
+ return NULL;
+ }
+
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i = -1;
+
+ PRMSG (2,"SocketOpenCLTSServer(%s,%s,%s)\n", protocol, host, port);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
+ if ((ciptr = TRANS(SocketOpen) (
+ i, Sockettrans2devtab[i].devcotsname)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketOpenCLTSServer: Unable to open socket for %s\n",
+ thistrans->TransName, 0, 0);
+ else
+ PRMSG (1,"SocketOpenCLTSServer: Unable to determine socket type for %s\n",
+ thistrans->TransName, 0, 0);
+ return NULL;
+ }
+
+#ifdef IPV6_V6ONLY
+ if (Sockettrans2devtab[i].family == AF_INET6)
+ {
+ int one = 1;
+ setsockopt(ciptr->fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(int));
+ }
+#endif
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i = -1;
+
+ PRMSG (2,
+ "SocketReopenCOTSServer(%d, %s)\n", fd, port, 0);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
+ if ((ciptr = TRANS(SocketReopen) (
+ i, Sockettrans2devtab[i].devcotsname, fd, port)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketReopenCOTSServer: Unable to open socket for %s\n",
+ thistrans->TransName, 0, 0);
+ else
+ PRMSG (1,"SocketReopenCOTSServer: Unable to determine socket type for %s\n",
+ thistrans->TransName, 0, 0);
+ return NULL;
+ }
+
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+static XtransConnInfo
+TRANS(SocketReopenCLTSServer) (Xtransport *thistrans, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i = -1;
+
+ PRMSG (2,
+ "SocketReopenCLTSServer(%d, %s)\n", fd, port, 0);
+
+ SocketInitOnce();
+
+ while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
+ if ((ciptr = TRANS(SocketReopen) (
+ i, Sockettrans2devtab[i].devcotsname, fd, port)) != NULL)
+ break;
+ }
+ if (i < 0) {
+ if (i == -1)
+ PRMSG (1,"SocketReopenCLTSServer: Unable to open socket for %s\n",
+ thistrans->TransName, 0, 0);
+ else
+ PRMSG (1,"SocketReopenCLTSServer: Unable to determine socket type for %s\n",
+ thistrans->TransName, 0, 0);
+ return NULL;
+ }
+
+ /* Save the index for later use */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+static int
+TRANS(SocketSetOption) (XtransConnInfo ciptr, int option, int arg)
+
+{
+ PRMSG (2,"SocketSetOption(%d,%d,%d)\n", ciptr->fd, option, arg);
+
+ return -1;
+}
+
+#ifdef UNIXCONN
+static int
+set_sun_path(const char *port, const char *upath, char *path, int abstract)
+{
+ struct sockaddr_un s;
+ int maxlen = sizeof(s.sun_path) - 1;
+ const char *at = "";
+
+ if (!port || !*port || !path)
+ return -1;
+
+#ifdef HAVE_ABSTRACT_SOCKETS
+ if (port[0] == '@')
+ upath = "";
+ else if (abstract)
+ at = "@";
+#endif
+
+ if (*port == '/') /* a full pathname */
+ upath = "";
+
+ if (strlen(port) + strlen(upath) > maxlen)
+ return -1;
+ sprintf(path, "%s%s%s", at, upath, port);
+ return 0;
+}
+#endif
+
+#ifdef TRANS_SERVER
+
+static int
+TRANS(SocketCreateListener) (XtransConnInfo ciptr,
+ struct sockaddr *sockname,
+ int socknamelen, unsigned int flags)
+
+{
+ SOCKLEN_T namelen = socknamelen;
+ int fd = ciptr->fd;
+ int retry;
+
+ PRMSG (3, "SocketCreateListener(%x,%p)\n", ciptr, fd, 0);
+
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET
+#if defined(IPv6) && defined(AF_INET6)
+ || Sockettrans2devtab[ciptr->index].family == AF_INET6
+#endif
+ )
+ retry = 20;
+ else
+ retry = 0;
+
+ while (bind (fd, (struct sockaddr *) sockname, namelen) < 0)
+ {
+ if (errno == EADDRINUSE) {
+ if (flags & ADDR_IN_USE_ALLOWED)
+ break;
+ else
+ return TRANS_ADDR_IN_USE;
+ }
+
+ if (retry-- == 0) {
+ PRMSG (1, "SocketCreateListener: failed to bind listener\n",
+ 0, 0, 0);
+ close (fd);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+#ifdef SO_REUSEADDR
+ sleep (1);
+#else
+ sleep (10);
+#endif /* SO_REUSEDADDR */
+ }
+
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET
+#if defined(IPv6) && defined(AF_INET6)
+ || Sockettrans2devtab[ciptr->index].family == AF_INET6
+#endif
+ ) {
+#ifdef SO_DONTLINGER
+ setsockopt (fd, SOL_SOCKET, SO_DONTLINGER, (char *) NULL, 0);
+#else
+#ifdef SO_LINGER
+ {
+ static int linger[2] = { 0, 0 };
+ setsockopt (fd, SOL_SOCKET, SO_LINGER,
+ (char *) linger, sizeof (linger));
+ }
+#endif
+#endif
+}
+
+ if (listen (fd, BACKLOG) < 0)
+ {
+ PRMSG (1, "SocketCreateListener: listen() failed\n", 0, 0, 0);
+ close (fd);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ /* Set a flag to indicate that this connection is a listener */
+
+ ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS);
+
+ return 0;
+}
+
+#ifdef TCPCONN
+static int
+TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
+
+{
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_storage sockname;
+#else
+ struct sockaddr_in sockname;
+#endif
+ unsigned short sport;
+ SOCKLEN_T namelen = sizeof(sockname);
+ int status;
+ long tmpport;
+#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
+ _Xgetservbynameparams sparams;
+#endif
+ struct servent *servp;
+
+#ifdef X11_t
+ char portbuf[PORTBUFSIZE];
+#endif
+
+ PRMSG (2, "SocketINETCreateListener(%s)\n", port, 0, 0);
+
+#ifdef X11_t
+ /*
+ * X has a well known port, that is transport dependent. It is easier
+ * to handle it here, than try and come up with a transport independent
+ * representation that can be passed in and resolved the usual way.
+ *
+ * The port that is passed here is really a string containing the idisplay
+ * from ConnectDisplay().
+ */
+
+ if (is_numeric (port))
+ {
+ /* fixup the server port address */
+ tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
+ sprintf (portbuf,"%lu", tmpport);
+ port = portbuf;
+ }
+#endif
+
+ if (port && *port)
+ {
+ /* Check to see if the port string is just a number (handles X11) */
+
+ if (!is_numeric (port))
+ {
+ if ((servp = _XGetservbyname (port,"tcp",sparams)) == NULL)
+ {
+ PRMSG (1,
+ "SocketINETCreateListener: Unable to get service for %s\n",
+ port, 0, 0);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+ /* we trust getservbyname to return a valid number */
+ sport = servp->s_port;
+ }
+ else
+ {
+ tmpport = strtol (port, (char**)NULL, 10);
+ /*
+ * check that somehow the port address isn't negative or in
+ * the range of reserved port addresses. This can happen and
+ * be very bad if the server is suid-root and the user does
+ * something (dumb) like `X :60049`.
+ */
+ if (tmpport < 1024 || tmpport > USHRT_MAX)
+ return TRANS_CREATE_LISTENER_FAILED;
+
+ sport = (unsigned short) tmpport;
+ }
+ }
+ else
+ sport = 0;
+
+ bzero(&sockname, sizeof(sockname));
+#if defined(IPv6) && defined(AF_INET6)
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET) {
+ namelen = sizeof (struct sockaddr_in);
+#ifdef BSD44SOCKETS
+ ((struct sockaddr_in *)&sockname)->sin_len = namelen;
+#endif
+ ((struct sockaddr_in *)&sockname)->sin_family = AF_INET;
+ ((struct sockaddr_in *)&sockname)->sin_port = htons(sport);
+ ((struct sockaddr_in *)&sockname)->sin_addr.s_addr = htonl(INADDR_ANY);
+ } else {
+ namelen = sizeof (struct sockaddr_in6);
+#ifdef SIN6_LEN
+ ((struct sockaddr_in6 *)&sockname)->sin6_len = sizeof(sockname);
+#endif
+ ((struct sockaddr_in6 *)&sockname)->sin6_family = AF_INET6;
+ ((struct sockaddr_in6 *)&sockname)->sin6_port = htons(sport);
+ ((struct sockaddr_in6 *)&sockname)->sin6_addr = in6addr_any;
+ }
+#else
+#ifdef BSD44SOCKETS
+ sockname.sin_len = sizeof (sockname);
+#endif
+ sockname.sin_family = AF_INET;
+ sockname.sin_port = htons (sport);
+ sockname.sin_addr.s_addr = htonl (INADDR_ANY);
+#endif
+
+ if ((status = TRANS(SocketCreateListener) (ciptr,
+ (struct sockaddr *) &sockname, namelen, flags)) < 0)
+ {
+ PRMSG (1,
+ "SocketINETCreateListener: ...SocketCreateListener() failed\n",
+ 0, 0, 0);
+ return status;
+ }
+
+ if (TRANS(SocketINETGetAddr) (ciptr) < 0)
+ {
+ PRMSG (1,
+ "SocketINETCreateListener: ...SocketINETGetAddr() failed\n",
+ 0, 0, 0);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ return 0;
+}
+
+#endif /* TCPCONN */
+
+
+#ifdef UNIXCONN
+
+static int
+TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
+ unsigned int flags)
+
+{
+ struct sockaddr_un sockname;
+ int namelen;
+ int oldUmask;
+ int status;
+ unsigned int mode;
+ char tmpport[108];
+
+ int abstract = 0;
+#ifdef HAVE_ABSTRACT_SOCKETS
+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
+#endif
+
+ PRMSG (2, "SocketUNIXCreateListener(%s)\n",
+ port ? port : "NULL", 0, 0);
+
+ /* Make sure the directory is created */
+
+ oldUmask = umask (0);
+
+#ifdef UNIX_DIR
+#ifdef HAS_STICKY_DIR_BIT
+ mode = 01777;
+#else
+ mode = 0777;
+#endif
+ if (!abstract && trans_mkdir(UNIX_DIR, mode) == -1) {
+ PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n",
+ UNIX_DIR, errno, 0);
+ (void) umask (oldUmask);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+#endif
+
+ memset(&sockname, 0, sizeof(sockname));
+ sockname.sun_family = AF_UNIX;
+
+ if (!(port && *port)) {
+ snprintf (tmpport, sizeof(tmpport), "%s%ld", UNIX_PATH, (long)getpid());
+ port = tmpport;
+ }
+ if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) {
+ PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+#if (defined(BSD44SOCKETS) || defined(__UNIXWARE__))
+ sockname.sun_len = strlen(sockname.sun_path);
+#endif
+
+#if defined(BSD44SOCKETS) || defined(SUN_LEN)
+ namelen = SUN_LEN(&sockname);
+#else
+ namelen = strlen(sockname.sun_path) + offsetof(struct sockaddr_un, sun_path);
+#endif
+
+ if (abstract) {
+ sockname.sun_path[0] = '\0';
+ namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]);
+ }
+ else
+ unlink (sockname.sun_path);
+
+ if ((status = TRANS(SocketCreateListener) (ciptr,
+ (struct sockaddr *) &sockname, namelen, flags)) < 0)
+ {
+ PRMSG (1,
+ "SocketUNIXCreateListener: ...SocketCreateListener() failed\n",
+ 0, 0, 0);
+ (void) umask (oldUmask);
+ return status;
+ }
+
+ /*
+ * Now that the listener is esablished, create the addr info for
+ * this connection. getpeername() doesn't work for UNIX Domain Sockets
+ * on some systems (hpux at least), so we will just do it manually, instead
+ * of calling something like TRANS(SocketUNIXGetAddr).
+ */
+
+ namelen = sizeof (sockname); /* this will always make it the same size */
+
+ if ((ciptr->addr = (char *) xalloc (namelen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketUNIXCreateListener: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ (void) umask (oldUmask);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ if (abstract)
+ sockname.sun_path[0] = '@';
+
+ ciptr->family = sockname.sun_family;
+ ciptr->addrlen = namelen;
+ memcpy (ciptr->addr, &sockname, ciptr->addrlen);
+
+ (void) umask (oldUmask);
+
+ return 0;
+}
+
+
+static int
+TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr)
+
+{
+ /*
+ * See if the unix domain socket has disappeared. If it has, recreate it.
+ */
+
+ struct sockaddr_un *unsock = (struct sockaddr_un *) ciptr->addr;
+ struct stat statb;
+ int status = TRANS_RESET_NOOP;
+ unsigned int mode;
+ int abstract = 0;
+#ifdef HAVE_ABSTRACT_SOCKETS
+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
+#endif
+
+ PRMSG (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+ if (!abstract && (
+ stat (unsock->sun_path, &statb) == -1 ||
+ ((statb.st_mode & S_IFMT) !=
+#if (defined (sun) && defined(SVR4)) || defined(NCR) || defined(SCO325) || !defined(S_IFSOCK)
+ S_IFIFO
+#else
+ S_IFSOCK
+#endif
+ )))
+ {
+ int oldUmask = umask (0);
+
+#ifdef UNIX_DIR
+#ifdef HAS_STICKY_DIR_BIT
+ mode = 01777;
+#else
+ mode = 0777;
+#endif
+ if (trans_mkdir(UNIX_DIR, mode) == -1) {
+ PRMSG (1, "SocketUNIXResetListener: mkdir(%s) failed, errno = %d\n",
+ UNIX_DIR, errno, 0);
+ (void) umask (oldUmask);
+ return TRANS_RESET_FAILURE;
+ }
+#endif
+
+ close (ciptr->fd);
+ unlink (unsock->sun_path);
+
+ if ((ciptr->fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
+ {
+ TRANS(FreeConnInfo) (ciptr);
+ (void) umask (oldUmask);
+ return TRANS_RESET_FAILURE;
+ }
+
+ if (bind (ciptr->fd, (struct sockaddr *) unsock, ciptr->addrlen) < 0)
+ {
+ close (ciptr->fd);
+ TRANS(FreeConnInfo) (ciptr);
+ return TRANS_RESET_FAILURE;
+ }
+
+ if (listen (ciptr->fd, BACKLOG) < 0)
+ {
+ close (ciptr->fd);
+ TRANS(FreeConnInfo) (ciptr);
+ (void) umask (oldUmask);
+ return TRANS_RESET_FAILURE;
+ }
+
+ umask (oldUmask);
+
+ status = TRANS_RESET_NEW_FD;
+ }
+
+ return status;
+}
+
+#endif /* UNIXCONN */
+
+
+#ifdef TCPCONN
+
+static XtransConnInfo
+TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
+
+{
+ XtransConnInfo newciptr;
+ struct sockaddr_in sockname;
+ SOCKLEN_T namelen = sizeof(sockname);
+
+ PRMSG (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+ if ((newciptr = (XtransConnInfo) xcalloc (
+ 1, sizeof(struct _XtransConnInfo))) == NULL)
+ {
+ PRMSG (1, "SocketINETAccept: malloc failed\n", 0, 0, 0);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ if ((newciptr->fd = accept (ciptr->fd,
+ (struct sockaddr *) &sockname, (void *)&namelen)) < 0)
+ {
+#ifdef WIN32
+ errno = WSAGetLastError();
+#endif
+ PRMSG (1, "SocketINETAccept: accept() failed\n", 0, 0, 0);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_FAILED;
+ return NULL;
+ }
+
+#ifdef TCP_NODELAY
+ {
+ /*
+ * turn off TCP coalescence for INET sockets
+ */
+
+ int tmp = 1;
+ setsockopt (newciptr->fd, IPPROTO_TCP, TCP_NODELAY,
+ (char *) &tmp, sizeof (int));
+ }
+#endif
+
+ /*
+ * Get this address again because the transport may give a more
+ * specific address now that a connection is established.
+ */
+
+ if (TRANS(SocketINETGetAddr) (newciptr) < 0)
+ {
+ PRMSG (1,
+ "SocketINETAccept: ...SocketINETGetAddr() failed:\n",
+ 0, 0, 0);
+ close (newciptr->fd);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ if (TRANS(SocketINETGetPeerAddr) (newciptr) < 0)
+ {
+ PRMSG (1,
+ "SocketINETAccept: ...SocketINETGetPeerAddr() failed:\n",
+ 0, 0, 0);
+ close (newciptr->fd);
+ if (newciptr->addr) xfree (newciptr->addr);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ *status = 0;
+
+ return newciptr;
+}
+
+#endif /* TCPCONN */
+
+
+#ifdef UNIXCONN
+static XtransConnInfo
+TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
+
+{
+ XtransConnInfo newciptr;
+ struct sockaddr_un sockname;
+ SOCKLEN_T namelen = sizeof sockname;
+
+ PRMSG (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+ if ((newciptr = (XtransConnInfo) xcalloc (
+ 1, sizeof(struct _XtransConnInfo))) == NULL)
+ {
+ PRMSG (1, "SocketUNIXAccept: malloc() failed\n", 0, 0, 0);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ if ((newciptr->fd = accept (ciptr->fd,
+ (struct sockaddr *) &sockname, (void *)&namelen)) < 0)
+ {
+ PRMSG (1, "SocketUNIXAccept: accept() failed\n", 0, 0, 0);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_FAILED;
+ return NULL;
+ }
+
+ ciptr->addrlen = namelen;
+ /*
+ * Get the socket name and the peer name from the listener socket,
+ * since this is unix domain.
+ */
+
+ if ((newciptr->addr = (char *) xalloc (ciptr->addrlen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketUNIXAccept: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ close (newciptr->fd);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ /*
+ * if the socket is abstract, we already modified the address to have a
+ * @ instead of the initial NUL, so no need to do that again here.
+ */
+
+ newciptr->addrlen = ciptr->addrlen;
+ memcpy (newciptr->addr, ciptr->addr, newciptr->addrlen);
+
+ if ((newciptr->peeraddr = (char *) xalloc (ciptr->addrlen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketUNIXAccept: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ close (newciptr->fd);
+ if (newciptr->addr) xfree (newciptr->addr);
+ xfree (newciptr);
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ newciptr->peeraddrlen = ciptr->addrlen;
+ memcpy (newciptr->peeraddr, ciptr->addr, newciptr->addrlen);
+
+ newciptr->family = AF_UNIX;
+
+ *status = 0;
+
+ return newciptr;
+}
+
+#endif /* UNIXCONN */
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+#ifdef TCPCONN
+
+#if defined(IPv6) && defined(AF_INET6)
+struct addrlist {
+ struct addrinfo * addr;
+ struct addrinfo * firstaddr;
+ char port[PORTBUFSIZE];
+ char host[MAXHOSTNAMELEN];
+};
+static struct addrlist *addrlist = NULL;
+#endif
+
+
+static int
+TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
+
+{
+ struct sockaddr * socketaddr = NULL;
+ int socketaddrlen = 0;
+ int res;
+#if defined(IPv6) && defined(AF_INET6)
+ struct addrinfo hints;
+ char ntopbuf[INET6_ADDRSTRLEN];
+ int resetonce = 0;
+#endif
+ struct sockaddr_in sockname;
+#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
+ _Xgethostbynameparams hparams;
+ _Xgetservbynameparams sparams;
+#endif
+ struct hostent *hostp;
+ struct servent *servp;
+ unsigned long tmpaddr;
+#ifdef X11_t
+ char portbuf[PORTBUFSIZE];
+#endif
+
+ long tmpport;
+ char hostnamebuf[256]; /* tmp space */
+
+ PRMSG (2,"SocketINETConnect(%d,%s,%s)\n", ciptr->fd, host, port);
+
+ if (!host)
+ {
+ hostnamebuf[0] = '\0';
+ (void) TRANS(GetHostname) (hostnamebuf, sizeof hostnamebuf);
+ host = hostnamebuf;
+ }
+
+#ifdef X11_t
+ /*
+ * X has a well known port, that is transport dependent. It is easier
+ * to handle it here, than try and come up with a transport independent
+ * representation that can be passed in and resolved the usual way.
+ *
+ * The port that is passed here is really a string containing the idisplay
+ * from ConnectDisplay().
+ */
+
+ if (is_numeric (port))
+ {
+ tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
+ sprintf (portbuf, "%lu", tmpport);
+ port = portbuf;
+ }
+#endif
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (haveIPv6) {
+ if (addrlist != NULL) {
+ if (strcmp(host,addrlist->host) || strcmp(port,addrlist->port)) {
+ if (addrlist->firstaddr)
+ freeaddrinfo(addrlist->firstaddr);
+ addrlist->firstaddr = NULL;
+ }
+ } else {
+ addrlist = malloc(sizeof(struct addrlist));
+ addrlist->firstaddr = NULL;
+ }
+
+ if (addrlist->firstaddr == NULL) {
+ strncpy(addrlist->port, port, sizeof(addrlist->port));
+ addrlist->port[sizeof(addrlist->port) - 1] = '\0';
+ strncpy(addrlist->host, host, sizeof(addrlist->host));
+ addrlist->host[sizeof(addrlist->host) - 1] = '\0';
+
+ bzero(&hints,sizeof(hints));
+ hints.ai_socktype = Sockettrans2devtab[ciptr->index].devcotsname;
+
+ res = getaddrinfo(host,port,&hints,&addrlist->firstaddr);
+ if (res != 0) {
+ PRMSG (1, "SocketINETConnect() can't get address "
+ "for %s:%s: %s\n", host, port, gai_strerror(res));
+ ESET(EINVAL);
+ return TRANS_CONNECT_FAILED;
+ }
+ for (res = 0, addrlist->addr = addrlist->firstaddr;
+ addrlist->addr ; res++) {
+ addrlist->addr = addrlist->addr->ai_next;
+ }
+ PRMSG(4,"Got New Address list with %d addresses\n", res, 0, 0);
+ res = 0;
+ addrlist->addr = NULL;
+ }
+
+ while (socketaddr == NULL) {
+ if (addrlist->addr == NULL) {
+ if (resetonce) {
+ /* Already checked entire list - no usable addresses */
+ PRMSG (1, "SocketINETConnect() no usable address "
+ "for %s:%s\n", host, port, 0);
+ return TRANS_CONNECT_FAILED;
+ } else {
+ /* Go back to beginning of list */
+ resetonce = 1;
+ addrlist->addr = addrlist->firstaddr;
+ }
+ }
+
+ socketaddr = addrlist->addr->ai_addr;
+ socketaddrlen = addrlist->addr->ai_addrlen;
+
+ if (addrlist->addr->ai_family == AF_INET) {
+ struct sockaddr_in *sin = (struct sockaddr_in *) socketaddr;
+
+ PRMSG (4,"SocketINETConnect() sockname.sin_addr = %s\n",
+ inet_ntop(addrlist->addr->ai_family,&sin->sin_addr,
+ ntopbuf,sizeof(ntopbuf)), 0, 0);
+
+ PRMSG (4,"SocketINETConnect() sockname.sin_port = %d\n",
+ ntohs(sin->sin_port), 0, 0);
+
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET6) {
+ if (strcmp(Sockettrans2devtab[ciptr->index].transname,
+ "tcp") == 0) {
+ XtransConnInfo newciptr;
+
+ /*
+ * Our socket is an IPv6 socket, but the address is
+ * IPv4. Close it and get an IPv4 socket. This is
+ * needed for IPv4 connections to work on platforms
+ * that don't allow IPv4 over IPv6 sockets.
+ */
+ TRANS(SocketINETClose)(ciptr);
+ newciptr = TRANS(SocketOpenCOTSClientBase)(
+ "tcp", "tcp", host, port, ciptr->index);
+ if (newciptr)
+ ciptr->fd = newciptr->fd;
+ if (!newciptr ||
+ Sockettrans2devtab[newciptr->index].family !=
+ AF_INET) {
+ socketaddr = NULL;
+ PRMSG (4,"SocketINETConnect() Cannot get IPv4 "
+ " socketfor IPv4 address\n", 0,0,0);
+ }
+ if (newciptr)
+ xfree(newciptr);
+ } else {
+ socketaddr = NULL;
+ PRMSG (4,"SocketINETConnect Skipping IPv4 address\n",
+ 0,0,0);
+ }
+ }
+ } else if (addrlist->addr->ai_family == AF_INET6) {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) socketaddr;
+
+ PRMSG (4,"SocketINETConnect() sockname.sin6_addr = %s\n",
+ inet_ntop(addrlist->addr->ai_family,
+ &sin6->sin6_addr,ntopbuf,sizeof(ntopbuf)),
+ 0, 0);
+ PRMSG (4,"SocketINETConnect() sockname.sin6_port = %d\n",
+ ntohs(sin6->sin6_port), 0, 0);
+
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET) {
+ if (strcmp(Sockettrans2devtab[ciptr->index].transname,
+ "tcp") == 0) {
+ XtransConnInfo newciptr;
+
+ /*
+ * Close the IPv4 socket and try to open an IPv6 socket.
+ */
+ TRANS(SocketINETClose)(ciptr);
+ newciptr = TRANS(SocketOpenCOTSClientBase)(
+ "tcp", "tcp", host, port, -1);
+ if (newciptr)
+ ciptr->fd = newciptr->fd;
+ if (!newciptr ||
+ Sockettrans2devtab[newciptr->index].family !=
+ AF_INET6) {
+ socketaddr = NULL;
+ PRMSG (4,"SocketINETConnect() Cannot get IPv6 "
+ "socket for IPv6 address\n", 0,0,0);
+ }
+ if (newciptr)
+ xfree(newciptr);
+ }
+ else
+ {
+ socketaddr = NULL;
+ PRMSG (4,"SocketINETConnect() Skipping IPv6 address\n",
+ 0,0,0);
+ }
+ }
+ } else {
+ socketaddr = NULL; /* Unsupported address type */
+ }
+ if (socketaddr == NULL) {
+ addrlist->addr = addrlist->addr->ai_next;
+ }
+ }
+ } else
+#endif
+ {
+ /*
+ * Build the socket name.
+ */
+
+#ifdef BSD44SOCKETS
+ sockname.sin_len = sizeof (struct sockaddr_in);
+#endif
+ sockname.sin_family = AF_INET;
+
+ /*
+ * fill in sin_addr
+ */
+
+#ifndef INADDR_NONE
+#define INADDR_NONE ((in_addr_t) 0xffffffff)
+#endif
+
+ /* check for ww.xx.yy.zz host string */
+
+ if (isascii (host[0]) && isdigit (host[0])) {
+ tmpaddr = inet_addr (host); /* returns network byte order */
+ } else {
+ tmpaddr = INADDR_NONE;
+ }
+
+ PRMSG (4,"SocketINETConnect() inet_addr(%s) = %x\n", host, tmpaddr, 0);
+
+ if (tmpaddr == INADDR_NONE) {
+ if ((hostp = _XGethostbyname(host,hparams)) == NULL) {
+ PRMSG (1,"SocketINETConnect: Can't get address for %s\n",
+ host, 0, 0);
+ ESET(EINVAL);
+ return TRANS_CONNECT_FAILED;
+ }
+ if (hostp->h_addrtype != AF_INET) { /* is IP host? */
+ PRMSG (1,"SocketINETConnect: not INET host%s\n", host, 0, 0);
+ ESET(EPROTOTYPE);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ memcpy ((char *) &sockname.sin_addr, (char *) hostp->h_addr,
+ sizeof (sockname.sin_addr));
+
+ } else {
+ sockname.sin_addr.s_addr = tmpaddr;
+ }
+
+ /*
+ * fill in sin_port
+ */
+
+ /* Check for number in the port string */
+
+ if (!is_numeric (port)) {
+ if ((servp = _XGetservbyname (port,"tcp",sparams)) == NULL) {
+ PRMSG (1,"SocketINETConnect: can't get service for %s\n",
+ port, 0, 0);
+ return TRANS_CONNECT_FAILED;
+ }
+ sockname.sin_port = htons (servp->s_port);
+ } else {
+ tmpport = strtol (port, (char**)NULL, 10);
+ if (tmpport < 1024 || tmpport > USHRT_MAX)
+ return TRANS_CONNECT_FAILED;
+ sockname.sin_port = htons (((unsigned short) tmpport));
+ }
+
+ PRMSG (4,"SocketINETConnect: sockname.sin_port = %d\n",
+ ntohs(sockname.sin_port), 0, 0);
+ socketaddr = (struct sockaddr *) &sockname;
+ socketaddrlen = sizeof(sockname);
+ }
+
+ /*
+ * Turn on socket keepalive so the client process will eventually
+ * be notified with a SIGPIPE signal if the display server fails
+ * to respond to a periodic transmission of messages
+ * on the connected socket.
+ * This is useful to avoid hung application processes when the
+ * processes are not spawned from the xdm session and
+ * the display server terminates abnormally.
+ * (Someone turned off the power switch.)
+ */
+
+ {
+ int tmp = 1;
+ setsockopt (ciptr->fd, SOL_SOCKET, SO_KEEPALIVE,
+ (char *) &tmp, sizeof (int));
+ }
+
+ /*
+ * Do the connect()
+ */
+
+ if (connect (ciptr->fd, socketaddr, socketaddrlen ) < 0)
+ {
+#ifdef WIN32
+ int olderrno = WSAGetLastError();
+#else
+ int olderrno = errno;
+#endif
+
+ /*
+ * If the error was ECONNREFUSED, the server may be overloaded
+ * and we should try again.
+ *
+ * If the error was EWOULDBLOCK or EINPROGRESS then the socket
+ * was non-blocking and we should poll using select
+ *
+ * If the error was EINTR, the connect was interrupted and we
+ * should try again.
+ *
+ * If multiple addresses are found for a host then we should
+ * try to connect again with a different address for a larger
+ * number of errors that made us quit before, since those
+ * could be caused by trying to use an IPv6 address to contact
+ * a machine with an IPv4-only server or other reasons that
+ * only affect one of a set of addresses.
+ */
+
+ if (olderrno == ECONNREFUSED || olderrno == EINTR
+#if defined(IPv6) && defined(AF_INET6)
+ || (haveIPv6 && ((addrlist->addr->ai_next != NULL) ||
+ (addrlist->addr != addrlist->firstaddr)) &&
+ (olderrno == ENETUNREACH || olderrno == EAFNOSUPPORT ||
+ olderrno == EADDRNOTAVAIL || olderrno == ETIMEDOUT
+#if defined(EHOSTDOWN)
+ || olderrno == EHOSTDOWN
+#endif
+ ))
+#endif
+ )
+ res = TRANS_TRY_CONNECT_AGAIN;
+ else if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS)
+ res = TRANS_IN_PROGRESS;
+ else
+ {
+ PRMSG (2,"SocketINETConnect: Can't connect: errno = %d\n",
+ olderrno,0, 0);
+
+ res = TRANS_CONNECT_FAILED;
+ }
+ } else {
+ res = 0;
+
+
+ /*
+ * Sync up the address fields of ciptr.
+ */
+
+ if (TRANS(SocketINETGetAddr) (ciptr) < 0)
+ {
+ PRMSG (1,
+ "SocketINETConnect: ...SocketINETGetAddr() failed:\n",
+ 0, 0, 0);
+ res = TRANS_CONNECT_FAILED;
+ }
+
+ else if (TRANS(SocketINETGetPeerAddr) (ciptr) < 0)
+ {
+ PRMSG (1,
+ "SocketINETConnect: ...SocketINETGetPeerAddr() failed:\n",
+ 0, 0, 0);
+ res = TRANS_CONNECT_FAILED;
+ }
+ }
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (haveIPv6 && res != 0) {
+ addrlist->addr = addrlist->addr->ai_next;
+ }
+#endif
+
+ return res;
+}
+
+#endif /* TCPCONN */
+
+
+
+#ifdef UNIXCONN
+
+/*
+ * Make sure 'host' is really local.
+ */
+
+static int
+UnixHostReallyLocal (char *host)
+
+{
+ char hostnamebuf[256];
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (getaddrinfo == NULL)
+ haveIPv6 = 0;
+#endif
+
+ TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
+
+ if (strcmp (hostnamebuf, host) == 0)
+ {
+ return (1);
+ }
+#if defined(IPv6) && defined(AF_INET6)
+ else if (haveIPv6)
+ {
+ struct addrinfo *localhostaddr;
+ struct addrinfo *otherhostaddr;
+ struct addrinfo *i, *j;
+ int equiv = 0;
+
+ if (getaddrinfo(hostnamebuf, NULL, NULL, &localhostaddr) != 0)
+ return 0;
+ if (getaddrinfo(host, NULL, NULL, &otherhostaddr) != 0) {
+ freeaddrinfo(localhostaddr);
+ return 0;
+ }
+
+ for (i = localhostaddr; i != NULL && equiv == 0; i = i->ai_next) {
+ for (j = otherhostaddr; j != NULL && equiv == 0; j = j->ai_next) {
+ if (i->ai_family == j->ai_family) {
+ if (i->ai_family == AF_INET) {
+ struct sockaddr_in *sinA
+ = (struct sockaddr_in *) i->ai_addr;
+ struct sockaddr_in *sinB
+ = (struct sockaddr_in *) j->ai_addr;
+ struct in_addr *A = &sinA->sin_addr;
+ struct in_addr *B = &sinB->sin_addr;
+
+ if (memcmp(A,B,sizeof(struct in_addr)) == 0) {
+ equiv = 1;
+ }
+ } else if (i->ai_family == AF_INET6) {
+ struct sockaddr_in6 *sinA
+ = (struct sockaddr_in6 *) i->ai_addr;
+ struct sockaddr_in6 *sinB
+ = (struct sockaddr_in6 *) j->ai_addr;
+ struct in6_addr *A = &sinA->sin6_addr;
+ struct in6_addr *B = &sinB->sin6_addr;
+
+ if (memcmp(A,B,sizeof(struct in6_addr)) == 0) {
+ equiv = 1;
+ }
+ }
+ }
+ }
+ }
+
+ freeaddrinfo(localhostaddr);
+ freeaddrinfo(otherhostaddr);
+ return equiv;
+ }
+#endif
+ else
+ {
+ /*
+ * A host may have more than one network address. If any of the
+ * network addresses of 'host' (specified to the connect call)
+ * match any of the network addresses of 'hostname' (determined
+ * by TRANS(GetHostname)), then the two hostnames are equivalent,
+ * and we know that 'host' is really a local host.
+ */
+ char specified_local_addr_list[10][4];
+ int scount, equiv, i, j;
+#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
+ _Xgethostbynameparams hparams;
+#endif
+ struct hostent *hostp;
+
+ if ((hostp = _XGethostbyname (host,hparams)) == NULL)
+ return (0);
+
+ scount = 0;
+ while (hostp->h_addr_list[scount] && scount <= 8)
+ {
+ /*
+ * The 2nd call to gethostname() overrides the data
+ * from the 1st call, so we must save the address list.
+ */
+
+ specified_local_addr_list[scount][0] =
+ hostp->h_addr_list[scount][0];
+ specified_local_addr_list[scount][1] =
+ hostp->h_addr_list[scount][1];
+ specified_local_addr_list[scount][2] =
+ hostp->h_addr_list[scount][2];
+ specified_local_addr_list[scount][3] =
+ hostp->h_addr_list[scount][3];
+ scount++;
+ }
+ if ((hostp = _XGethostbyname (hostnamebuf,hparams)) == NULL)
+ return (0);
+
+ equiv = 0;
+ i = 0;
+
+ while (i < scount && !equiv)
+ {
+ j = 0;
+
+ while (hostp->h_addr_list[j])
+ {
+ if ((specified_local_addr_list[i][0] ==
+ hostp->h_addr_list[j][0]) &&
+ (specified_local_addr_list[i][1] ==
+ hostp->h_addr_list[j][1]) &&
+ (specified_local_addr_list[i][2] ==
+ hostp->h_addr_list[j][2]) &&
+ (specified_local_addr_list[i][3] ==
+ hostp->h_addr_list[j][3]))
+ {
+ /* They're equal, so we're done */
+
+ equiv = 1;
+ break;
+ }
+
+ j++;
+ }
+
+ i++;
+ }
+ return (equiv);
+ }
+}
+
+static int
+TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
+
+{
+ struct sockaddr_un sockname;
+ SOCKLEN_T namelen;
+
+
+ int abstract = 0;
+#ifdef HAVE_ABSTRACT_SOCKETS
+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
+#endif
+
+ PRMSG (2,"SocketUNIXConnect(%d,%s,%s)\n", ciptr->fd, host, port);
+
+ /*
+ * Make sure 'host' is really local. If not, we return failure.
+ * The reason we make this check is because a process may advertise
+ * a "local" network ID for which it can accept connections, but if
+ * a process on a remote machine tries to connect to this network ID,
+ * we know for sure it will fail.
+ */
+
+ if (host && *host && host[0]!='/' && strcmp (host, "unix") != 0 && !UnixHostReallyLocal (host))
+ {
+ PRMSG (1,
+ "SocketUNIXConnect: Cannot connect to non-local host %s\n",
+ host, 0, 0);
+ return TRANS_CONNECT_FAILED;
+ }
+
+
+ /*
+ * Check the port.
+ */
+
+ if (!port || !*port)
+ {
+ PRMSG (1,"SocketUNIXConnect: Missing port specification\n",
+ 0, 0, 0);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ /*
+ * Build the socket name.
+ */
+
+ sockname.sun_family = AF_UNIX;
+
+ if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) {
+ PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0);
+ return TRANS_CONNECT_FAILED;
+ }
+
+#if (defined(BSD44SOCKETS) || defined(__UNIXWARE__))
+ sockname.sun_len = strlen (sockname.sun_path);
+#endif
+
+#if defined(BSD44SOCKETS) || defined(SUN_LEN)
+ namelen = SUN_LEN (&sockname);
+#else
+ namelen = strlen (sockname.sun_path) + offsetof(struct sockaddr_un, sun_path);
+#endif
+
+
+
+ /*
+ * Adjust the socket path if using abstract sockets.
+ * Done here because otherwise all the strlen() calls above would fail.
+ */
+
+ if (abstract) {
+ sockname.sun_path[0] = '\0';
+ }
+
+ /*
+ * Do the connect()
+ */
+
+ if (connect (ciptr->fd, (struct sockaddr *) &sockname, namelen) < 0)
+ {
+ int olderrno = errno;
+ int connected = 0;
+
+ if (!connected)
+ {
+ errno = olderrno;
+
+ /*
+ * If the error was ENOENT, the server may be starting up; we used
+ * to suggest to try again in this case with
+ * TRANS_TRY_CONNECT_AGAIN, but this introduced problems for
+ * processes still referencing stale sockets in their environment.
+ * Hence, we now return a hard error, TRANS_CONNECT_FAILED, and it
+ * is suggested that higher level stacks handle retries on their
+ * level when they face a slow starting server.
+ *
+ * If the error was EWOULDBLOCK or EINPROGRESS then the socket
+ * was non-blocking and we should poll using select
+ *
+ * If the error was EINTR, the connect was interrupted and we
+ * should try again.
+ */
+
+ if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS)
+ return TRANS_IN_PROGRESS;
+ else if (olderrno == EINTR)
+ return TRANS_TRY_CONNECT_AGAIN;
+ else if (olderrno == ENOENT || olderrno == ECONNREFUSED) {
+ /* If opening as abstract socket failed, try again normally */
+ if (abstract) {
+ ciptr->transptr->flags &= ~(TRANS_ABSTRACT);
+ return TRANS_TRY_CONNECT_AGAIN;
+ } else {
+ return TRANS_CONNECT_FAILED;
+ }
+ } else {
+ PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n",
+ EGET(),0, 0);
+
+ return TRANS_CONNECT_FAILED;
+ }
+ }
+ }
+
+ /*
+ * Get the socket name and the peer name from the connect socket,
+ * since this is unix domain.
+ */
+
+ if ((ciptr->addr = (char *) xalloc(namelen)) == NULL ||
+ (ciptr->peeraddr = (char *) xalloc(namelen)) == NULL)
+ {
+ PRMSG (1,
+ "SocketUNIXCreateListener: Can't allocate space for the addr\n",
+ 0, 0, 0);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if (abstract)
+ sockname.sun_path[0] = '@';
+
+ ciptr->family = AF_UNIX;
+ ciptr->addrlen = namelen;
+ ciptr->peeraddrlen = namelen;
+ memcpy (ciptr->addr, &sockname, ciptr->addrlen);
+ memcpy (ciptr->peeraddr, &sockname, ciptr->peeraddrlen);
+
+ return 0;
+}
+
+#endif /* UNIXCONN */
+
+#endif /* TRANS_CLIENT */
+
+
+static int
+TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend)
+
+{
+ PRMSG (2,"SocketBytesReadable(%p,%d,%p)\n",
+ ciptr, ciptr->fd, pend);
+#ifdef WIN32
+ {
+ int ret = ioctlsocket ((SOCKET) ciptr->fd, FIONREAD, (u_long *) pend);
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+ return ret;
+ }
+#else
+#if defined(__i386__) && defined(SYSV) && !defined(SCO325)
+ return ioctl (ciptr->fd, I_NREAD, (char *) pend);
+#else
+ return ioctl (ciptr->fd, FIONREAD, (char *) pend);
+#endif /* __i386__ && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */
+#endif /* WIN32 */
+}
+
+
+static int
+TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, buf, size);
+
+#if defined(WIN32)
+ {
+ int ret = recv ((SOCKET)ciptr->fd, buf, size, 0);
+#ifdef WIN32
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+#endif
+ return ret;
+ }
+#else
+ return read (ciptr->fd, buf, size);
+#endif /* WIN32 */
+}
+
+
+static int
+TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, buf, size);
+
+#if defined(WIN32)
+ {
+ int ret = send ((SOCKET)ciptr->fd, buf, size, 0);
+#ifdef WIN32
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+#endif
+ return ret;
+ }
+#else
+ return write (ciptr->fd, buf, size);
+#endif /* WIN32 */
+}
+
+
+static int
+TRANS(SocketReadv) (XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, buf, size);
+
+ return READV (ciptr, buf, size);
+}
+
+
+static int
+TRANS(SocketWritev) (XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, buf, size);
+
+ return WRITEV (ciptr, buf, size);
+}
+
+
+static int
+TRANS(SocketDisconnect) (XtransConnInfo ciptr)
+
+{
+ PRMSG (2,"SocketDisconnect(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+#ifdef WIN32
+ {
+ int ret = shutdown (ciptr->fd, 2);
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+ return ret;
+ }
+#else
+ return shutdown (ciptr->fd, 2); /* disallow further sends and receives */
+#endif
+}
+
+
+#ifdef TCPCONN
+static int
+TRANS(SocketINETClose) (XtransConnInfo ciptr)
+
+{
+ PRMSG (2,"SocketINETClose(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+#ifdef WIN32
+ {
+ int ret = close (ciptr->fd);
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+ return ret;
+ }
+#else
+ return close (ciptr->fd);
+#endif
+}
+
+#endif /* TCPCONN */
+
+
+#ifdef UNIXCONN
+static int
+TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
+{
+ /*
+ * If this is the server side, then once the socket is closed,
+ * it must be unlinked to completely close it
+ */
+
+ struct sockaddr_un *sockname = (struct sockaddr_un *) ciptr->addr;
+ int ret;
+
+ PRMSG (2,"SocketUNIXClose(%p,%d)\n", ciptr, ciptr->fd, 0);
+
+ ret = close(ciptr->fd);
+
+ if (ciptr->flags
+ && sockname
+ && sockname->sun_family == AF_UNIX
+ && sockname->sun_path[0])
+ {
+ if (!(ciptr->flags & TRANS_NOUNLINK
+ || ciptr->transptr->flags & TRANS_ABSTRACT))
+ unlink (sockname->sun_path);
+ }
+
+ return ret;
+}
+
+static int
+TRANS(SocketUNIXCloseForCloning) (XtransConnInfo ciptr)
+
+{
+ /*
+ * Don't unlink path.
+ */
+
+ int ret;
+
+ PRMSG (2,"SocketUNIXCloseForCloning(%p,%d)\n",
+ ciptr, ciptr->fd, 0);
+
+ ret = close(ciptr->fd);
+
+ return ret;
+}
+
+#endif /* UNIXCONN */
+
+
+#ifdef TCPCONN
+# ifdef TRANS_SERVER
+static char* tcp_nolisten[] = {
+ "inet",
+#if defined(IPv6) && defined(AF_INET6)
+ "inet6",
+#endif
+ NULL
+};
+# endif
+
+Xtransport TRANS(SocketTCPFuncs) = {
+ /* Socket Interface */
+ "tcp",
+ TRANS_ALIAS,
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ tcp_nolisten,
+ TRANS(SocketOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SocketOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SocketReopenCOTSServer),
+ TRANS(SocketReopenCLTSServer),
+#endif
+ TRANS(SocketSetOption),
+#ifdef TRANS_SERVER
+ TRANS(SocketINETCreateListener),
+ NULL, /* ResetListener */
+ TRANS(SocketINETAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketINETConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(SocketBytesReadable),
+ TRANS(SocketRead),
+ TRANS(SocketWrite),
+ TRANS(SocketReadv),
+ TRANS(SocketWritev),
+ TRANS(SocketDisconnect),
+ TRANS(SocketINETClose),
+ TRANS(SocketINETClose),
+ };
+
+Xtransport TRANS(SocketINETFuncs) = {
+ /* Socket Interface */
+ "inet",
+ 0,
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(SocketOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SocketOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SocketReopenCOTSServer),
+ TRANS(SocketReopenCLTSServer),
+#endif
+ TRANS(SocketSetOption),
+#ifdef TRANS_SERVER
+ TRANS(SocketINETCreateListener),
+ NULL, /* ResetListener */
+ TRANS(SocketINETAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketINETConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(SocketBytesReadable),
+ TRANS(SocketRead),
+ TRANS(SocketWrite),
+ TRANS(SocketReadv),
+ TRANS(SocketWritev),
+ TRANS(SocketDisconnect),
+ TRANS(SocketINETClose),
+ TRANS(SocketINETClose),
+ };
+
+#if defined(IPv6) && defined(AF_INET6)
+Xtransport TRANS(SocketINET6Funcs) = {
+ /* Socket Interface */
+ "inet6",
+ 0,
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(SocketOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SocketOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SocketReopenCOTSServer),
+ TRANS(SocketReopenCLTSServer),
+#endif
+ TRANS(SocketSetOption),
+#ifdef TRANS_SERVER
+ TRANS(SocketINETCreateListener),
+ NULL, /* ResetListener */
+ TRANS(SocketINETAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketINETConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(SocketBytesReadable),
+ TRANS(SocketRead),
+ TRANS(SocketWrite),
+ TRANS(SocketReadv),
+ TRANS(SocketWritev),
+ TRANS(SocketDisconnect),
+ TRANS(SocketINETClose),
+ TRANS(SocketINETClose),
+ };
+#endif /* IPv6 */
+#endif /* TCPCONN */
+
+#ifdef UNIXCONN
+#if !defined(LOCALCONN)
+Xtransport TRANS(SocketLocalFuncs) = {
+ /* Socket Interface */
+ "local",
+#ifdef HAVE_ABSTRACT_SOCKETS
+ TRANS_ABSTRACT,
+#else
+ 0,
+#endif
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(SocketOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SocketOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SocketReopenCOTSServer),
+ TRANS(SocketReopenCLTSServer),
+#endif
+ TRANS(SocketSetOption),
+#ifdef TRANS_SERVER
+ TRANS(SocketUNIXCreateListener),
+ TRANS(SocketUNIXResetListener),
+ TRANS(SocketUNIXAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketUNIXConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(SocketBytesReadable),
+ TRANS(SocketRead),
+ TRANS(SocketWrite),
+ TRANS(SocketReadv),
+ TRANS(SocketWritev),
+ TRANS(SocketDisconnect),
+ TRANS(SocketUNIXClose),
+ TRANS(SocketUNIXCloseForCloning),
+ };
+#endif /* !LOCALCONN */
+# ifdef TRANS_SERVER
+# if !defined(LOCALCONN)
+static char* unix_nolisten[] = { "local" , NULL };
+# endif
+# endif
+
+Xtransport TRANS(SocketUNIXFuncs) = {
+ /* Socket Interface */
+ "unix",
+#if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS)
+ TRANS_ALIAS,
+#else
+ 0,
+#endif
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+#if !defined(LOCALCONN)
+ unix_nolisten,
+#else
+ NULL,
+#endif
+ TRANS(SocketOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(SocketOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(SocketReopenCOTSServer),
+ TRANS(SocketReopenCLTSServer),
+#endif
+ TRANS(SocketSetOption),
+#ifdef TRANS_SERVER
+ TRANS(SocketUNIXCreateListener),
+ TRANS(SocketUNIXResetListener),
+ TRANS(SocketUNIXAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(SocketUNIXConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(SocketBytesReadable),
+ TRANS(SocketRead),
+ TRANS(SocketWrite),
+ TRANS(SocketReadv),
+ TRANS(SocketWritev),
+ TRANS(SocketDisconnect),
+ TRANS(SocketUNIXClose),
+ TRANS(SocketUNIXCloseForCloning),
+ };
+
+#endif /* UNIXCONN */
diff --git a/X11/xtrans/Xtranstli.c b/X11/xtrans/Xtranstli.c
new file mode 100644
index 000000000..a9dfc21da
--- /dev/null
+++ b/X11/xtrans/Xtranstli.c
@@ -0,0 +1,1418 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/un.h>
+#include <stropts.h>
+#include <poll.h>
+#include <tiuser.h>
+
+#include <netdir.h>
+#include <netconfig.h>
+
+
+/*
+ * This is the TLI implementation of the X Transport service layer
+ */
+
+typedef struct _TLItrans2dev {
+ char *transname;
+ char *protofamily;
+ char *devcotsname;
+ char *devcltsname;
+ int family;
+} TLItrans2dev;
+
+static TLItrans2dev TLItrans2devtab[] = {
+ {"inet","inet","/dev/tcp","/dev/udp",AF_INET},
+ {"tcp","inet","/dev/tcp","/dev/udp",AF_INET},
+ {"tli","loopback","/dev/ticots","/dev/ticlts",AF_UNIX},
+};
+
+#define NUMTLIFAMILIES (sizeof(TLItrans2devtab)/sizeof(TLItrans2dev))
+
+/*
+ * The local TLI connection, is a form of a local connection, so use a
+ * sockaddr_un for the address so that it will be treated just like the other
+ * local transports such as UNIX domain sockets, pts, and named.
+ */
+
+#if defined(X11_t)
+#define TLINODENAME "TLI:xserver"
+#endif
+
+#if defined(XIM_t)
+#define TLINODENAME "TLI:xim"
+#endif
+
+#if defined(FS_t) || defined(FONT_t)
+#define TLINODENAME "TLI:fontserver"
+#endif
+
+#if defined(ICE_t)
+#define TLINODENAME "TLI:ICE"
+#endif
+
+#if defined(TEST_t)
+#define TLINODENAME "TLI:test"
+#endif
+
+#ifndef PORTBUFSIZE
+#ifdef TRANS_SERVER
+#define PORTBUFSIZE 64
+#else
+#ifdef TRANS_CLIENT
+#define PORTBUFSIZE 64
+#endif
+#endif
+#endif
+
+
+/*
+ * These are some utility function used by the real interface function below.
+ */
+
+static int
+TRANS(TLISelectFamily)(char *family)
+
+{
+ int i;
+
+ PRMSG(3,"TLISelectFamily(%s)\n", family, 0,0 );
+
+ for(i=0;i<NUMTLIFAMILIES;i++)
+ {
+ if( !strcmp(family,TLItrans2devtab[i].transname) )
+ return i;
+ }
+ return -1;
+}
+
+
+/*
+ * This function gets the local address of the transport and stores it in the
+ * XtransConnInfo structure for the connection.
+ */
+
+static int
+TRANS(TLIGetAddr)(XtransConnInfo ciptr)
+
+{
+ Xtransaddr sockname;
+ struct netbuf netbuf;
+
+ PRMSG(3,"TLIGetAddr(%x)\n", ciptr, 0,0 );
+
+ netbuf.buf=(char *)&sockname;
+ netbuf.len=sizeof(sockname);
+ netbuf.maxlen=sizeof(sockname);
+
+ if( t_getname(ciptr->fd,&netbuf,LOCALNAME) < 0 )
+ {
+ PRMSG(1,"TLIGetAddr: t_getname(LOCALNAME) failed: %d\n",
+ errno, 0,0 );
+ return -1;
+ }
+
+ PRMSG(4,"TLIGetAddr: got family %d len %d\n",
+ ((struct sockaddr *) &sockname)->sa_family ,netbuf.len, 0 );
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if( ciptr->addr )
+ xfree(ciptr->addr);
+
+ if( (ciptr->addr=(char *)xalloc(netbuf.len)) == NULL )
+ {
+ PRMSG(1, "TLIGetAddr: Can't allocate space for the addr\n",
+ 0,0,0);
+ return -1;
+ }
+
+ ciptr->family=((struct sockaddr *) &sockname)->sa_family;
+ ciptr->addrlen=netbuf.len;
+ memcpy(ciptr->addr,&sockname,ciptr->addrlen);
+
+ return 0;
+}
+
+
+/*
+ * This function gets the remote address of the socket and stores it in the
+ * XtransConnInfo structure for the connection.
+ */
+
+static int
+TRANS(TLIGetPeerAddr)(XtransConnInfo ciptr)
+
+{
+ Xtransaddr sockname;
+ struct netbuf netbuf;
+
+ PRMSG(3,"TLIGetPeerAddr(%x)\n", ciptr, 0,0 );
+
+ netbuf.buf=(char *)&sockname;
+ netbuf.len=sizeof(sockname);
+ netbuf.maxlen=sizeof(sockname);
+
+ if( t_getname(ciptr->fd,&netbuf,REMOTENAME) < 0 )
+ {
+ PRMSG(1,"TLIGetPeerAddr: t_getname(REMOTENAME) failed: %d\n",
+ errno, 0,0 );
+ return -1;
+ }
+
+ PRMSG(4,"TLIGetPeerAddr: got family %d len %d\n",
+ ((struct sockaddr *) &sockname)->sa_family ,netbuf.len, 0 );
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if( ciptr->peeraddr )
+ xfree(ciptr->peeraddr);
+
+ if( (ciptr->peeraddr=(char *)xalloc(netbuf.len)) == NULL )
+ {
+ PRMSG(1,
+ "TLIGetPeerAddr: Can't allocate space for the addr\n",
+ 0,0,0);
+ return -1;
+ }
+
+ ciptr->peeraddrlen=netbuf.len;
+ memcpy(ciptr->peeraddr,&sockname,ciptr->peeraddrlen);
+
+ return 0;
+}
+
+
+/*
+ * This function will establish a local name for the transport. This function
+ * do extra work for the local tli connection. It must create a sockaddr_un
+ * format address so that it will look like an AF_UNIX connection to the
+ * higher layer.
+ *
+ * This function will only be called by the OPENC?TSClient() functions since
+ * the local address is set up in the CreateListner() for the server ends.
+ */
+
+static int
+TRANS(TLITLIBindLocal)(int fd, int family, char *port)
+
+{
+ struct sockaddr_un *sunaddr=NULL;
+ struct t_bind *req=NULL;
+
+ PRMSG(2, "TLITLIBindLocal(%d,%d,%s)\n", fd, family, port);
+
+ if( family == AF_UNIX )
+ {
+ if( (req=(struct t_bind *)t_alloc(fd,T_BIND,0)) == NULL )
+ {
+ PRMSG(1,
+ "TLITLIBindLocal() failed to allocate a t_bind\n",
+ 0,0,0 );
+ return -1;
+ }
+
+ if( (sunaddr=(struct sockaddr_un *)
+ malloc(sizeof(struct sockaddr_un))) == NULL )
+ {
+ PRMSG(1,
+ "TLITLIBindLocal: failed to allocate a sockaddr_un\n",
+ 0,0,0 );
+ t_free((char *)req,T_BIND);
+ return -1;
+ }
+
+ sunaddr->sun_family=AF_UNIX;
+
+#ifdef nuke
+ if( *port == '/' ) { /* A full pathname */
+ (void) strcpy(sunaddr->sun_path, port);
+ } else {
+ (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
+ }
+#endif /*NUKE*/
+
+ (void) sprintf(sunaddr->sun_path,"%s%d",
+ TLINODENAME, getpid()^time(NULL) );
+
+ PRMSG(4, "TLITLIBindLocal: binding to %s\n",
+ sunaddr->sun_path, 0,0);
+
+ req->addr.buf=(char *)sunaddr;
+ req->addr.len=sizeof(*sunaddr);
+ req->addr.maxlen=sizeof(*sunaddr);
+ }
+
+ if( t_bind(fd, req, NULL) < 0 )
+ {
+ PRMSG(1,
+ "TLIBindLocal: Unable to bind TLI device to %s\n",
+ port, 0,0 );
+ if (sunaddr)
+ free((char *) sunaddr);
+ if (req)
+ t_free((char *)req,T_BIND);
+ return -1;
+ }
+ return 0;
+}
+
+static XtransConnInfo
+TRANS(TLIOpen)(char *device)
+
+{
+ XtransConnInfo ciptr;
+
+ PRMSG(3,"TLIOpen(%s)\n", device, 0,0 );
+
+ if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ {
+ PRMSG(1, "TLIOpen: calloc failed\n", 0,0,0 );
+ return NULL;
+ }
+
+ if( (ciptr->fd=t_open( device, O_RDWR, NULL )) < 0 )
+ {
+ PRMSG(1, "TLIOpen: t_open failed for %s\n", device, 0,0 );
+ free(ciptr);
+ return NULL;
+ }
+
+ return ciptr;
+}
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(TLIReopen)(char *device, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+
+ PRMSG(3,"TLIReopen(%s,%d, %s)\n", device, fd, port );
+
+ if (t_sync (fd) < 0)
+ {
+ PRMSG(1, "TLIReopen: t_sync failed\n", 0,0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ {
+ PRMSG(1, "TLIReopen: calloc failed\n", 0,0,0 );
+ return NULL;
+ }
+
+ ciptr->fd = fd;
+
+ return ciptr;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+static int
+TRANS(TLIAddrToNetbuf)(int tlifamily, char *host, char *port,
+ struct netbuf *netbufp)
+
+{
+ struct netconfig *netconfigp;
+ struct nd_hostserv nd_hostserv;
+ struct nd_addrlist *nd_addrlistp = NULL;
+ void *handlep;
+ long lport;
+
+ PRMSG(3,"TLIAddrToNetbuf(%d,%s,%s)\n", tlifamily, host, port );
+
+ if( (handlep=setnetconfig()) == NULL )
+ return -1;
+
+ lport = strtol (port, (char**)NULL, 10);
+ if (lport < 1024 || lport > USHRT_MAX)
+ return -1;
+
+ nd_hostserv.h_host = host;
+ if( port && *port ) {
+ nd_hostserv.h_serv = port;
+ } else {
+ nd_hostserv.h_serv = NULL;
+ }
+
+ while( (netconfigp=getnetconfig(handlep)) != NULL )
+ {
+ if( strcmp(netconfigp->nc_protofmly,
+ TLItrans2devtab[tlifamily].protofamily) != 0 )
+ continue;
+ PRMSG(5,"TLIAddrToNetbuf: Trying to resolve %s.%s for %s\n",
+ host, port, TLItrans2devtab[tlifamily].protofamily );
+ if( netdir_getbyname(netconfigp,&nd_hostserv, &nd_addrlistp) == 0 )
+ {
+ /* we have at least one address to use */
+
+ PRMSG(5, "TLIAddrToNetbuf: found address for %s.%s\n", host, port, 0 );
+ PRMSG(5, "TLIAddrToNetbuf: %s\n",taddr2uaddr(netconfigp,nd_addrlistp->n_addrs),
+ 0,0 );
+
+ memcpy(netbufp->buf,nd_addrlistp->n_addrs->buf,
+ nd_addrlistp->n_addrs->len);
+ netbufp->len=nd_addrlistp->n_addrs->len;
+ endnetconfig(handlep);
+ return 0;
+ }
+ }
+ endnetconfig(handlep);
+
+ return -1;
+}
+
+/*
+ * These functions are the interface supplied in the Xtransport structure
+ */
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(TLIOpenCOTSClient)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIOpenCOTSClient(%s,%s,%s)\n", protocol, host, port );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,"TLIOpenCOTSClient: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
+ {
+ PRMSG(1,"TLIOpenCOTSClient: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( TRANS(TLITLIBindLocal)(ciptr->fd,TLItrans2devtab[i].family,port) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCOTSClient: ...TLITLIBindLocal() failed: %d\n",
+ errno, 0,0 );
+ t_close(ciptr->fd);
+ xfree(ciptr);
+ return NULL;
+ }
+
+ if( TRANS(TLIGetAddr)(ciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCOTSClient: ...TLIGetAddr() failed: %d\n",
+ errno, 0,0 );
+ t_close(ciptr->fd);
+ xfree(ciptr);
+ return NULL;
+ }
+
+ /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(TLIOpenCOTSServer)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIOpenCOTSServer(%s,%s,%s)\n", protocol, host, port );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCOTSServer: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
+ {
+ PRMSG(1,
+ "TLIOpenCOTSServer: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ /* Set the family type */
+
+ ciptr->family = TLItrans2devtab[i].family;
+
+
+ /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+static XtransConnInfo
+TRANS(TLIOpenCLTSClient)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIOpenCLTSClient(%s,%s,%s)\n", protocol, host, port );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSClient: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcltsname)) == NULL )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSClient: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( TRANS(TLITLIBindLocal)(ciptr->fd,TLItrans2devtab[i].family,port) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSClient: ...TLITLIBindLocal() failed: %d\n",
+ errno, 0,0 );
+ t_close(ciptr->fd);
+ xfree(ciptr);
+ return NULL;
+ }
+
+ if( TRANS(TLIGetAddr)(ciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSClient: ...TLIGetPeerAddr() failed: %d\n",
+ errno, 0,0 );
+ t_close(ciptr->fd);
+ xfree(ciptr);
+ return NULL;
+ }
+
+ return ciptr;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+#ifdef TRANS_SERVER
+
+static XtransConnInfo
+TRANS(TLIOpenCLTSServer)(Xtransport *thistrans, char *protocol,
+ char *host, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIOpenCLTSServer(%s,%s,%s)\n", protocol, host, port );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSServer: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcltsname)) == NULL )
+ {
+ PRMSG(1,
+ "TLIOpenCLTSServer: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ return ciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_REOPEN
+
+static XtransConnInfo
+TRANS(TLIReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIReopenCOTSServer(%d, %s)\n", fd, port, 0 );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,
+ "TLIReopenCOTSServer: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIReopen)(
+ TLItrans2devtab[i].devcotsname, fd, port)) == NULL )
+ {
+ PRMSG(1,
+ "TLIReopenCOTSServer: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+
+static XtransConnInfo
+TRANS(TLIReopenCLTSServer)(Xtransport *thistrans, int fd, char *port)
+
+{
+ XtransConnInfo ciptr;
+ int i;
+
+ PRMSG(2,"TLIReopenCLTSServer(%d, %s)\n", fd, port, 0 );
+
+ if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
+ {
+ PRMSG(1,
+ "TLIReopenCLTSServer: Unable to determine device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ if( (ciptr=TRANS(TLIReopen)(
+ TLItrans2devtab[i].devcltsname, fd, port)) == NULL )
+ {
+ PRMSG(1,
+ "TLIReopenCLTSServer: Unable to open device for %s\n",
+ thistrans->TransName, 0,0 );
+ return NULL;
+ }
+
+ ciptr->index = i;
+
+ return ciptr;
+}
+
+#endif /* TRANS_REOPEN */
+
+
+static int
+TRANS(TLISetOption)(XtransConnInfo ciptr, int option, int arg)
+
+{
+ PRMSG(2,"TLISetOption(%d,%d,%d)\n", ciptr->fd, option, arg );
+
+ return -1;
+}
+
+
+#ifdef TRANS_SERVER
+
+static int
+TRANS(TLICreateListener)(XtransConnInfo ciptr, struct t_bind *req)
+
+{
+ struct t_bind *ret;
+
+ PRMSG(2,"TLICreateListener(%x->%d,%x)\n", ciptr, ciptr->fd, req );
+
+ if( (ret=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,T_ALL)) == NULL )
+ {
+ PRMSG(1, "TLICreateListener: failed to allocate a t_bind\n",
+ 0,0,0 );
+ t_free((char *)req,T_BIND);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ if( t_bind(ciptr->fd, req, ret) < 0 )
+ {
+ PRMSG(1, "TLICreateListener: t_bind failed\n", 0,0,0 );
+ t_free((char *)req,T_BIND);
+ t_free((char *)ret,T_BIND);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ if( memcmp(req->addr.buf,ret->addr.buf,req->addr.len) != 0 )
+ {
+ PRMSG(1, "TLICreateListener: unable to bind to %x\n",
+ req, 0,0 );
+ t_free((char *)req,T_BIND);
+ t_free((char *)ret,T_BIND);
+ return TRANS_ADDR_IN_USE;
+ }
+
+ /*
+ * Everything looks good: fill in the XtransConnInfo structure.
+ */
+
+ if( (ciptr->addr=(char *)xalloc(ret->addr.len)) == NULL )
+ {
+ PRMSG(1,
+ "TLICreateListener: Unable to allocate space for the address\n",
+ 0,0,0 );
+ t_free((char *)req,T_BIND);
+ t_free((char *)ret, T_BIND);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ ciptr->addrlen=ret->addr.len;
+ memcpy(ciptr->addr,ret->addr.buf,ret->addr.len);
+
+ t_free((char *)req,T_BIND);
+ t_free((char *)ret, T_BIND);
+
+ return 0;
+}
+
+
+static int
+TRANS(TLIINETCreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags)
+
+{
+ char portbuf[PORTBUFSIZE];
+ struct t_bind *req;
+ struct sockaddr_in *sinaddr;
+ long tmpport;
+
+ PRMSG(2,"TLIINETCreateListener(%x->%d,%s)\n", ciptr,
+ ciptr->fd, port ? port : "NULL" );
+
+#ifdef X11_t
+ /*
+ * X has a well known port, that is transport dependent. It is easier
+ * to handle it here, than try and come up with a transport independent
+ * representation that can be passed in and resolved the usual way.
+ *
+ * The port that is passed here is really a string containing the idisplay
+ * from ConnectDisplay().
+ */
+
+ if (is_numeric (port))
+ {
+ tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
+ sprintf(portbuf,"%u", tmpport);
+ port = portbuf;
+ }
+#endif
+
+ if( (req=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,T_ALL)) == NULL )
+ {
+ PRMSG(1,
+ "TLIINETCreateListener: failed to allocate a t_bind\n",
+ 0,0,0 );
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ if( port && *port ) {
+ if(TRANS(TLIAddrToNetbuf)(ciptr->index,HOST_SELF,port,&(req->addr)) < 0)
+ {
+ PRMSG(1,
+ "TLIINETCreateListener: can't resolve name:HOST_SELF.%s\n",
+ port, 0,0 );
+ t_free((char *)req,T_BIND);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+ } else {
+ sinaddr=(struct sockaddr_in *) req->addr.buf;
+ sinaddr->sin_family=AF_INET;
+ sinaddr->sin_port=htons(0);
+ sinaddr->sin_addr.s_addr=0;
+ }
+
+ /* Set the qlen */
+
+ req->qlen=1;
+
+ return TRANS(TLICreateListener)(ciptr, req);
+}
+
+
+static int
+TRANS(TLITLICreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags)
+
+{
+ struct t_bind *req;
+ struct sockaddr_un *sunaddr;
+ int ret_value;
+
+ PRMSG(2,"TLITLICreateListener(%x->%d,%s)\n", ciptr, ciptr->fd,
+ port ? port : "NULL");
+
+ if( (req=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,0)) == NULL )
+ {
+ PRMSG(1,
+ "TLITLICreateListener: failed to allocate a t_bind\n",
+ 0,0,0 );
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ if( (sunaddr=(struct sockaddr_un *)
+ malloc(sizeof(struct sockaddr_un))) == NULL )
+ {
+ PRMSG(1,
+ "TLITLICreateListener: failed to allocate a sockaddr_un\n",
+ 0,0,0 );
+ t_free((char *)req,T_BIND);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ sunaddr->sun_family=AF_UNIX;
+ if( port && *port ) {
+ if( *port == '/' ) { /* A full pathname */
+ (void) strcpy(sunaddr->sun_path, port);
+ } else {
+ (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
+ }
+ } else {
+ (void) sprintf(sunaddr->sun_path,"%s%d", TLINODENAME, getpid());
+ }
+
+ req->addr.buf=(char *)sunaddr;
+ req->addr.len=sizeof(*sunaddr);
+ req->addr.maxlen=sizeof(*sunaddr);
+
+ /* Set the qlen */
+
+ req->qlen=1;
+
+ ret_value = TRANS(TLICreateListener)(ciptr, req);
+
+ free((char *) sunaddr);
+
+ return ret_value;
+}
+
+
+static XtransConnInfo
+TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
+
+{
+ struct t_call *call;
+ XtransConnInfo newciptr;
+ int i;
+
+ PRMSG(2,"TLIAccept(%x->%d)\n", ciptr, ciptr->fd, 0 );
+
+ if( (call=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_ALL)) == NULL )
+ {
+ PRMSG(1, "TLIAccept() failed to allocate a t_call\n", 0,0,0 );
+ *status = TRANS_ACCEPT_BAD_MALLOC;
+ return NULL;
+ }
+
+ if( t_listen(ciptr->fd,call) < 0 )
+ {
+ extern char *t_errlist[];
+ extern int t_errno;
+ PRMSG(1, "TLIAccept() t_listen() failed\n", 0,0,0 );
+ PRMSG(1, "TLIAccept: %s\n", t_errlist[t_errno], 0,0 );
+ t_free((char *)call,T_CALL);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ /*
+ * Now we need to set up the new endpoint for the incoming connection.
+ */
+
+ i=ciptr->index; /* Makes the next line more readable */
+
+ if( (newciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
+ {
+ PRMSG(1, "TLIAccept() failed to open a new endpoint\n", 0,0,0 );
+ t_free((char *)call,T_CALL);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ if( TRANS(TLITLIBindLocal)(newciptr->fd,TLItrans2devtab[i].family,"") < 0 )
+ {
+ PRMSG(1,
+ "TLIAccept: TRANS(TLITLIBindLocal)() failed: %d\n",
+ errno, 0,0 );
+ t_free((char *)call,T_CALL);
+ t_close(newciptr->fd);
+ xfree(newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+
+ if( t_accept(ciptr->fd,newciptr->fd,call) < 0 )
+ {
+ extern char *t_errlist[];
+ extern int t_errno;
+ PRMSG(1, "TLIAccept() t_accept() failed\n", 0,0,0 );
+ PRMSG(1, "TLIAccept: %s\n", t_errlist[t_errno], 0,0 );
+ if( t_errno == TLOOK )
+ {
+ int evtype = t_look(ciptr->fd);
+ PRMSG(1, "TLIAccept() t_look() returned %d\n", evtype,0,0 );
+ switch( evtype )
+ {
+ case T_DISCONNECT:
+ if( t_rcvdis(ciptr->fd, NULL) < 0 )
+ {
+ PRMSG(1, "TLIAccept() t_rcvdis() failed\n", 0,0,0 );
+ PRMSG(1, "TLIAccept: %s\n", t_errlist[t_errno], 0,0 );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ t_free((char *)call,T_CALL);
+ t_close(newciptr->fd);
+ free(newciptr);
+ *status = TRANS_ACCEPT_FAILED;
+ return NULL;
+ }
+
+ t_free((char *)call,T_CALL);
+
+ if( TRANS(TLIGetAddr)(newciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
+ errno, 0,0 );
+ t_close(newciptr->fd);
+ xfree(newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ if( TRANS(TLIGetPeerAddr)(newciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
+ errno, 0,0 );
+ t_close(newciptr->fd);
+ xfree(newciptr->addr);
+ xfree(newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ if( ioctl(newciptr->fd, I_POP,"timod") < 0 )
+ {
+ PRMSG(1, "TLIAccept() ioctl(I_POP, \"timod\") failed %d\n",
+ errno,0,0 );
+ t_close(newciptr->fd);
+ xfree(newciptr->addr);
+ xfree(newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ if( ioctl(newciptr->fd, I_PUSH,"tirdwr") < 0 )
+ {
+ PRMSG(1, "TLIAccept() ioctl(I_PUSH,\"tirdwr\") failed %d\n",
+ errno,0,0 );
+ t_close(newciptr->fd);
+ xfree(newciptr->addr);
+ xfree(newciptr);
+ *status = TRANS_ACCEPT_MISC_ERROR;
+ return NULL;
+ }
+
+ *status = 0;
+
+ return newciptr;
+}
+
+#endif /* TRANS_SERVER */
+
+
+#ifdef TRANS_CLIENT
+
+static int
+TRANS(TLIConnect)(XtransConnInfo ciptr, struct t_call *sndcall )
+
+{
+ PRMSG(2, "TLIConnect(%x->%d,%x)\n", ciptr, ciptr->fd, sndcall);
+
+ if( t_connect(ciptr->fd,sndcall,NULL) < 0 )
+ {
+ extern char *t_errlist[];
+ extern int t_errno;
+ PRMSG(1, "TLIConnect() t_connect() failed\n", 0,0,0 );
+ PRMSG(1, "TLIConnect: %s\n", t_errlist[t_errno], 0,0 );
+ t_free((char *)sndcall,T_CALL);
+ if (t_errno == TLOOK && t_look(ciptr->fd) == T_DISCONNECT)
+ {
+ t_rcvdis(ciptr->fd,NULL);
+ return TRANS_TRY_CONNECT_AGAIN;
+ }
+ else
+ return TRANS_CONNECT_FAILED;
+ }
+
+ t_free((char *)sndcall,T_CALL);
+
+ /*
+ * Sync up the address fields of ciptr.
+ */
+
+ if( TRANS(TLIGetAddr)(ciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIConnect: ...TLIGetAddr() failed: %d\n",
+ errno, 0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if( TRANS(TLIGetPeerAddr)(ciptr) < 0 )
+ {
+ PRMSG(1,
+ "TLIConnect: ...TLIGetPeerAddr() failed: %d\n",
+ errno, 0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if( ioctl(ciptr->fd, I_POP,"timod") < 0 )
+ {
+ PRMSG(1, "TLIConnect() ioctl(I_POP,\"timod\") failed %d\n",
+ errno,0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if( ioctl(ciptr->fd, I_PUSH,"tirdwr") < 0 )
+ {
+ PRMSG(1, "TLIConnect() ioctl(I_PUSH,\"tirdwr\") failed %d\n",
+ errno,0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ return 0;
+}
+
+
+static int
+TRANS(TLIINETConnect)(XtransConnInfo ciptr, char *host, char *port)
+
+{
+ char portbuf[PORTBUFSIZE];
+ struct t_call *sndcall;
+ long tmpport;
+
+ PRMSG(2, "TLIINETConnect(%s,%s)\n", host, port, 0);
+
+#ifdef X11_t
+ /*
+ * X has a well known port, that is transport dependant. It is easier
+ * to handle it here, than try and come up with a transport independent
+ * representation that can be passed in and resolved the usual way.
+ *
+ * The port that is passed here is really a string containing the idisplay
+ * from ConnectDisplay().
+ */
+
+ if (is_numeric (port))
+ {
+ tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
+ sprintf(portbuf,"%u", tmpport );
+ port = portbuf;
+ }
+#endif
+
+ if( (sndcall=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_ALL)) == NULL )
+ {
+ PRMSG(1, "TLIINETConnect() failed to allocate a t_call\n", 0,0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if( TRANS(TLIAddrToNetbuf)(ciptr->index, host, port, &(sndcall->addr) ) < 0 )
+ {
+ PRMSG(1, "TLIINETConnect() unable to resolve name:%s.%s\n",
+ host, port, 0 );
+ t_free((char *)sndcall,T_CALL);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ return TRANS(TLIConnect)(ciptr, sndcall );
+}
+
+
+static int
+TRANS(TLITLIConnect)(XtransConnInfo ciptr, char *host, char *port)
+
+{
+ struct t_call *sndcall;
+ struct sockaddr_un *sunaddr;
+ int ret_value;
+
+ PRMSG(2, "TLITLIConnect(%s,%s)\n", host, port, 0);
+
+ if( (sndcall=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_OPT|T_UDATA)) == NULL )
+ {
+ PRMSG(1, "TLITLIConnect() failed to allocate a t_call\n", 0,0,0 );
+ return TRANS_CONNECT_FAILED;
+ }
+
+ if( (sunaddr=(struct sockaddr_un *)
+ malloc(sizeof(struct sockaddr_un))) == NULL )
+ {
+ PRMSG(1,
+ "TLITLIConnect: failed to allocate a sockaddr_un\n",
+ 0,0,0 );
+ t_free((char *)sndcall,T_CALL);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ sunaddr->sun_family=AF_UNIX;
+ if( *port == '/' ||
+ strncmp (port, TLINODENAME, strlen (TLINODENAME)) == 0) {
+ /* Use the port as is */
+ (void) strcpy(sunaddr->sun_path, port);
+ } else {
+ (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
+ }
+
+ sndcall->addr.buf=(char *)sunaddr;
+ sndcall->addr.len=sizeof(*sunaddr);
+ sndcall->addr.maxlen=sizeof(*sunaddr);
+
+ ret_value = TRANS(TLIConnect)(ciptr, sndcall );
+
+ free((char *) sunaddr);
+
+ return ret_value;
+}
+
+#endif /* TRANS_CLIENT */
+
+
+static int
+TRANS(TLIBytesReadable)(XtransConnInfo ciptr, BytesReadable_t *pend)
+
+{
+ int ret;
+ struct pollfd filedes;
+
+ PRMSG(2, "TLIByteReadable(%x->%d,%x)\n", ciptr, ciptr->fd, pend );
+
+ /*
+ * This function should detect hangup conditions. Use poll to check
+ * if no data is present. On SVR4, the M_HANGUP message sits on the
+ * streams head, and ioctl(N_READ) keeps returning 0 because there is
+ * no data available. The hangup goes undetected, and the client hangs.
+ */
+
+ ret=ioctl(ciptr->fd, I_NREAD, (char *)pend);
+
+ if( ret != 0 )
+ return ret; /* Data present or error */
+
+
+ /* Zero data, or POLLHUP message */
+
+ filedes.fd=ciptr->fd;
+ filedes.events=POLLIN;
+
+ ret=poll(&filedes, 1, 0);
+
+ if( ret == 0 ) {
+ *pend=0;
+ return 0; /* Really, no data */
+ }
+
+ if( ret < 0 )
+ return -1; /* just pass back the error */
+
+ if( filedes.revents & (POLLHUP|POLLERR) ) /* check for hangup */
+ return -1;
+
+ /* Should only get here if data arrived after the first ioctl() */
+ return ioctl(ciptr->fd, I_NREAD, (char *)pend);
+}
+
+
+static int
+TRANS(TLIRead)(XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG(2, "TLIRead(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return read(ciptr->fd,buf,size);
+}
+
+
+static int
+TRANS(TLIWrite)(XtransConnInfo ciptr, char *buf, int size)
+
+{
+ PRMSG(2, "TLIWrite(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return write(ciptr->fd,buf,size);
+}
+
+
+static int
+TRANS(TLIReadv)(XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG(2, "TLIReadv(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return READV(ciptr,buf,size);
+}
+
+
+static int
+TRANS(TLIWritev)(XtransConnInfo ciptr, struct iovec *buf, int size)
+
+{
+ PRMSG(2, "TLIWritev(%d,%x,%d)\n", ciptr->fd, buf, size );
+
+ return WRITEV(ciptr,buf,size);
+}
+
+
+static int
+TRANS(TLIDisconnect)(XtransConnInfo ciptr)
+
+{
+ PRMSG(2, "TLIDisconnect(%x->%d)\n", ciptr, ciptr->fd, 0 );
+
+ /*
+ * Restore the TLI modules so that the connection can be properly shutdown.
+ * This avoids the situation where a connection goes into the TIME_WAIT
+ * state, and the address remains unavailable for a while.
+ */
+ ioctl(ciptr->fd, I_POP,"tirdwr");
+ ioctl(ciptr->fd, I_PUSH,"timod");
+
+ t_snddis(ciptr->fd,NULL);
+
+ return 0;
+}
+
+
+static int
+TRANS(TLIClose)(XtransConnInfo ciptr)
+
+{
+ PRMSG(2, "TLIClose(%x->%d)\n", ciptr, ciptr->fd, 0 );
+
+ t_unbind(ciptr->fd);
+
+ return (t_close(ciptr->fd));
+}
+
+
+static int
+TRANS(TLICloseForCloning)(XtransConnInfo ciptr)
+
+{
+ /*
+ * Don't unbind.
+ */
+
+ PRMSG(2, "TLICloseForCloning(%x->%d)\n", ciptr, ciptr->fd, 0 );
+
+ return (t_close(ciptr->fd));
+}
+
+
+Xtransport TRANS(TLITCPFuncs) = {
+ /* TLI Interface */
+ "tcp",
+ 0,
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(TLIOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(TLIOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(TLIReopenCOTSServer),
+ TRANS(TLIReopenCLTSServer),
+#endif
+ TRANS(TLISetOption),
+#ifdef TRANS_SERVER
+ TRANS(TLIINETCreateListener),
+ NULL, /* ResetListener */
+ TRANS(TLIAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLIINETConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(TLIBytesReadable),
+ TRANS(TLIRead),
+ TRANS(TLIWrite),
+ TRANS(TLIReadv),
+ TRANS(TLIWritev),
+ TRANS(TLIDisconnect),
+ TRANS(TLIClose),
+ TRANS(TLICloseForCloning),
+};
+
+#ifdef TRANS_SERVER
+static char * inet_aliases[] = { "tcp", NULL };
+#endif
+Xtransport TRANS(TLIINETFuncs) = {
+ /* TLI Interface */
+ "inet",
+ TRANS_ALIAS,
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ inet_aliases,
+ TRANS(TLIOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(TLIOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(TLIReopenCOTSServer),
+ TRANS(TLIReopenCLTSServer),
+#endif
+ TRANS(TLISetOption),
+#ifdef TRANS_SERVER
+ TRANS(TLIINETCreateListener),
+ NULL, /* ResetListener */
+ TRANS(TLIAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLIINETConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(TLIBytesReadable),
+ TRANS(TLIRead),
+ TRANS(TLIWrite),
+ TRANS(TLIReadv),
+ TRANS(TLIWritev),
+ TRANS(TLIDisconnect),
+ TRANS(TLIClose),
+ TRANS(TLICloseForCloning),
+};
+
+Xtransport TRANS(TLITLIFuncs) = {
+ /* TLI Interface */
+ "tli",
+ 0,
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCOTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ NULL,
+ TRANS(TLIOpenCOTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLIOpenCLTSClient),
+#endif /* TRANS_CLIENT */
+#ifdef TRANS_SERVER
+ TRANS(TLIOpenCLTSServer),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_REOPEN
+ TRANS(TLIReopenCOTSServer),
+ TRANS(TLIReopenCLTSServer),
+#endif
+ TRANS(TLISetOption),
+#ifdef TRANS_SERVER
+ TRANS(TLITLICreateListener),
+ NULL, /* ResetListener */
+ TRANS(TLIAccept),
+#endif /* TRANS_SERVER */
+#ifdef TRANS_CLIENT
+ TRANS(TLITLIConnect),
+#endif /* TRANS_CLIENT */
+ TRANS(TLIBytesReadable),
+ TRANS(TLIRead),
+ TRANS(TLIWrite),
+ TRANS(TLIReadv),
+ TRANS(TLIWritev),
+ TRANS(TLIDisconnect),
+ TRANS(TLIClose),
+ TRANS(TLICloseForCloning),
+};
diff --git a/X11/xtrans/Xtransutil.c b/X11/xtrans/Xtransutil.c
new file mode 100644
index 000000000..0f7c7b2a5
--- /dev/null
+++ b/X11/xtrans/Xtransutil.c
@@ -0,0 +1,642 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCRS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * These are some utility functions created for convenience or to provide
+ * an interface that is similar to an existing interface. These are built
+ * only using the Transport Independant API, and have no knowledge of
+ * the internal implementation.
+ */
+
+#ifdef XTHREADS
+#include <X11/Xthreads.h>
+#endif
+#ifdef WIN32
+#include <X11/Xlibint.h>
+#include <X11/Xwinsock.h>
+#endif
+
+#ifdef X11_t
+
+/*
+ * These values come from X.h and Xauth.h, and MUST match them. Some
+ * of these values are also defined by the ChangeHost protocol message.
+ */
+
+#define FamilyInternet 0 /* IPv4 */
+#define FamilyDECnet 1
+#define FamilyChaos 2
+#define FamilyInternet6 6
+#define FamilyAmoeba 33
+#define FamilyLocalHost 252
+#define FamilyKrb5Principal 253
+#define FamilyNetname 254
+#define FamilyLocal 256
+#define FamilyWild 65535
+
+/*
+ * TRANS(ConvertAddress) converts a sockaddr based address to an
+ * X authorization based address. Some of this is defined as part of
+ * the ChangeHost protocol. The rest is just done in a consistent manner.
+ */
+
+int
+TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
+
+{
+
+ PRMSG(2,"ConvertAddress(%d,%d,%x)\n",*familyp,*addrlenp,*addrp);
+
+ switch( *familyp )
+ {
+#if defined(TCPCONN) || defined(STREAMSCONN)
+ case AF_INET:
+ {
+ /*
+ * Check for the BSD hack localhost address 127.0.0.1.
+ * In this case, we are really FamilyLocal.
+ */
+
+ struct sockaddr_in saddr;
+ int len = sizeof(saddr.sin_addr.s_addr);
+ char *cp = (char *) &saddr.sin_addr.s_addr;
+
+ memcpy (&saddr, *addrp, sizeof (struct sockaddr_in));
+
+ if ((len == 4) && (cp[0] == 127) && (cp[1] == 0) &&
+ (cp[2] == 0) && (cp[3] == 1))
+ {
+ *familyp=FamilyLocal;
+ }
+ else
+ {
+ *familyp=FamilyInternet;
+ *addrlenp=len;
+ memcpy(*addrp,&saddr.sin_addr,len);
+ }
+ break;
+ }
+
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6:
+ {
+ struct sockaddr_in6 saddr6;
+
+ memcpy (&saddr6, *addrp, sizeof (struct sockaddr_in6));
+
+ if (IN6_IS_ADDR_LOOPBACK(&saddr6.sin6_addr))
+ {
+ *familyp=FamilyLocal;
+ }
+ else if (IN6_IS_ADDR_V4MAPPED(&(saddr6.sin6_addr))) {
+ char *cp = (char *) &saddr6.sin6_addr.s6_addr[12];
+
+ if ((cp[0] == 127) && (cp[1] == 0) &&
+ (cp[2] == 0) && (cp[3] == 1))
+ {
+ *familyp=FamilyLocal;
+ }
+ else
+ {
+ *familyp=FamilyInternet;
+ *addrlenp = sizeof (struct in_addr);
+ memcpy(*addrp,cp,*addrlenp);
+ }
+ }
+ else
+ {
+ *familyp=FamilyInternet6;
+ *addrlenp=sizeof(saddr6.sin6_addr);
+ memcpy(*addrp,&saddr6.sin6_addr,sizeof(saddr6.sin6_addr));
+ }
+ break;
+ }
+#endif /* IPv6 */
+#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+
+
+#if defined(UNIXCONN) || defined(LOCALCONN)
+ case AF_UNIX:
+ {
+ *familyp=FamilyLocal;
+ break;
+ }
+#endif /* defined(UNIXCONN) || defined(LOCALCONN) */
+
+#if (defined(__SCO__) || defined(__UNIXWARE__)) && defined(LOCALCONN)
+ case 0:
+ {
+ *familyp=FamilyLocal;
+ break;
+ }
+#endif
+
+ default:
+ PRMSG(1,"ConvertAddress: Unknown family type %d\n",
+ *familyp, 0,0 );
+ return -1;
+ }
+
+
+ if (*familyp == FamilyLocal)
+ {
+ /*
+ * In the case of a local connection, we need to get the
+ * host name for authentication.
+ */
+
+ char hostnamebuf[256];
+ int len = TRANS(GetHostname) (hostnamebuf, sizeof hostnamebuf);
+
+ if (len > 0) {
+ if (*addrp && *addrlenp < (len + 1))
+ {
+ xfree ((char *) *addrp);
+ *addrp = NULL;
+ }
+ if (!*addrp)
+ *addrp = (Xtransaddr *) xalloc (len + 1);
+ if (*addrp) {
+ strcpy ((char *) *addrp, hostnamebuf);
+ *addrlenp = len;
+ } else {
+ *addrlenp = 0;
+ }
+ }
+ else
+ {
+ if (*addrp)
+ xfree ((char *) *addrp);
+ *addrp = NULL;
+ *addrlenp = 0;
+ }
+ }
+
+ return 0;
+}
+
+#endif /* X11_t */
+
+#ifdef ICE_t
+
+#include <signal.h>
+
+char *
+TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
+
+{
+ int family = ciptr->family;
+ char *addr = ciptr->addr;
+ char hostnamebuf[256];
+ char *networkId = NULL;
+ char *transName = ciptr->transptr->TransName;
+
+ if (gethostname (hostnamebuf, sizeof (hostnamebuf)) < 0)
+ {
+ return (NULL);
+ }
+
+ switch (family)
+ {
+#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN)
+ case AF_UNIX:
+ {
+ struct sockaddr_un *saddr = (struct sockaddr_un *) addr;
+ networkId = (char *) xalloc (3 + strlen (transName) +
+ strlen (hostnamebuf) + strlen (saddr->sun_path));
+ sprintf (networkId, "%s/%s:%s", transName,
+ hostnamebuf, saddr->sun_path);
+ break;
+ }
+#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */
+
+#if defined(TCPCONN) || defined(STREAMSCONN)
+ case AF_INET:
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6:
+#endif
+ {
+ struct sockaddr_in *saddr = (struct sockaddr_in *) addr;
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) addr;
+#endif
+ int portnum;
+ char portnumbuf[10];
+
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (family == AF_INET6)
+ portnum = ntohs (saddr6->sin6_port);
+ else
+#endif
+ portnum = ntohs (saddr->sin_port);
+
+ snprintf (portnumbuf, sizeof(portnumbuf), "%d", portnum);
+ networkId = (char *) xalloc (3 + strlen (transName) +
+ strlen (hostnamebuf) + strlen (portnumbuf));
+ sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
+ break;
+ }
+#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+
+
+ default:
+ break;
+ }
+
+ return (networkId);
+}
+
+#include <setjmp.h>
+static jmp_buf env;
+
+#ifdef SIGALRM
+static volatile int nameserver_timedout = 0;
+
+static
+#ifdef RETSIGTYPE /* set by autoconf AC_TYPE_SIGNAL */
+RETSIGTYPE
+#else /* Imake */
+#ifdef SIGNALRETURNSINT
+int
+#else
+void
+#endif
+#endif
+nameserver_lost(int sig)
+{
+ nameserver_timedout = 1;
+ longjmp (env, -1);
+ /* NOTREACHED */
+#ifdef SIGNALRETURNSINT
+ return -1; /* for picky compilers */
+#endif
+}
+#endif /* SIGALARM */
+
+
+char *
+TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
+
+{
+ int family = ciptr->family;
+ char *peer_addr = ciptr->peeraddr;
+ char *hostname;
+ char addrbuf[256];
+ const char *addr = NULL;
+
+ switch (family)
+ {
+ case AF_UNSPEC:
+#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN)
+ case AF_UNIX:
+ {
+ if (gethostname (addrbuf, sizeof (addrbuf)) == 0)
+ addr = addrbuf;
+ break;
+ }
+#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */
+
+#if defined(TCPCONN) || defined(STREAMSCONN)
+ case AF_INET:
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6:
+#endif
+ {
+ struct sockaddr_in *saddr = (struct sockaddr_in *) peer_addr;
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) peer_addr;
+#endif
+ char *address;
+ int addresslen;
+#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
+ _Xgethostbynameparams hparams;
+#endif
+ struct hostent * volatile hostp = NULL;
+
+#if defined(IPv6) && defined(AF_INET6)
+ if (family == AF_INET6)
+ {
+ address = (char *) &saddr6->sin6_addr;
+ addresslen = sizeof (saddr6->sin6_addr);
+ }
+ else
+#endif
+ {
+ address = (char *) &saddr->sin_addr;
+ addresslen = sizeof (saddr->sin_addr);
+ }
+
+#ifdef SIGALRM
+ /*
+ * gethostbyaddr can take a LONG time if the host does not exist.
+ * Assume that if it does not respond in NAMESERVER_TIMEOUT seconds
+ * that something is wrong and do not make the user wait.
+ * gethostbyaddr will continue after a signal, so we have to
+ * jump out of it.
+ */
+
+ nameserver_timedout = 0;
+ signal (SIGALRM, nameserver_lost);
+ alarm (4);
+ if (setjmp(env) == 0) {
+#endif
+ hostp = _XGethostbyaddr (address, addresslen, family, hparams);
+#ifdef SIGALRM
+ }
+ alarm (0);
+#endif
+ if (hostp != NULL)
+ addr = hostp->h_name;
+ else
+#if defined(IPv6) && defined(AF_INET6)
+ addr = inet_ntop (family, address, addrbuf, sizeof (addrbuf));
+#else
+ addr = inet_ntoa (saddr->sin_addr);
+#endif
+ break;
+ }
+
+#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+
+
+ default:
+ return (NULL);
+ }
+
+
+ hostname = (char *) xalloc (
+ strlen (ciptr->transptr->TransName) + strlen (addr) + 2);
+ strcpy (hostname, ciptr->transptr->TransName);
+ strcat (hostname, "/");
+ if (addr)
+ strcat (hostname, addr);
+
+ return (hostname);
+}
+
+#endif /* ICE_t */
+
+
+#if defined(WIN32) && defined(TCPCONN)
+int
+TRANS(WSAStartup) (void)
+{
+ static WSADATA wsadata;
+
+ PRMSG (2,"WSAStartup()\n", 0, 0, 0);
+
+ if (!wsadata.wVersion && WSAStartup(MAKEWORD(2,2), &wsadata))
+ return 1;
+ return 0;
+}
+#endif
+
+
+static int
+is_numeric (char *str)
+
+{
+ int i;
+
+ for (i = 0; i < (int) strlen (str); i++)
+ if (!isdigit (str[i]))
+ return (0);
+
+ return (1);
+}
+
+#ifdef TRANS_SERVER
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#if !defined(S_IFLNK) && !defined(S_ISLNK)
+#undef lstat
+#define lstat(a,b) stat(a,b)
+#endif
+
+#define FAIL_IF_NOMODE 1
+#define FAIL_IF_NOT_ROOT 2
+#define WARN_NO_ACCESS 4
+
+/*
+ * We make the assumption that when the 'sticky' (t) bit is requested
+ * it's not save if the directory has non-root ownership or the sticky
+ * bit cannot be set and fail.
+ */
+static int
+trans_mkdir(char *path, int mode)
+{
+ struct stat buf;
+
+ if (lstat(path, &buf) != 0) {
+ if (errno != ENOENT) {
+ PRMSG(1, "mkdir: ERROR: (l)stat failed for %s (%d)\n",
+ path, errno, 0);
+ return -1;
+ }
+ /* Dir doesn't exist. Try to create it */
+
+#ifndef WIN32
+ /*
+ * 'sticky' bit requested: assume application makes
+ * certain security implications. If effective user ID
+ * is != 0: fail as we may not be able to meet them.
+ */
+ if (geteuid() != 0) {
+ if (mode & 01000) {
+ PRMSG(1, "mkdir: ERROR: euid != 0,"
+ "directory %s will not be created.\n",
+ path, 0, 0);
+#ifdef FAIL_HARD
+ return -1;
+#endif
+ } else {
+ PRMSG(1, "mkdir: Cannot create %s with root ownership\n",
+ path, 0, 0);
+ }
+ }
+#endif
+
+#ifndef WIN32
+ if (mkdir(path, mode) == 0) {
+ if (chmod(path, mode)) {
+ PRMSG(1, "mkdir: ERROR: Mode of %s should be set to %04o\n",
+ path, mode, 0);
+#ifdef FAIL_HARD
+ return -1;
+#endif
+ }
+#else
+ if (mkdir(path) == 0) {
+#endif
+ } else {
+ PRMSG(1, "mkdir: ERROR: Cannot create %s\n",
+ path, 0, 0);
+ return -1;
+ }
+
+ return 0;
+
+ } else {
+ if (S_ISDIR(buf.st_mode)) {
+ int updateOwner = 0;
+ int updateMode = 0;
+ int updatedOwner = 0;
+ int updatedMode = 0;
+ int status = 0;
+ /* Check if the directory's ownership is OK. */
+ if (buf.st_uid != 0)
+ updateOwner = 1;
+
+ /*
+ * Check if the directory's mode is OK. An exact match isn't
+ * required, just a mode that isn't more permissive than the
+ * one requested.
+ */
+ if ((~mode) & 0077 & buf.st_mode)
+ updateMode = 1;
+
+ /*
+ * If the directory is not writeable not everybody may
+ * be able to create sockets. Therefore warn if mode
+ * cannot be fixed.
+ */
+ if ((~buf.st_mode) & 0022 & mode) {
+ updateMode = 1;
+ status |= WARN_NO_ACCESS;
+ }
+
+ /*
+ * If 'sticky' bit is requested fail if owner isn't root
+ * as we assume the caller makes certain security implications
+ */
+ if (mode & 01000) {
+ status |= FAIL_IF_NOT_ROOT;
+ if (!(buf.st_mode & 01000)) {
+ status |= FAIL_IF_NOMODE;
+ updateMode = 1;
+ }
+ }
+
+#ifdef HAS_FCHOWN
+ /*
+ * If fchown(2) and fchmod(2) are available, try to correct the
+ * directory's owner and mode. Otherwise it isn't safe to attempt
+ * to do this.
+ */
+ if (updateMode || updateOwner) {
+ int fd = -1;
+ struct stat fbuf;
+ if ((fd = open(path, O_RDONLY)) != -1) {
+ if (fstat(fd, &fbuf) == -1) {
+ PRMSG(1, "mkdir: ERROR: fstat failed for %s (%d)\n",
+ path, errno, 0);
+ return -1;
+ }
+ /*
+ * Verify that we've opened the same directory as was
+ * checked above.
+ */
+ if (!S_ISDIR(fbuf.st_mode) ||
+ buf.st_dev != fbuf.st_dev ||
+ buf.st_ino != fbuf.st_ino) {
+ PRMSG(1, "mkdir: ERROR: inode for %s changed\n",
+ path, 0, 0);
+ return -1;
+ }
+ if (updateOwner && fchown(fd, 0, 0) == 0)
+ updatedOwner = 1;
+ if (updateMode && fchmod(fd, mode) == 0)
+ updatedMode = 1;
+ close(fd);
+ }
+ }
+#endif
+
+ if (updateOwner && !updatedOwner) {
+#ifdef FAIL_HARD
+ if (status & FAIL_IF_NOT_ROOT) {
+ PRMSG(1, "mkdir: ERROR: Owner of %s must be set to root\n",
+ path, 0, 0);
+ return -1;
+ }
+#endif
+#ifndef __APPLE_CC__
+ PRMSG(1, "mkdir: Owner of %s should be set to root\n",
+ path, 0, 0);
+#endif
+ }
+
+ if (updateMode && !updatedMode) {
+#ifdef FAIL_HARD
+ if (status & FAIL_IF_NOMODE) {
+ PRMSG(1, "mkdir: ERROR: Mode of %s must be set to %04o\n",
+ path, mode, 0);
+ return -1;
+ }
+#endif
+ PRMSG(1, "mkdir: Mode of %s should be set to %04o\n",
+ path, mode, 0);
+ if (status & WARN_NO_ACCESS) {
+ PRMSG(1, "mkdir: this may cause subsequent errors\n",
+ 0, 0, 0);
+ }
+ }
+ return 0;
+ }
+ return -1;
+ }
+
+ /* In all other cases, fail */
+ return -1;
+}
+
+#endif /* TRANS_SERVER */
diff --git a/X11/xtrans/aclocal.m4 b/X11/xtrans/aclocal.m4
new file mode 100644
index 000000000..549523ff5
--- /dev/null
+++ b/X11/xtrans/aclocal.m4
@@ -0,0 +1,959 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
+# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+
+AC_DEFUN([XORG_RELEASE_VERSION],[
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+ [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+ [Major version of this package])
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+ [$PVM],
+ [Minor version of this package])
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+ [$PVP],
+ [Patch version of this package])
+])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.10.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 13
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/X11/xtrans/configure b/X11/xtrans/configure
new file mode 100644
index 000000000..72ab5fa79
--- /dev/null
+++ b/X11/xtrans/configure
@@ -0,0 +1,4848 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63 for xtrans 1.2.2.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='xtrans'
+PACKAGE_TARNAME='xtrans'
+PACKAGE_VERSION='1.2.2'
+PACKAGE_STRING='xtrans 1.2.2'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sticky_bit_define
+fchown_define
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_dependency_tracking
+with_release_version
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures xtrans 1.2.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/xtrans]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of xtrans 1.2.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+xtrans configure 1.2.2
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by xtrans $as_me 1.2.2, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.10'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xtrans'
+ VERSION='1.2.2'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Because xtrans is included into other modules rather than being linked
+# with, these defines have to be added to the cflags line
+
+# fchown()
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for fchown" >&5
+$as_echo_n "checking for fchown... " >&6; }
+if test "${ac_cv_func_fchown+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fchown to an innocuous variant, in case <limits.h> declares fchown.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fchown innocuous_fchown
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fchown (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fchown
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char fchown ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_fchown || defined __stub___fchown
+choke me
+#endif
+
+int
+main ()
+{
+return fchown ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_fchown=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_fchown=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchown" >&5
+$as_echo "$ac_cv_func_fchown" >&6; }
+if test "x$ac_cv_func_fchown" = x""yes; then
+ fchown_define="-DHAS_FCHOWN"
+else
+ fchown_define=""
+fi
+
+
+
+
+# sticky bit
+#
+# if any system exists without sticky dir bits this
+# needs to be redone with a real autoconf test
+
+sticky_bit_define="-DHAS_STICKY_DIR_BIT"
+
+
+
+
+
+# Check whether --with-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval=$with_release_version; RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi
+
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+ac_config_files="$ac_config_files Makefile xtrans.pc"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by xtrans $as_me 1.2.2, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+xtrans config.status 1.2.2
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "xtrans.pc") CONFIG_FILES="$CONFIG_FILES xtrans.pc" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+
+
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/X11/xtrans/configure.ac b/X11/xtrans/configure.ac
new file mode 100644
index 000000000..19b736fc1
--- /dev/null
+++ b/X11/xtrans/configure.ac
@@ -0,0 +1,49 @@
+dnl Copyright © 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.57])
+AC_INIT(xtrans, 1.2.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
+AM_INIT_AUTOMAKE([dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Because xtrans is included into other modules rather than being linked
+# with, these defines have to be added to the cflags line
+
+# fchown()
+
+AC_CHECK_FUNC(fchown, [fchown_define="-DHAS_FCHOWN"], [fchown_define=""])
+
+AC_SUBST(fchown_define)
+
+# sticky bit
+#
+# if any system exists without sticky dir bits this
+# needs to be redone with a real autoconf test
+
+sticky_bit_define="-DHAS_STICKY_DIR_BIT"
+
+AC_SUBST(sticky_bit_define)
+
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile
+ xtrans.pc])
diff --git a/X11/xtrans/install-sh b/X11/xtrans/install-sh
new file mode 100644
index 000000000..a5897de6e
--- /dev/null
+++ b/X11/xtrans/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/xtrans/missing b/X11/xtrans/missing
new file mode 100644
index 000000000..1c8ff7049
--- /dev/null
+++ b/X11/xtrans/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/X11/xtrans/transport.c b/X11/xtrans/transport.c
new file mode 100644
index 000000000..5131d99e4
--- /dev/null
+++ b/X11/xtrans/transport.c
@@ -0,0 +1,73 @@
+/*
+
+Copyright 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name NCR not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCR makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifdef XSERV_t
+#include "os.h"
+#else
+#include <stdlib.h>
+#define xalloc(_size) malloc(_size)
+#define xcalloc(_num,_size) calloc(_num,_size)
+#define xrealloc(_ptr,_size) realloc(_ptr,_size)
+#define xfree(_ptr) free(_ptr)
+#endif
+
+#include "Xtransint.h"
+
+#ifdef LOCALCONN
+#include "Xtranslcl.c"
+#endif
+#if defined(TCPCONN) || defined(UNIXCONN)
+#include "Xtranssock.c"
+#endif
+#ifdef STREAMSCONN
+#include "Xtranstli.c"
+#endif
+#include "Xtrans.c"
+#include "Xtransutil.c"
diff --git a/X11/xtrans/xtrans.m4 b/X11/xtrans/xtrans.m4
new file mode 100644
index 000000000..31d456b41
--- /dev/null
+++ b/X11/xtrans/xtrans.m4
@@ -0,0 +1,138 @@
+dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
+dnl
+dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XTRANS_TCP_FLAGS()
+# ------------------
+# Find needed libraries for TCP sockets, and check for IPv6 support
+AC_DEFUN([XTRANS_TCP_FLAGS],[
+ # SVR4 hides these in libraries other than libc
+ AC_SEARCH_LIBS(socket, [socket])
+ AC_SEARCH_LIBS(gethostbyname, [nsl])
+
+ # Needs to come after above checks for libsocket & libnsl for SVR4 systems
+ AC_ARG_ENABLE(ipv6,
+ AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
+ [IPV6CONN=$enableval],
+ [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
+ AC_MSG_CHECKING([if IPv6 support should be built])
+ if test "$IPV6CONN" = "yes"; then
+ AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
+ fi
+ AC_MSG_RESULT($IPV6CONN)
+
+ # 4.3BSD-Reno added a new member to struct sockaddr_in
+ AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
+ AC_DEFINE([BSD44SOCKETS],1,
+ [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+ ])
+
+ # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
+ AC_CHECK_TYPES([socklen_t], [], [], [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>])
+
+]) # XTRANS_TCP_FLAGS
+
+# XTRANS_CONNECTION_FLAGS()
+# -------------------------
+# Standard checks for which Xtrans transports to use by the Xorg packages
+# that use Xtrans functions
+AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_TYPE_SIGNAL])
+ [case $host_os in
+ mingw*) unixdef="no" ;;
+ *) unixdef="yes" ;;
+ esac]
+ AC_ARG_ENABLE(unix-transport,
+ AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
+ [UNIXCONN=$enableval], [UNIXCONN=$unixdef])
+ AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
+ if test "$UNIXCONN" = "yes"; then
+ AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
+ fi
+ AC_MSG_RESULT($UNIXCONN)
+ AC_ARG_ENABLE(tcp-transport,
+ AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
+ [TCPCONN=$enableval], [TCPCONN=yes])
+ AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
+ AC_MSG_RESULT($TCPCONN)
+ if test "$TCPCONN" = "yes"; then
+ AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
+ XTRANS_TCP_FLAGS
+ fi
+ [case $host_os in
+ solaris*|sco*|sysv4*) localdef="yes" ;;
+ *) localdef="no" ;;
+ esac]
+ AC_ARG_ENABLE(local-transport,
+ AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
+ [LOCALCONN=$enableval], [LOCALCONN=$localdef])
+ AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
+ AC_MSG_RESULT($LOCALCONN)
+ if test "$LOCALCONN" = "yes"; then
+ AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
+ fi
+
+]) # XTRANS_CONNECTION_FLAGS
+
+
+# XTRANS_SECURE_RPC_FLAGS()
+# -------------------------
+# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
+# so that any necessary networking libraries are already found
+AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
+[AC_REQUIRE([XTRANS_TCP_FLAGS])
+ AC_ARG_ENABLE(secure-rpc,
+ AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
+ [SECURE_RPC=$enableval], [SECURE_RPC="try"])
+
+ if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
+ FOUND_SECURE_RPC="no"
+ AC_CHECK_FUNCS([authdes_seccreate authdes_create],
+ [FOUND_SECURE_RPC="yes"])
+ if test "x$FOUND_SECURE_RPC" = "xno" ; then
+ if test "x$SECURE_RPC" = "xyes" ; then
+ AC_MSG_ERROR([Secure RPC requested, but required functions not found])
+ fi
+ SECURE_RPC="no"
+ else
+ dnl FreeBSD keeps getsecretkey in librpcsvc
+ AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
+ SECURE_RPC="yes"
+ fi
+ fi
+ AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
+ if test "x$SECURE_RPC" = "xyes" ; then
+ AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
+ fi
+ AC_MSG_RESULT($SECURE_RPC)
+]) # XTRANS_SECURE_RPC_FLAGS
+
diff --git a/X11/xtrans/xtrans.pc.in b/X11/xtrans/xtrans.pc.in
new file mode 100644
index 000000000..90d19b16f
--- /dev/null
+++ b/X11/xtrans/xtrans.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XTrans
+Description: Abstract network code for X
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir} -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@